Map with minimap2, no secondary alignment

I want to align nanopore sequences to a genoma with no secondary alignment. I s the parameter --secondary in the minimap2 available in galaxy.eu? I do not find the parameter… Should I use _N=0 instead?
Thanks

Welcome, @Pedro_Pedro

The N flag is for the mapping step. It is part of the chain of mappings used to define the problem space when exploring what that final alignment should consider. Then the tool reports a pairwise result – the best fit hit between the query versus the target (where “target” is the reduced space based on those initial mappings).

But … maybe check this yourself? Run the tool a few times, then generate some BAM statistics on the results. Maybe you can learn exactly how this tool performs on your own reads – and how the defaults differ from your custom settings (and, these can be combined!). The default parameter sets are just a place to start.

The tool form has a simplified sort of “cheat sheet” that seems worth posting here for some extra context.



Algorithm overview

In the following, minimap2 command line options have a dash ahead and are highlighted in bold. The description may help to tune minimap2 parameters.

  1. Read -I [=4G] reference bases, extract (-k,-w)-minimizers and index them in a hash table.
  2. Read -K [=200M] query bases. For each query sequence, do step 3 through 7:
  3. For each (-k,-w)-minimizer on the query, check against the reference index. If a reference minimizer is not among the top -f [=2e-4] most frequent, collect its the occurrences in the reference, which are called seeds.
  4. Sort seeds by position in the reference. Chain them with dynamic programming. Each chain represents a potential mapping. For read overlapping, report all chains and then go to step 8. For reference mapping, do step 5 through 7:
  5. Let P be the set of primary mappings, which is an empty set initially. For each chain from the best to the worst according to their chaining scores: if on the query, the chain overlaps with a chain in P by –mask-level [=0.5] or higher fraction of the shorter chain, mark the chain as secondary to the chain in P; otherwise, add the chain to P.
  6. Retain all primary mappings. Also retain up to -N [=5] top secondary mappings if their chaining scores are higher than -p [=0.8] of their corresponding primary mappings.
  7. If alignment is requested, filter out an internal seed if it potentially leads to both a long insertion and a long deletion. Extend from the left-most seed. Perform global alignments between internal seeds. Split the chain if the accumulative score along the global alignment drops by -z [=400], disregarding long gaps. Extend from the right-most seed. Output chains and their alignments.
  8. If there are more query sequences in the input, go to step 2 until no more queries are left.
  9. If there are more reference sequences, reopen the query file from the start and go to step 1; otherwise stop.


Hope this helps! :scientist: