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!
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