Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sequana_pipelines/lora/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ apptainers:
medaka: https://zenodo.org/record/7846295/files/medaka_1.7.3.img
miniasm: https://zenodo.org/record/13550867/files/miniasm_0.3.0.img
mosdepth: https://zenodo.org/record/12805460/files/mosdepth_0.3.8.img
multiqc: https://zenodo.org/record/10205070/files/multiqc_1.16.0.img
multiqc: https://zenodo.org/record/17100751/files/multiqc_1.27.0-zenodo1.img
necat: https://zenodo.org/record/13907089/files/necat_0.0.1.img
pecat: https://zenodo.org/record/13942767/files/pecat_0.0.3.img
pbindex: https://zenodo.org/record/7817189/files/pbbam_2.3.0.img
Expand Down Expand Up @@ -463,7 +463,7 @@ fastp:
min_length_required: 1000
threads: 4
resources:
mem: 4G
mem: 8G



Expand Down
11 changes: 6 additions & 5 deletions sequana_pipelines/lora/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ def convert(self, value, param, ctx):
"--do-circlator",
"circlator",
default=False,
is_flag=True,
help="Run circlator after assembler. Useful with Canu, Hifiasm. Flye is suppose to perform circularisation.",
)
@click.option("--do-coverage", "do_coverage", is_flag="store_true", help="Run sequana coverage on contigs.")
Expand All @@ -176,7 +177,7 @@ def convert(self, value, param, ctx):
"--busco-lineage",
"lineage",
type=BUSCO_OR_DIR,
help="Lineage or path to lineage file for BUSCO. Note that we support only version 5 of the BUSCO lineage. If the lineage is not a valid path, we download it locally. This may take time. Full list is on https://github.com/sequana/lora//wiki/busco",
help="Lineage or path to lineage file for BUSCO. Note that we support only version 5 of the BUSCO lineage. If the lineage is not a valid path, we download it locally. The full list is available on https://github.com/sequana/lora/wiki/busco . For bacteria, you may simply use 'bacteria'",
)
@click.option(
"--checkm-rank",
Expand Down Expand Up @@ -353,7 +354,7 @@ def main(**options):
cfg.circlator["do"] = True if options.circlator else False
if options.assembler == "canu" and options.circlator is False:
logger.warning(
"\U0001F449 \u2757 Canu would higly benefit for circlator. However, you did not set it. please conider using --circlator."
"\U0001F449 \u2757 Canu would higly benefit for circlator. However, you did not set it. please conider using --do-circlator."
)

# blast
Expand Down Expand Up @@ -407,11 +408,11 @@ def main(**options):

def _convert(x):
if x.endswith("k"):
x = int(x.strip("k")) * 1000
x = int(float(x.strip("k")) * 1000)
elif x.endswith("m"):
x = int(x.strip("m")) * 1000000
x = int(float(x.strip("m")) * 1000000)
elif x.endswith("g"):
x = int(x.strip("g")) * 1000000000
x = int(float(x.strip("g")) * 1000000000)
else:
x = int(x.strip())
return x
Expand Down
11 changes: 10 additions & 1 deletion sequana_pipelines/lora/rules/ccs.smk
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,16 @@ rule fastp:
"{sample}/logs/fastp.log",
shell:
"""
fastp --in1 {input} --length_required {params.min_length_required} --out1 {output} --disable_adapter_trimming --disable_quality_filtering --html {output.html} --json {output.json} --thread {threads} 2>&1 > {log}
# reduce RAM usage by first streaming from disk instead of fully loading
# bam_to_fastq does not compress the data

if [[ "{input}" == *.gz ]]; then
catcmd="zcat"
else
catcmd="cat"
fi

$catcmd {input} | fastp -i /dev/stdin --length_required {params.min_length_required} --out1 {output} --disable_adapter_trimming --disable_quality_filtering --html {output.html} --json {output.json} --thread {threads} 2>&1 > {log}
"""


Expand Down
2 changes: 1 addition & 1 deletion sequana_pipelines/lora/rules/scaffold.smk
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ rule ragtag_scaffold:
config['apptainers']['ragtag']
shell:
"""
ragtag_scaffold.py {input.ctg} {input.ref} -w -o {wildcards.sample}/ragtag_scaffold 2>{log}
ragtag_scaffold.py {input.ref} {input.ctg} -w -o {wildcards.sample}/ragtag_scaffold 2>{log}
"""

1 change: 1 addition & 0 deletions sequana_pipelines/lora/src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def checkm_version_parser(stdout: str):
1: {
"seqtk": seqtk_version_parser,
},
255: {},
}
APPTAINER_CORRESPONDANCE = {
"canu_correction": "canu",
Expand Down