Skip to content

Commit

Permalink
Add -Y to minimap2 by default
Browse files Browse the repository at this point in the history
Expose `--minimap2_args` on the command line.
  • Loading branch information
DonFreed committed Sep 17, 2024
1 parent 9e49edb commit ee26dea
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sentieon_cli/command_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ def cmd_samtools_fastq_minimap2(
sample_name: str,
input_ref: Optional[pathlib.Path] = None,
fastq_taglist: str = "*",
minimap2_args: str = "-Y",
util_sort_args: str = "--cram_write_options version=3.0,compressor=rans",
) -> str:
"""Re-align an input BAM/CRAM/uBAM/uCRAM file with minimap2"""
Expand Down Expand Up @@ -288,6 +289,7 @@ def cmd_samtools_fastq_minimap2(
"-t",
str(cores),
"-a",
minimap2_args,
"-x",
f"{model_bundle}/minimap2.model",
str(reference),
Expand Down Expand Up @@ -434,6 +436,7 @@ def cmd_fastq_minimap2(
model_bundle: pathlib.Path,
cores: int,
unzip: str = "gzip",
minimap2_args: str = "-Y",
util_sort_args: str = "--cram_write_options version=3.0,compressor=rans",
) -> str:
"""Align an input fastq file with minimap2"""
Expand All @@ -449,6 +452,7 @@ def cmd_fastq_minimap2(
"-t",
str(cores),
"-a",
minimap2_args,
"-x",
f"{model_bundle}/minimap2.model",
"-R",
Expand Down
9 changes: 9 additions & 0 deletions sentieon_cli/dnascope_longread.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def align_inputs(
skip_version_check: bool = False,
bam_format: bool = False,
fastq_taglist: str = "*",
minimap2_args: str = "-Y",
util_sort_args: str = "--cram_write_options version=3.0,compressor=rans",
input_ref: Optional[pathlib.Path] = None,
**_kwargs: Any,
Expand Down Expand Up @@ -107,6 +108,7 @@ def align_inputs(
sample_name,
input_ref,
fastq_taglist,
minimap2_args,
util_sort_args,
)
)
Expand All @@ -124,6 +126,7 @@ def align_fastq(
readgroups: Optional[List[str]] = None,
skip_version_check: bool = False,
bam_format: bool = False,
minimap2_args: str = "-Y",
util_sort_args: str = "--cram_write_options version=3.0,compressor=rans",
**_kwargs: Any,
) -> List[pathlib.Path]:
Expand Down Expand Up @@ -166,6 +169,7 @@ def align_fastq(
model_bundle,
cores,
unzip,
minimap2_args,
util_sort_args,
)
)
Expand Down Expand Up @@ -726,6 +730,10 @@ def mosdepth(
help="Use the BAM format instead of CRAM for output aligned files",
action="store_true",
)
@arg(
"--minimap2_args",
help="Extra arguments for sentieon minimap2",
)
@arg(
"--util_sort_args",
help="Extra arguments for sentieon util sort",
Expand Down Expand Up @@ -766,6 +774,7 @@ def dnascope_longread(
input_ref: Optional[pathlib.Path] = None,
fastq_taglist: str = "*", # pylint: disable=W0613
bam_format: bool = False, # pylint: disable=W0613
minimap2_args: str = "-Y", # pylint: disable=W0613
util_sort_args: str = (
"--cram_write_options version=3.0,compressor=rans"
), # pylint: disable=W0613
Expand Down

0 comments on commit ee26dea

Please sign in to comment.