Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge branch 'dev' into 'main' - Metaphor v1.7.11 #71

Merged
merged 7 commits into from
Mar 5, 2024
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 metaphor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__email__ = "17276653+vinisalazar@users.noreply.github.com"
__license__ = "MIT"
__copyright__ = "The University of Melbourne 2023"
__version__ = "1.7.10"
__version__ = "1.7.11"

__doc__ = """
Metaphor top-level module. This is the entrypoint for the `cli`, `config`, and `workflow` packages.
Expand All @@ -13,7 +13,7 @@

# Snakemake wrapper version
# This should match the latest released tag on: https://github.com/snakemake/snakemake-wrappers
wrapper_version = "v3.3.3"
wrapper_version = "v3.4.1"
wrapper_prefix = "https://github.com/snakemake/snakemake-wrappers/raw/"

github_url = "https://github.com/vinisalazar/metaphor"
Expand Down
2 changes: 1 addition & 1 deletion metaphor/workflow/envs/python-utils.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- bioconda
dependencies:
- biopython
- pandas>=2
- pandas>=2.1
- python>=3.9
- seaborn
- seqstats # This has to be here because assembly_report.py runs it from Python
7 changes: 4 additions & 3 deletions metaphor/workflow/rules/annotation.smk
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ rule prokka:
outfile="output/annotation/prokka/{binning_group}/{bin}/{bin}.fna",
params:
outdir=lambda w, output: str(Path(output.outfile).parent),
kingdom_cmd=lambda w, input: f"grep '{w.bin}' {input.bin_evals}",
args=config["prokka"]["args"],
args=config["prokka"]["args"] + " --centre X --compliant",
wildcard_constraints:
binning_group="|".join(binning_group_names),
threads: get_threads_per_task_size("small")
Expand All @@ -94,7 +93,9 @@ rule prokka:
shell:
"""
# Get kingdom from bin eval file
kingdom=$({params.kingdom_cmd} | cut -f 5)
bin_clean=$(echo {wildcards.bin} | sed 's/_sub$//g') # Remove '_sub' from corrected bins
kingdom=$(grep $bin_clean {input.bin_evals} | cut -f 5)
kingdom=$(echo $kingdom | cut -f 1 -d ' ')
kingdom=$(echo $kingdom | head -c 1 | tr '[a-z]' '[A-Z]'; echo $kingdom | tail -c +2)

prokka --outdir {params.outdir} \
Expand Down
2 changes: 1 addition & 1 deletion metaphor/workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ def get_prokka_output():
bins_dict = {}
for group in binning_group_names:
bins_dict[group] = glob(
f"output/binning/DAS_tool/{group}/DAS_tool_DASTool_bins/*"
f"output/binning/DAS_tool/{group}/{group}_DASTool_bins/*"
)

for group, list_of_bins in bins_dict.items():
Expand Down
6 changes: 6 additions & 0 deletions metaphor/workflow/rules/qc.smk
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ rule fastqc_raw: # qc on raw, unmerged reads
html="output/qc/fastqc/{sample}-{unit}-{read}-raw.html",
params:
"--quiet",
resources:
mem_mb=10000 if get_max_mb(0.5) > 10000 else get_max_mb(0.5),
wildcard_constraints:
sample="|".join(sample_IDs),
unit="|".join(unit_names),
Expand All @@ -127,6 +129,8 @@ rule fastqc_trimmed: # qc on trimmed reads
output:
zip="output/qc/fastqc/{sample}-{unit}-{read}-trimmed_fastqc.zip",
html="output/qc/fastqc/{sample}-{unit}-{read}-trimmed.html",
resources:
mem_mb=10000 if get_max_mb(0.5) > 10000 else get_max_mb(0.5),
params:
"--quiet",
wildcard_constraints:
Expand All @@ -151,6 +155,8 @@ rule fastqc_merged: # qc on trimmed, merged reads
output:
zip="output/qc/fastqc/{sample}-{read}-merged_fastqc.zip",
html="output/qc/fastqc/{sample}-{read}-merged.html",
resources:
mem_mb=10000 if get_max_mb(0.5) > 10000 else get_max_mb(0.5),
params:
"--quiet",
wildcard_constraints:
Expand Down
Loading