Change relationship in a sub graph upto nth level

HI
Can any one help me how can i change the relationship in a subgraph . I am copying graph a into graph b. At time to of copying i want to change some relation ship name . Can any one help me