I want to run the following code inside a bash script:
java -jar VarScan.v2.2.jar somatic < samtools view -b -u -q 1 $n_b \
| samtools pileup -f $r - < samtools view -b -u -q 1 $t_b \
| samtools pileup -f $r - output
where $n_b and $t_b are files.
The java somatic function takes 2 paramters. so
samtools view -b -u -q 1 $n_b | samtools pileup -f $r
is one of the parameters and
samtools view -b -u -q 1 $t_b | samtools pileup -f $r
is the other paramter. Both the parameters are executable themselves.
So what i want is
samtools view -b -u -q 1 $n_b | samtools pileup -f $r -
execute first then
samtools view -b -u -q 1 $t_b | samtools pileup -f $r
and the output becomes the input for the somatic.
The solution to my question is found at:
https://gist.github.com/1022747