Hello
I am mapping reads from bacterial sequences to reference genomes and I am using bwa and samtools. I am trying to set up a pipeline and want to use stdin and stdout and pipe the data to avoid temporary files. I am using samtools-0.1.13.
Do you know if you can get the output of samtools sort to stdout?
The manual pages says that the -o option means stdout for samtools sort , but it doesn't seem to work on my system.
Here is the command line I have used to make quality filtering and sorting in one line and the error message I get:
>samtools view -b -q 30 5139_6_7.paired_ends.bam | samtools sort -o - > temp
Usage: samtools sort [-on] [-m <maxMem>] <in.bam> <out.prefix>
>samtools view -b -q 30 5139_6_7.paired_ends.bam | samtools sort - - > temp
And this makes as expected an empty temp file and the sorted alignment in "-.bam"
Do you know how I can avoid the *.bam output file?
Thanks
Peder Worning
I am mapping reads from bacterial sequences to reference genomes and I am using bwa and samtools. I am trying to set up a pipeline and want to use stdin and stdout and pipe the data to avoid temporary files. I am using samtools-0.1.13.
Do you know if you can get the output of samtools sort to stdout?
The manual pages says that the -o option means stdout for samtools sort , but it doesn't seem to work on my system.
Here is the command line I have used to make quality filtering and sorting in one line and the error message I get:
>samtools view -b -q 30 5139_6_7.paired_ends.bam | samtools sort -o - > temp
Usage: samtools sort [-on] [-m <maxMem>] <in.bam> <out.prefix>
>samtools view -b -q 30 5139_6_7.paired_ends.bam | samtools sort - - > temp
And this makes as expected an empty temp file and the sorted alignment in "-.bam"
Do you know how I can avoid the *.bam output file?
Thanks
Peder Worning
Comment