Hello,
I would like to count the number of reads aligning per viruses in my sample based on the output of minimap2 in a bam file.
Does anyone how to proceed?
By using the command: samtools view -f 2 ech22ReadsViralSorted.bam
, I am able to see the alignments, but I am unsure about how to process the file.
Attached is the link to download the sample ech22ReadsViralSorted.bam
Thank you!
All virus sequences are in a single file, which means that in the minimap2 output, I need to know the aligned viruses and the number of reads aligned for each virus
If the reference is a multi-fasta file in following format
then run the command I posted below. It will show you all reference sequence names and reads aligned to each.