Question: Samtools: Why Have I Been Using "View" Command For Mpileup
gravatar for axelwilhelm
8.3 years ago by
axelwilhelm100 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 • 2.9k views
ADD COMMENTlink modified 8.3 years ago by Istvan Albert ♦♦ 86k • written 8.3 years ago by axelwilhelm100
gravatar for Ashutosh Pandey
8.3 years ago by
Ashutosh Pandey12k 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 8.3 years ago • written 8.3 years ago by Ashutosh Pandey12k
gravatar for Istvan Albert
8.3 years ago by
Istvan Albert ♦♦ 86k
University Park, USA
Istvan Albert ♦♦ 86k 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 8.3 years ago by Istvan Albert ♦♦ 86k
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: 1063 users visited in the last hour