This is a test version of Biostars. For the public version, visit https://www.biostars.org.
HISAT2 output direct to bam sorted

Hi all, I am mapping my samples to a reference genome with HISAT2 and I was wondering if it is possible to get the outputs in bam format and also if it is possible to sort by coordinates directly?

Could you help me modify my command?

hisat2 --dta -x genome -1 ../fastq_zea_mays/SRR214880_1.fastq -2 ../fastq_zea_mays/SRR214880_2.fastq -S SRR214880.sam
sorted hisat2 bam to output direct

1 answer

hisat2 --dta -x genome -1 ../fastq_zea_mays/SRR214880_1.fastq -2 ../fastq_zea_mays/SRR214880_2.fastq \
| samtools sort -o sorted.bam

Thanks so much, what is the function of "\" ?

It's just a line break so I can write code into two lines for readability and structure. It's not necessary for function.

thanks very much

Log in to answer this question.