Skip to content

Commit

Permalink
Try to fix unselected files cleaning on GH
Browse files Browse the repository at this point in the history
  • Loading branch information
weber8thomas committed Jun 24, 2024
1 parent 397e170 commit 11c1985
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
12 changes: 11 additions & 1 deletion workflow/rules/count.smk
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,17 @@ rule remove_unselected_bam:
"../envs/mc_base.yaml"
shell:
"""
rm {input.bam} {input.bai}
# Show labels
cat {input.labels}
# echo bam
echo {input.bam}
# Show bai
echo {input.bai}
# Remove unselected bam & bai
# Check if bam and bai are not empty, then remove them
if [ -s {input.bam} ] && [ -s {input.bai} ]; then
rm {input.bam} {input.bai}
fi
"""


Expand Down
12 changes: 12 additions & 0 deletions workflow/rules/utils.smk
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ rule save_config:
rule save_conda_versions_mc_base:
output:
"{folder}/{sample}/config/conda_export/mc_base.yaml",
log:
"{folder}/log/save_conda_versions/{sample}/mc_base.log",
conda:
"../envs/mc_base.yaml"
shell:
Expand All @@ -168,6 +170,8 @@ rule save_conda_versions_mc_base:
rule save_conda_versions_mc_bioinfo_tools:
output:
"{folder}/{sample}/config/conda_export/mc_bioinfo_tools.yaml",
log:
"{folder}/log/save_conda_versions/{sample}/mc_bioinfo_tools.log",
conda:
"../envs/mc_bioinfo_tools.yaml"
shell:
Expand All @@ -177,6 +181,8 @@ rule save_conda_versions_mc_bioinfo_tools:
rule save_conda_versions_rtools:
output:
"{folder}/{sample}/config/conda_export/rtools.yaml",
log:
"{folder}/log/save_conda_versions/{sample}/rtools.log",
conda:
"../envs/rtools.yaml"
shell:
Expand All @@ -186,6 +192,8 @@ rule save_conda_versions_rtools:
rule save_conda_versions_scNOVA_bioinfo_tools:
output:
"{folder}/{sample}/config/conda_export/scNOVA_bioinfo_tools.yaml",
log:
"{folder}/log/save_conda_versions/{sample}/scNOVA_bioinfo_tools.log",
conda:
"../envs/scNOVA/scNOVA_bioinfo_tools.yaml"
shell:
Expand All @@ -195,6 +203,8 @@ rule save_conda_versions_scNOVA_bioinfo_tools:
rule save_conda_versions_scNOVA_DL:
output:
"{folder}/{sample}/config/conda_export/scNOVA_DL.yaml",
log:
"{folder}/log/save_conda_versions/{sample}/scNOVA_DL.log",
conda:
"../envs/scNOVA/scNOVA_DL.yaml"
shell:
Expand All @@ -204,6 +214,8 @@ rule save_conda_versions_scNOVA_DL:
rule save_conda_versions_scNOVA_R:
output:
"{folder}/{sample}/config/conda_export/scNOVA_R.yaml",
log:
"{folder}/log/save_conda_versions/{sample}/scNOVA_R.log",
conda:
"../envs/scNOVA/scNOVA_R.yaml"
shell:
Expand Down

0 comments on commit 11c1985

Please sign in to comment.