SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Annotate diff file with Entrez gene ID Parharn Bioinformatics 2 03-06-2014 09:13 AM
How to annotate genes from gene prediction mictadlo Bioinformatics 0 09-17-2013 05:56 PM
Re-Annotate legacy gene predictions Amative Bioinformatics 6 04-28-2013 09:50 AM
how to run tophat without gtf file and annotate the gene mehtaaditya Bioinformatics 0 03-19-2013 08:53 AM

Reply
 
Thread Tools
Old 09-10-2015, 04:14 AM   #1
BM7
Junior Member
 
Location: London

Join Date: Jul 2015
Posts: 1
Default Annotate gene list

I would like to annotate the results output file from Desq2 so it contains gene names and symbols. The RNA-seq count file I have used comes from Dexseq and contains ensembl gene IDs:
ENSMUSG00000000001:001
ENSMUSG00000000001:002
ENSMUSG00000000001:003
etc.
These refer to the the different exons of the gene.
I cannot annotate the result file because it contains the different exons. So how can I combine or merge the different exon counts for the same gene into one count for the gene?
Thanks in advance
BM7 is offline   Reply With Quote
Old 09-11-2015, 05:46 AM   #2
cmccabe
Senior Member
 
Location: chicago

Join Date: Jul 2012
Posts: 349
Default

I am not sure I understand completely, but if you have a file

Code:
ENSMUSG00000000001:001
ENSMUSG00000000001:002
ENSMUSG00000000001:003
ENSMUSG00000000002:001
ENSMUSG00000000002:002
ENSMUSG00000000002:002

you could use:

Code:
awk -F':' -v OFS='\t' '{sum[$1]+=$2} END{for (key in sum) print key, sum[key]}' file.txt
ENSMUSG00000000001      6
ENSMUSG00000000002      5
Hope this helps.

Last edited by cmccabe; 09-11-2015 at 06:10 AM. Reason: added awk
cmccabe is offline   Reply With Quote
Reply

Tags
annotation, count, deseq2, ensemble id, map ids

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 04:07 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO