Hi, so I am trying to create a pipeline right now which calls the mpileup command and then pipes the output into the tool iVar which I am using to both call the variants (snps/indels) and consensus sequence from the data. To do so you must first run the mpileup command and then pipe it's output into either ivar consensus
or ivar variants
.
Being that mpileup is a fairly intensive and time consuming process to run and the parameters I am using on the mpileup are identical each time I am trying to find a way to see if I can pipe the outputs of the mpileup to both the ivar consensus
and ivar variants
without having to run mpileup twice. My current attempt to do this was to try the && option with:
samtools mpileup -Q 20 -B -aa -d 25000 -f + ref_Seq + bam_file | ivar consensus -p out_fasta -q 20 -t 0.1 -n N && ivar variants -q 20 -t 0.1 out_tsv ref_Seq
But this only leads to the 'ivar consensus' command having the mpileup piped into it, does anyone have any ideas or solutions to achieve this?
Thanks!