Hello all,
To analyze my Rna-Seq samples, I am following new Tuxedo suite pipeline (https://github.com/griffithlab/rnaseq_tutorial/wiki/Alignment)
I have paired end reads in two lanes. I used hisat2 to align the reads (of course separate for each lane) and got two sam files for the lanes.
EGG04_L004.sam
EGG04_L005.sam
Then I used
samtools sort -@ 8 -o EGG04_L004.bam EGG04_L004.sam
samtools sort -@ 8 -o EGG04_L005.bam EGG04_L005.sam
to convert the sam files to bam files and sort by aligned position. Now I am wondering whether I need to merge the files from two lanes to one using samtools merge and then merge all the bam files together as the next step to I can directly go ahead and merge all the mab files regardless to the bam files from different lanes. since the pipeline recommends to merge the files using picard.
If I need to first merge the bam files from two lanes together what would be the recommended command for samtools merge?
You will need to re-sort the files after you merge them.