Skip to content

Commit 5b7c1a5

Browse files
committed
camper is not ready to use
1 parent 846e857 commit 5b7c1a5

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
Version 0.3.*:
55
--------------
6+
32: Adjusted the Output ruleset for contig_annotate__camper and moved from folder to concrete files
67
31: Apply proteinortho now on the set of proteins obtains from the different MAG sets
78
30: Added bakta annotation for each MAG separately instead of applying it to one dereplicated MAG-set only
89
29: Summary tables for Diamond added

workflow/Snakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import pandas as pd
77
import yaml
88
import os
99

10-
version = "0.3.31"
10+
version = "0.3.32"
1111

1212
# Import configuration files (as defined in the main configuration)
1313
params = yaml.load(open(config["params-file"], "r"), Loader=yaml.SafeLoader)

workflow/rules/contig_annotate/camper.smk

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@ rule contig_annotate__camper__annotate:
33
input:
44
fa=CONTIG_PRODIGAL / "{assembly_id}/{assembly_id}.prodigal.fa",
55
output:
6-
annotation = directory(CONTIG_CAMPER / "{assembly_id}")
6+
annotation = CONTIG_CAMPER / "{assembly_id}" / "annotations.tsv",
7+
distillate = CONTIG_CAMPER / "{assembly_id}" / "distillate.tsv",
78
log:
89
CONTIG_CAMPER / "{assembly_id}.log",
910
conda:
1011
"__environment__.yml"
1112
container:
1213
docker["camper"]
1314
params:
14-
out_dir=CAMPER,
15+
camper_dir = CONTIG_CAMPER,
16+
out_dir = lambda wildcards: f"{CONTIG_CAMPER}/{wildcards.assembly_id}",
1517
camper_db=features["databases"]["camper"],
1618
nvme=config["nvme_storage"],
1719
threads: config["resources"]["cpu_per_task"]["multi_thread"]
@@ -26,24 +28,29 @@ rule contig_annotate__camper__annotate:
2628
cp {params.camper_db}/* {params.nvme} \
2729
2>> {log} 1>&2
2830
31+
tmpdir={params.out_dir}/tmp
32+
2933
camper_annotate -i {input} \
30-
-o {output} \
34+
-o $tmpdir \
3135
--threads {threads} \
3236
--camper_fa_db_loc {params.nvme}/CAMPER_blast.faa \
33-
--camper_fa_db_cutoffs_loc {params.nvme}/CAMPER_blast_scores.tsv \
34-
--camper_hmm_loc {params.nvme}/CAMPER.hmm \
37+
--camper_fa_db_cutoffs_loc {params.nvme}/CAMPER_blast_scores.tsv \
38+
--camper_hmm_loc {params.nvme}/CAMPER.hmm \
3539
--camper_hmm_cutoffs_loc {params.nvme}/CAMPER_hmm_scores.tsv \
3640
2>> {log} 1>&2
3741
38-
camper_distill -a {output}/annotations.tsv \
39-
-o {output}/distillate.tsv \
40-
--camper_distillate {params.nvme}/CAMPER_distillate.tsv \
42+
camper_distill -a $tmpdir/annotations.tsv \
43+
-o {output.distillate} \
44+
--camper_distillate {params.nvme}/CAMPER_distillate.tsv \
4145
2>> {log} 1>&2
4246
47+
# Move all tmp files one level up
48+
mv "$tmpdir"/* {params.out_dir}/
49+
4350
"""
4451

4552

4653
rule contig_annotate__camper:
4754
"""Run CAMPER on contig gene sequences."""
4855
input:
49-
[CONTIG_CAMPER / f"{assembly_id}" for assembly_id in ASSEMBLIES],
56+
[CONTIG_CAMPER / f"{assembly_id}" / "annotations.tsv" for assembly_id in ASSEMBLIES],

0 commit comments

Comments
 (0)