samtools mpileup: how to output qname (read id) along with other information
1
0
Entering edit mode
5.5 years ago
luu.p.loi • 0

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 • 2.0k views
ADD COMMENT
0
Entering edit mode
5.5 years ago

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

ADD COMMENT
0
Entering edit mode

Many thanks! I will try and return with feedback.

ADD REPLY

Login before adding your answer.

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