SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tophat Exon -intron coverage mehtaaditya RNA Sequencing 4 11-01-2014 03:59 AM
Agilent human exon coverage plots SMO Genomic Resequencing 9 11-25-2012 07:14 AM
finding exon numbers in fasta exon file efoss Bioinformatics 1 10-20-2011 04:57 PM
Alignment at exon-exon junctions Boel RNA Sequencing 2 12-09-2010 12:12 PM
Coverage for exon nvteja Bioinformatics 1 02-02-2010 10:35 AM

Reply
 
Thread Tools
Old 02-19-2014, 10:32 AM   #1
frankyue50
Member
 
Location: CA

Join Date: Nov 2008
Posts: 34
Default exon coverage by coverageBed

Hello everyone,

So I just want to compute the average coverage per base for our exome-seq. First I collected all the exons in a bed file, say exon.bed and it looks like this:

chr1 11873 12227
chr1 12594 12721

I also have an exam seq bam file, and what I did is:

samtools view -b bamfile.bam | coverageBed -abam stdin -b exon.bed -d > report, which looks like this:
chr1 161480623 161480746 1 0
chr1 161480623 161480746 2 0
chr1 161480623 161480746 3 0
chr1 161480623 161480746 4 0
chr1 161480623 161480746 5 0
chr1 161480623 161480746 6 0

But the thing is the last column is always zero. What did I do wrong? Thank you guys for your help!
frankyue50 is offline   Reply With Quote
Old 02-19-2014, 10:51 AM   #2
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,079
Default

Your chromosome names seem to match between the bed file and bam file so that can't be the problem. That was not the case.

Did you create/edit the bed file on a PC/Mac and then move it to unix server? I wonder if the file format differences is causing the problem you are seeing.

Last edited by GenoMax; 02-19-2014 at 11:17 AM.
GenoMax is offline   Reply With Quote
Old 02-19-2014, 10:55 AM   #3
frankyue50
Member
 
Location: CA

Join Date: Nov 2008
Posts: 34
Default

this is from samtools view reads.bam:
name 163 1 10001 29 39S25M37S = 10026 126 ...
Looks like a normal bam file to me

Quote:
Originally Posted by GenoMax View Post
Your chromosome names seem to match between the bed file and bam file so that can't be the problem.

Did you create/edit the bed file on a PC/Mac and then move it to unix server? I wonder if the file format differences is causing the problem you are seeing.
frankyue50 is offline   Reply With Quote
Old 02-19-2014, 11:03 AM   #4
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,079
Default

Quote:
Originally Posted by frankyue50 View Post
this is from samtools view reads.bam:
name 163 1 10001 29 39S25M37S = 10026 126 ...
Looks like a normal bam file to me
Your reference file seems to have chromosome names as "1" as opposed to chr1. If all the chromosomes do not have "chr" in front then you could edit your bed file accordingly.
GenoMax is offline   Reply With Quote
Old 02-19-2014, 11:10 AM   #5
frankyue50
Member
 
Location: CA

Join Date: Nov 2008
Posts: 34
Default

I guess that's the reason... I print out the bed file from bam and things worked out.

Thanks, GenoMax!

Quote:
Originally Posted by GenoMax View Post
Your reference file seems to have chromosome names as "1" as opposed to chr1. If all the chromosomes do not have "chr" in front then you could edit your bed file accordingly.
frankyue50 is offline   Reply With Quote
Reply

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 11:28 AM.


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