diff --git a/sequana_pipelines/lora/config.yaml b/sequana_pipelines/lora/config.yaml index 3f435d1..73da277 100644 --- a/sequana_pipelines/lora/config.yaml +++ b/sequana_pipelines/lora/config.yaml @@ -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 @@ -463,7 +463,7 @@ fastp: min_length_required: 1000 threads: 4 resources: - mem: 4G + mem: 8G diff --git a/sequana_pipelines/lora/main.py b/sequana_pipelines/lora/main.py index 59cb258..c384e23 100644 --- a/sequana_pipelines/lora/main.py +++ b/sequana_pipelines/lora/main.py @@ -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.") @@ -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", @@ -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 @@ -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 diff --git a/sequana_pipelines/lora/rules/ccs.smk b/sequana_pipelines/lora/rules/ccs.smk index b240909..90fc08a 100644 --- a/sequana_pipelines/lora/rules/ccs.smk +++ b/sequana_pipelines/lora/rules/ccs.smk @@ -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} """ diff --git a/sequana_pipelines/lora/rules/scaffold.smk b/sequana_pipelines/lora/rules/scaffold.smk index 3cb409e..2f11d6e 100644 --- a/sequana_pipelines/lora/rules/scaffold.smk +++ b/sequana_pipelines/lora/rules/scaffold.smk @@ -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} """ diff --git a/sequana_pipelines/lora/src/utils.py b/sequana_pipelines/lora/src/utils.py index 72d9ce1..287d483 100644 --- a/sequana_pipelines/lora/src/utils.py +++ b/sequana_pipelines/lora/src/utils.py @@ -49,6 +49,7 @@ def checkm_version_parser(stdout: str): 1: { "seqtk": seqtk_version_parser, }, + 255: {}, } APPTAINER_CORRESPONDANCE = { "canu_correction": "canu",