Question: How can I replace pathway names with gene names?
0
gravatar for fp89
2.3 years ago by
fp8920
fp8920 wrote:

Hi,I'm bioinformatics student. I have two dataframes (A and B) and I want to convert the row names of the B with hgnc of the A but I don't know how I can do that. I tried with row.names(B)<-A$hgnc but the following message appears: Error in row.names<-.data.frame(*tmp*, value = c("MAPK1", "MAPK1", : invalid 'row.names' length. Can someone help me? Thank you!

A) 42.299 entries

circuit_id. hgnc. entrez_id

hsa04014__42 MAPK1 5594

hsa04014__42 MAPK1 5595

hsa04014__42 MAP2K1 5604

hsa04014__42 MAP2K1 5605

hsa04014__42 RAF1 5894

hsa04014__42 SOS1 6654 ...

B) 1094 entries

TCGA.E9.A1RH.01A.21R.A169.07 TCGA.E9.A1RH.11A.34R.A169.07 TCGA.E9.A1RI.01A.11R.A169.07 TCGA.E9.A1RI.11A.41R.A169.07

hsa04014__42 0.00839838888865256 0.00970133390996418 0.00737341972835342 0.00863589753817323
hsa04014__43 0.00889266963019671 0.00884086502538367 0.00725537406271006 0.00823720653502033 ....

gene names row names R pathway • 658 views
ADD COMMENTlink modified 2.3 years ago • written 2.3 years ago by fp8920
1

Hello fp89, you can try using code formating to display some data-structures. It will be easier to understand your request. An other point that might help you posting your questions, you can first giving the actual state of the files, and then, the desired state. Like this, people can take your few lines as example to write the adapted code to your problem. ;)

As hint for your actual code, you are trying to assign a vector of length 42k to a vector of length 1k. That's why R is telling you invalid length.

ADD REPLYlink modified 2.3 years ago • written 2.3 years ago by glihm610

I have 100 samples (50 tumor and 50 normal) and 1014 significative circuits. I have to find genes included in each subpathway (circuit) so I can obtain expression values for each gene in each sample. I need to cross the two dataframes. Can I do it with merge function? And if so, how? Many thanks Glihm.

ADD REPLYlink written 2.3 years ago by fp8920
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1311 users visited in the last hour