Coverage information of the read using samtool
2
0
Entering edit mode
6.9 years ago
madhu.9124 ▴ 60

Hi, I want to obtain coverage information of the read using samtool. I gave the following command- ./samtools stats -c mappedreversecomp.bam . I got an error "Unable to parse -c mappedreversecomp.bam" Kindly help in identifying the mistake.

Thanks Madhu

alignment • 4.3k views
ADD COMMENT
0
Entering edit mode

Please validate questions for past answers/comments you have received for your past questions. Up-voting/accepting (green check mark) answers is the correct way of doing this.

ADD REPLY
0
Entering edit mode

Madhu,

Please follow genomax's advice and do the following for your questions:

If an answer was helpful you should upvote it, if the answer resolved your question you should mark it as accepted. Upvote|Bookmark|Accept

ADD REPLY
1
Entering edit mode
6.9 years ago
Ram 44k
  • It's samtools, not "samtool"
  • Unless you're operating out of a directory where both the samtools binary and the file mappedreversecomp.bam are both accessible, you're doing it wrong. You should be in the directory that has the BAM file and samtools should be in your $PATH, with you executing samtools stats -c ./mappedreversecomp.bam
  • Please format your question better. Use the code button to your advantage.

If you're using Ubuntu, use sudo apt-get install samtools to install samtools. cd to your directory that has the BAM file and then use the command I mentioned above.

ADD COMMENT
1
Entering edit mode
6.9 years ago

The help is the first place you should look:

$ samtools stats
About: The program collects statistics from BAM files. The output can be visualized using plot-bamstats.
Usage: samtools stats [OPTIONS] file.bam
       samtools stats [OPTIONS] file.bam chr:from-to
Options:
    -c, --coverage <int>,<int>,<int>    Coverage distribution min,max,step [1,1000,1]

Looks like samtools stats is expecting 3 numbers to follow the -c. You didn't put any.

ADD COMMENT

Login before adding your answer.

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