Skip to content

Commit

Permalink
Secondary alignments confuse downstream
Browse files Browse the repository at this point in the history
- Minimap2 includes secondary alignment in its output (useful for
  debugging)
- As spacing-saving feature these do not repeat the SEQ and QUAL from
  the primary alignment
  - This breaks COJAC and SmallGenomeUtilities
  • Loading branch information
DrYak committed Dec 18, 2023
1 parent af119b6 commit 841b2ec
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion config/config.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions workflow/envs/minimap_align.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ channels:
- bioconda
- defaults
dependencies:
- minimap2=2.24
- samtools=1.10
- minimap2=2.26
- samtools=1.19
1 change: 1 addition & 0 deletions workflow/rules/align.smk
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@ elif config.general["aligner"] == "minimap":
SEED="--seed 42",
EXTRA=config.minimap_align["extra"],
PRESET=config.minimap_align["preset"],
SECONDARY="--secondary=yes --secondary-seq" if config.minimap_align["secondary"] else "--secondary=no",
FILTER="-f 2" if config.input["paired"] else "-F 4",
MINIMAP=config.applications["minimap"],
SAMTOOLS=config.applications["samtools"],
Expand Down
6 changes: 6 additions & 0 deletions workflow/schemas/config_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,12 @@
"description": "Specify minimap2 preset options. See [minimape's documentation](https://lh3.github.io/minimap2/minimap2.html#8) for details about each of the presets.",
"examples": ["map-ont"]
},
"secondary": {
"type": "boolean",
"default": false,
"description": "By default V-pipe ignores Minimap2's secondary alignment(s) and only considers the primary one (A secondary alignment occurs when a given read could align reasonably well to more than one place). This flags turns back on Minimap2's secondary alignments, and also includes their sequences in the output BAM file.",
"examples": [ true ]
},
"conda": {
"type": "string",
"default": "{VPIPE_BASEDIR}/envs/minimap_align.yaml"
Expand Down

0 comments on commit 841b2ec

Please sign in to comment.