Entering edit mode
2.5 years ago
Jimpix
▴
10
Hi! I would like to ask what is the difference between commands bellow. This wrote in oneliner:
bowtie2 -x {input.index} -U {input.fastq} | samtools view -bS -> {output}
and this two:
bowtie2 -x {input.index} -U {input.fastq} -S {output}
samtools view -u {input} -o {output}
or this is the same or the first one is shorter?
Thanks! for the clear explanation
One more question. Why the final bam file is much bigger (about 70%) when I use the second commands, those with support sam files?
that is mean that bam in not always comprased type of file?
Hi! No problem. I have never used -u myself. Here you can read the manual of samtools, which says the same as what @GenoMax has pointed out, and also
This option saves time spent on compression/decompression and is thus preferred when the output is piped to another samtools command.
I guess the output is a SAM file instead of a BAM file, or some kind of uncompressed file, and that is why is bigger. You can try to see the content of the file. A BAM file is always compressed.