pysamstats icon indicating copy to clipboard operation
pysamstats copied to clipboard

Pysamstats: supplementary alignments

Open martina811 opened this issue 4 years ago • 1 comments

Hi everybody. I have used pysamstat to calculate some statistics on my bam file. I saw on IGV that in the region of interest of bam file, where I used pysamstats, I have a lot of supplementary alignments. I would kindly like to know if the field "reads_all" counts also the supplementary alignments to calculate the coverage.

Thank you all!

martina811 avatar Feb 09 '21 09:02 martina811

Hi @martina811, short answer is I don't know for sure. If you are using the pileup-based statistics then these are all driven by the pysam pileup() method. I think that it will depend on the stepper argument and/or the flag_filter argument. In pysamstats the default stepper value given is "all", and we don't set the flag_filter argument so will be pysam default which is BAM_FUNMAP | BAM_FSECONDARY | BAM_FQCFAIL | BAM_FDUP. This does not include the supplementary alignment flag, so I think supplementary alignments should be counted in the "reads_all" field. Hth.

alimanfoo avatar Feb 09 '21 09:02 alimanfoo