Skip to content

Commit

Permalink
salmon_index: Build tar archive outside source directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
rekado committed May 24, 2024
1 parent a669397 commit 7a2641b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion snakefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,14 @@ def hisat2_file_arguments(args):
params:
salmon_index_dir = os.path.join(OUTPUT_DIR, 'salmon_index')
log: os.path.join(LOG_DIR, "salmon", 'salmon_index.log')
shell: "({SALMON_INDEX_EXEC} -t {input[0]} -i {params.salmon_index_dir} -p {SALMON_INDEX_THREADS} && cd {params.salmon_index_dir} && tar cf {output.tar}.temp . && mv {output.tar}.temp {output.tar}) >> {log} 2>&1"
shell: "(tmp=$(mktemp) && \
{SALMON_INDEX_EXEC} -t {input[0]} \
-i {params.salmon_index_dir} \
-p {SALMON_INDEX_THREADS} && \
mkdir -p $(dirname {output.tar}) && \
cd {params.salmon_index_dir} && \
tar cf $tmp . && \
mv $tmp {output.tar}) >> {log} 2>&1"

rule salmon_quant:
input:
Expand Down

0 comments on commit 7a2641b

Please sign in to comment.