Finding gene ontology terms for a list of genes
0
0
Entering edit mode
4.3 years ago
evelyn ▴ 230

Hello,

I have done a gene enrichment analysis for a list of 2000 genes using PANTHER where 300 genes were not mapped. I have got 825 Gene Ontology terms for mapped genes. Result looks like:

Category ID Mapped IDs
GO:00064 EnsemblGenome=cg0879|EnsemblGenome=cg08248|EnsemblGenome=cg07778|EnsemblGenome=cg00577|EnsemblGenome=cg01332|

where each GO term represents several genes for them. However, I want result in vice-versa form which might looks like:

Gene      GO terms 
cg0879    GO:00064  GO:00078  GO:00089  GO:00101

Is there a way in PANTHER to get result in a form I want. Thank you for your help!

gene • 1.1k views
ADD COMMENT
1
Entering edit mode

You can try out this perl one liner. It splits the second field by | then again by = to get the gene name, then appends the GO to each with a tab. In the end prints gene with GO categories.

perl -lane 'BEGIN{%store}{my %store=map {$store{[split /=/,$_]->[-1]}.="\t".$F[0]} (split /\|/,$F[1]); }END{foreach(keys %store){print $_,join("\t",$store{$_}) }}' test.tsv

ADD REPLY

Login before adding your answer.

Traffic: 1532 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6