This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Get unique alignment stats from SAM file with a combined genome

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.

rna-seq alignment genome

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 use samtools 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.

they share the same chromosomes

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.

0 answers

No answers yet.

Log in to answer this question.