How to pipe samtools mileup with varscan trio caller?
0
6
Entering edit mode
21 months ago
dare_devil ★ 1.6k

I have seen piping samtools with varscan as follows

samtools mpileup -f reference.fasta sample1.bam sample2.bam | java -jar VarScan.jar mpileup2snp

But how to pipe the following pipeline for varscan trio

#Generate a three-sample mpileup
samtools mpileup -B -q 1 \
     -f ref.fasta \
     dad.bam mom.bam child.bam > trio.mpileup

#Run VarScan trio
varscan trio \
     trio.mpileup \ #this is input
     trio.mpileup.output \ #this is output
     --min-coverage 10 --min-var-freq 0.20 --p-value 0.05 \ 
     -adj-var-freq 0.05 -adj-p-value 0.15
varscan samtools pipe • 859 views
ADD COMMENT
2
Entering edit mode

A lot of tools allow for - to stand in for STDIN. I'm not sure of this, but I think it's a shell feature. Try that.

samtools mpileup -B -q 1 \
     -f ref.fasta \
     dad.bam mom.bam child.bam | varsan trio - trio.mpileuup.output....

More relevant reading: https://unix.stackexchange.com/questions/16357/usage-of-dash-in-place-of-a-filename

ADD REPLY
1
Entering edit mode

Update: The command has run successfully. But, there is difference in the output provided by both steps.

Number of de novo without pipe is 66 where as in pipe it 1292.

ADD REPLY
1
Entering edit mode

That's odd. Maybe open an issue/talk to varscan developers? You may want to dig deeper and see what's unique about the 66 captured - maybe they're closer together on the pileup output (I'm just going with a wild guess).

ADD REPLY
0
Entering edit mode

Thanks!!. It has started running. I'll compare the ouputs of both command and verify

ADD REPLY

Login before adding your answer.

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