Entering edit mode
9.9 years ago
jyu429
▴
120
Hi,
I'm wondering how one would go about streaming the followings samtools commands without the intermediate bam and sam files.
samtools view -F 4 -b in.bam > filtered.bam
samtools sort filtered.bam filtered_sorted
samtools view filtered_sorted.bam > filtered_sorted.sam
awk -F "\t" '{print $3}' filtered_sorted.sam > rnames.txt
I'd appreciate any help!
Thank you! But was there something wrong with the prior answer you had?
If you really care only about the final output, you could simply do: