Question: Samtools: Why Have I Been Using "View" Command For Mpileup
gravatar for axelwilhelm
5.0 years ago by
axelwilhelm90 wrote:

This is a basic question so maybe someone can make the best of it and explain some basic details so that newbies can benefit from it.

I have been using samtools commands from other people that I think know what their doing.

The commands I have been giving are view piped to mpileup

samtools view -u someones.bam chrY:2709520-57443438 | samtools mpileup -B -Q reference.fa - > outfile.txt

I tried to run the mpileup command without view and it's just as fast.

Why would I want to pipe view to mpileup?

samtools mpileup • 1.7k views
ADD COMMENTlink modified 5.0 years ago by Istvan Albert ♦♦ 74k • written 5.0 years ago by axelwilhelm90
gravatar for Ashutosh Pandey
5.0 years ago by
Ashutosh Pandey11k wrote:

I assume you can specify "chrY:2709520-57443438" as a region parameter in mpileup and it should do the same work for you (I have never tried it). For example: samtools mpileup -r STR will only generate pileup in region STR , default - all sites. May be the guy from whom you borrowed the code didn't know this OR may be mpileup didn't have region(-r) functionality at that time.
I know this doesn't answer your question directly but this is all I could come up with. Also using -u command will produce uncompressed bam or SAM format stream.

ADD COMMENTlink modified 5.0 years ago • written 5.0 years ago by Ashutosh Pandey11k
gravatar for Istvan Albert
5.0 years ago by
Istvan Albert ♦♦ 74k
University Park, USA
Istvan Albert ♦♦ 74k wrote:

The format that you have allows one to add more filters to the sam view before passing it to mpileup. That usually is a very common operation when investigating data by some property.

ADD COMMENTlink written 5.0 years ago by Istvan Albert ♦♦ 74k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1293 users visited in the last hour