I have been trying to generate sorted.bam files. but haven't been successful. each time I get numerous sorted.bam files individually and I want to merge them into one big sorted.bam. The following command was what is used to obtain this multiple bamfiles.
-S dustMapping.sam && samtools view -S -b dustMapping.sam -o dustMapping.bam && samtools sort dustMapping.bam -odustMapping.sorted.bam && samtools index dustMapping.sorted.bam -o dustMapping.sorted.bam.bai && rm dustMapping.sam && dustMapping.bam
I don't know if the sorting was completed and why and the program terminates after outputting the sorted bam files. I have tried to merge with the following command.
bamtools merge -list folder.bam -out sorted.bam and I got a 64byte sorted.bam output file. what could be wrong please? (Im a Beginner) Thanks