a-slide / NanoCount

EM based transcript abundance from nanopore reads mapped to a transcriptome with minimap2
https://a-slide.github.io/NanoCount/
MIT License
53 stars 5 forks source link

ERROR: No valid secondary alignments found in bam file. Were the reads aligned with minimap `-p 0 -N 10` options ? #35

Closed lborcard closed 5 months ago

lborcard commented 5 months ago

Hello,

thank you for the software! I am testing it as we speak it throwing an error which I cannot seem to fix following the instructions.

## Checking options and input files ##
## Initialise Nanocount ##
        Parse Bam file and filter low quality alignments
        Summary of alignments parsed in input bam file
                Discarded unmapped alignments: 543,714
                Discarded negative strand alignments: 5,949
                Discarded alignment with invalid 3 prime end: 2,667
                Discarded supplementary alignments: 2,273
                Valid alignments: 582
                Discarded short alignments: 6
ERROR: No valid secondary alignments found in bam file. Were the reads aligned with minimap `-p 0 -N 10` options ?
        Summary of reads filtered
                Reads with valid best alignment: 516
                Reads with low query fraction aligned: 66
        Generate initial read/transcript compatibility index
## Start EM abundance estimate ##
        Progress: 2.00 rounds [00:00, 1.21k rounds/s]
        Exit EM loop after 2 rounds
        Convergence value: 0.0
## Summarize data ##
        Convert results to dataframe
        Compute estimated counts and TPM
        Write file

NanoCount v1.0.0.post6 I am using a small portion of the reads is this the reason why it's not working?

best,

Loïc

josiegleeson commented 5 months ago

Hi Loïc, did you filter your output for primary alignments only? This might be why. Otherwise the subset you've provided may only include primary alignments. Make sure you're providing a transcriptome mapped BAM with secondary alignments. Hope that helps!