Skip to content

Commit b8f03ae

Browse files
committed
Merge branch 'make-it-work-again'
2 parents 4a08bde + c19f461 commit b8f03ae

File tree

7 files changed

+22
-14
lines changed

7 files changed

+22
-14
lines changed

envs/abricate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: abricate
22
channels:
3-
- defaults
43
- conda-forge
54
- bioconda
5+
- defaults
66
dependencies:
77
- abricate=1.0.1

envs/ariba.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: ariba
22
channels:
3-
- defaults
43
- conda-forge
54
- bioconda
5+
- defaults
66
dependencies:
77
- ariba=2.14.6

envs/csstar.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: csstar
22
channels:
3-
- bioconda
43
- conda-forge
4+
- bioconda
55
- defaults
66
dependencies:
77
- biopython
88
- nomkl
9-
- python=2.7.18
10-
- blast=2.10.1
9+
- python<3.0
10+
- blast

envs/groot.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: groot
22
channels:
3-
- bioconda/label/cf201901
4-
- defaults
53
- conda-forge
64
- bioconda
5+
- defaults
76
dependencies:
87
- seqkit
98
- groot=1.1.2

envs/hamronization_workflow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ channels:
44
- bioconda
55
- defaults
66
dependencies:
7-
- snakemake=8.25.5
7+
- snakemake=8.26.0

envs/staramr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: staramr
22
channels:
3-
- defaults
43
- conda-forge
54
- bioconda
5+
- defaults
66
dependencies:
77
- staramr=0.7.2
88
- pandas==1.2.5

rules/deeparg.smk

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ rule get_deeparg_db:
1111
# we use wget -c so an incomplete download will resume (it is 1.8G)
1212
wget -cO '{params.db_zip}' 'https://zenodo.org/records/8280582/files/deeparg.zip?download=1'
1313
unzip -d "$(dirname '{output.db_dir}')" '{params.db_zip}'
14+
rm -f '{params.db_zip}'
1415
"""
1516

1617
rule run_deeparg_fna:
@@ -55,11 +56,19 @@ rule run_deeparg_fqs:
5556
version = "1.0.4"
5657
shell:
5758
"""
58-
mkdir -p '{params.out_dir}'
59-
deeparg short_reads_pipeline --forward_pe_file '{input.read1}' --reverse_pe_file '{input.read2}' -d '{input.db_dir}' --output_file '{params.out_dir}/output' >{log} 2>&1
60-
mv '{params.out_dir}/output.clean.deeparg.mapping.ARG' '{params.out_dir}/output.mapping.ARG'
61-
mv '{params.out_dir}/output.clean.deeparg.mapping.potential.ARG' '{params.out_dir}/output.mapping.potential.ARG'
62-
rm -f '{params.out_dir}/output.clean.deeparg'.*
59+
mkdir -p '{params.out_dir}/tmp'
60+
# Create symlinks to the reads in the output/tmp directory, because deeparg leaves behind huge
61+
# temporary files both in the (possibly read-only) input directory and in the output directory.
62+
ln -srft '{params.out_dir}/tmp' '{input.read1}' '{input.read2}'
63+
deeparg short_reads_pipeline -d '{input.db_dir}' \
64+
--forward_pe_file "{params.out_dir}/tmp/$(basename '{input.read1}')" \
65+
--reverse_pe_file "{params.out_dir}/tmp/$(basename '{input.read2}')" \
66+
--output_file '{params.out_dir}/tmp/output' >{log} 2>&1
67+
# Move the final outputs out of the tmp directory and rename to what they should be
68+
mv -f '{params.out_dir}/tmp/output.clean.deeparg.mapping.ARG' '{output.report}'
69+
mv -f '{params.out_dir}/tmp/output.clean.deeparg.mapping.potential.ARG' '{output.report_potential}'
70+
rm -rf '{params.out_dir}/tmp'
71+
# Write the metadata file for hamronizer
6372
echo "--input_file_name '{input.read1}' --analysis_software_version '{params.version}' --reference_database_version '{params.version}'" >{output.metadata}
6473
"""
6574

0 commit comments

Comments
 (0)