Question: samtools mpileup: how to output qname (read id) along with other information
0
gravatar for luu.p.loi
3.7 years ago by
luu.p.loi0
Australia
luu.p.loi0 wrote:

Dear All,

I use samtools mpileup as following

samtools mpileup -O -r chr1:10915996-10915996 E13VA.clip.bam

---------------------------------------------------------------------
[mpileup] 1 samples in 1 input files
<mpileup> Set max per-file depth to 8000
chr1    10915996    N    4    CCCt    BFFF    95,95,86,79
----------------------------------------------------------------------

I want the qname (read id) in the output too as the below example. Are there any options which can tell samtools mpileup to output the qname (read id) as well? for example

-----------------------------------------------------------------------------------------------------------------------
[mpileup] 1 samples in 1 input files
<mpileup> Set max per-file depth to 8000
chr1    10915996    N    4    CCCt    BFFF      95,95,86,79    read01,read02,read03,read04
-----------------------------------------------------------------------------------------------------------------------

In the case, there is no option to do like that. Could anyone please can help me figure out what is the flag (filter out some reads) which samtools mpileup uses to extract these reads? I need the flag for samtools view to extract the same qname (read id) at the same genome position then plug them in with samtools mpileup output with the hope they are in the same order.

samtools view E13VA.clip.bam chr1:10915996-10915996| cut -d$"\t" -f1

Thank you so much for your help.

Any suggestions are more than welcome!

 

snp samtools mpipleup rnaseq • 1.4k views
ADD COMMENTlink modified 3.7 years ago by Pierre Lindenbaum120k • written 3.7 years ago by luu.p.loi0
0
gravatar for Pierre Lindenbaum
3.7 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum120k wrote:

instead of mpileup you could use my tool sam2tsv : https://github.com/lindenb/jvarkit/wiki/SAM2Tsv

ADD COMMENTlink written 3.7 years ago by Pierre Lindenbaum120k

Many thanks! I will try and return with feedback.

ADD REPLYlink written 3.7 years ago by luu.p.loi0
Please log in to add an answer.

Help
Access

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