This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Varscan Somatic...Syntax To Run With Redirect?

i am running a java inside my perl code. As follows: Varscan somatic takes 2 parameters. Each parameter is an executable line by itself which gives an output. That output is used as an input for the varscan somatic java part. I am doing the following:

$n_p = "samtools view -b -u -q 1 $n_b | samtools pileup -f $r -";
$t_p = "samtools view -b -u -q 1 $t_b | samtools pileup -f $r -";

bash -c \"java -jar VarScan.v2.2.jar somatic <\($n_p\) <\($t_p\) output

I am running the code on a unix machine.The above code gives me error. i want the $n_p and $t_p output to be fed into the java.

Does anybody have a comment as to what the correct syntax is.

Thanks

varscan samtools

2 answers

You'll need to modify the absolute paths, etc., but I use little shell script takes the parameters from the command line and uses fifos (named pipes) to eliminate the need to make large pileup files. The script is here.

excellent...this seems to be working....i will keep you posted..!

try:

samtools view -b -u -q 1 $n_b | samtools pileup -f $r - >  normal.pileup
samtools view -b -u -q 1 $t_b | samtools pileup -f $r - >  tumor.pileup
java -jar VarScan.v2.2.jar somatic normal.pileup  tumor.pileup output

This approach will create 2 massive pileup and when i am running the java part..the process is killed ,i guess becasue of I/O..etc. Any suggestions!

Log in to answer this question.