File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -55,11 +55,19 @@ rule run_deeparg_fqs:
55
55
version = "1.0.4"
56
56
shell :
57
57
"""
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'.*
58
+ mkdir -p '{params.out_dir}/tmp'
59
+ # Create symlinks to the reads in the output/tmp directory, because deeparg leaves behind huge
60
+ # temporary files both in the (possibly read-only) input directory and in the output directory.
61
+ ln -srft '{params.out_dir}/tmp' '{input.read1}' '{input.read2}'
62
+ deeparg short_reads_pipeline -d '{input.db_dir}' \
63
+ --forward_pe_file "{params.out_dir}/tmp/$(basename '{input.read1}')" \
64
+ --reverse_pe_file "{params.out_dir}/tmp/$(basename '{input.read2}')" \
65
+ --output_file '{params.out_dir}/tmp/output' >{log} 2>&1
66
+ # Move the final outputs out of the tmp directory and rename to what they should be
67
+ mv -f '{params.out_dir}/tmp/output.clean.deeparg.mapping.ARG' '{output.report}'
68
+ mv -f '{params.out_dir}/tmp/output.clean.deeparg.mapping.potential.ARG' '{output.report_potential}'
69
+ rm -rf '{params.out_dir}/tmp'
70
+ # Write the metadata file for hamronizer
63
71
echo "--input_file_name '{input.read1}' --analysis_software_version '{params.version}' --reference_database_version '{params.version}'" >{output.metadata}
64
72
"""
65
73
You can’t perform that action at this time.
0 commit comments