Calculating Depth From A List Of Bam Files
0
0
Entering edit mode
10.7 years ago
Maria333 ▴ 20

Hi everyone,

Since I am very new to Linux I would really appreciate a bit of help. I am using samtools depth to calculate the depth from a list of bam files i have already downloaded. Even though I get the outputs, I get zeros only when calculating the depth which is not normal. This means all my samples have no deletions, duplications or any other problems. Can anyone think of what the problem might be?

Thank you in advance

samtools • 5.0k views
ADD COMMENT
3
Entering edit mode

You could also try using the genomecov tool in BEDtools:

bedtools genomecov -d -ibam your_file.bam > output.txt
ADD REPLY
1
Entering edit mode

Could you give an example of the command you're using and the output you're receiving?

ADD REPLY
0
Entering edit mode

Thank you for your reply. Basically it's not just a command, I have written a script in R and connect that to Linux. But the final command is:

samtools depth -b $region -f bamlist > depth.txt

The output I'm receiving has all the samples as the first row and underneath there are columns full of zeros instead of 1 or 2 etc.

ADD REPLY
0
Entering edit mode

Do you receive the same results if you do that directly from the command line? Does this occur for all regions and what do things look like if you just open the files in IGV and look at one of the regions?

ADD REPLY
0
Entering edit mode

I run everything on the shell anyway but I am only using one region. The option "$region" is because I have specified the region before in the script i.e region="..". Also I am not using IGV for now.

ADD REPLY
0
Entering edit mode

Right, have a look at that region in IGV or some other viewer (or even samtools view -c somefile.bam region) to see if this is reasonable output or not. You haven't given us enough information to be able to determine if this is the correct result or not.

ADD REPLY
0
Entering edit mode

I will do that, thank you very much for your replies anyway!

ADD REPLY

Login before adding your answer.

Traffic: 2744 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