Entering edit mode
5.3 years ago
Viz
▴
50
As the title states, I have sam/bam files from alignments of our reads against an index built from two fastA genomes concatenated. From these sam files, how would I go about finding out which reads aligned to chromosome1-X in species 1 and which reads aligned to chromsome1-X in species 2.
Use Qualimap, if you want visual results of alignments. You can also use
samtools idxstats
to get a quick recap of alignment stats.If you actually want to extract reads that are aligning to specific chromosomes then use
bazam
(https://github.com/ssadedin/bazam ). You cal also usesamtools view
along with an intervals file in BED format.Since they share the same chromosomes idxstats gives the total alignments to both, I'll check out bazam and Qualimap though and report back if they work for me, thank you.
In that case, there is no way to distinguish the alignments unless your reads have index sequences (distinct for individual species). Another thing to keep in mind. Not all aligners retain index sequence information (they may drop remainder of the string after a white space in fastq header) in the resulting SAM/BAM file. I know that
bbmap.sh
from BBMap suite retrains this information.