lh3 / minimap2

A versatile pairwise aligner for genomic and spliced nucleotide sequences
https://lh3.github.io/minimap2
Other
1.75k stars 404 forks source link

Supplementary alignments (v.2.17) are now secondary alignments (v.2.24) #1094

Closed leitnerei closed 1 year ago

leitnerei commented 1 year ago

Hi,

Since I have updated from minimap2(v.2.17) to minimap2(v.2.24) supplementary alignments are now specified as secondary alignments.

We perform CRISPR/Cas9 targeted nanopore sequencing to identify transgene integration sites. What we are doing is to sequence recombinant cell lines that have a transgene stably integrated in a known integration site. We design crRNAs against the genome slightly up or downstream of the transgene integration site and sequence over the transgene integration site to obtain the correct sequence of the integrated transgenic sequence.
All reads that start at the crRNA cut site have the same pattern: the first part of the read will align against genomic portion, the second part against the transgenic sequence, and the third part again against the genomic portion.

We are mapping the reads against the reference sequence of that organism combined with the transgenic sequence in fasta format.

The command is: minimap2 -ax map-ont ref_trans.fasta in.fastq > out.sam

With minimap2(v.2.17) the reads mentioned above have a pattern similar to:
Primary ali (genome) – supplementary ali (transgene) – supplementary ali (genome)

With minimap2(v.2.24): Primary ali (genome) with an insertion of ~5000 bp and a secondary alignment to the transgene portion. Which means the chimeric read is not recognized anymore as a chimeric read, but as a complete alignment to the genomic portion with a huge insertion.

My guess it has something to do with release v.2.19 “Improvement: more contiguous alignment through long INDELs”

Is there anyway to get the same result as with v.2.17 without using this particular version?

Thanks in advance and I hope this post makes sense!

lh3 commented 1 year ago

You may try to reduce the bandwidth and disable the long-gap mode with, for example

minimap2 -ax map-ont -r 500,500
leitnerei commented 1 year ago

Great! Thanks a lot that worked perfectly fine!