Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Blaise LI
bioinfo_utils
Commits
7b21ecbe
Commit
7b21ecbe
authored
Oct 04, 2018
by
Blaise Li
Browse files
Added --delete option to rsync on success.
This is to limit clutter from old analyses.
parent
6fcd8adc
Changes
7
Hide whitespace changes
Inline
Side-by-side
CLIP/iCLIP.snakefile
View file @
7b21ecbe
...
...
@@ -720,7 +720,7 @@ rule make_normalized_bigwig:
onsuccess:
print("iCLIP data analysis finished.")
cleanup_and_backup(output_dir, config)
cleanup_and_backup(output_dir, config
, delete=True
)
onerror:
shell(f"rm -rf {output_dir}_err")
...
...
Degradome-seq/Degradome-seq.snakefile
View file @
7b21ecbe
...
...
@@ -59,7 +59,7 @@ CONTRAST2PAIR = dict(zip(DD_CONTRASTS, DD_COND_PAIRS))
# TODO: have a distinct subset of biotypes for join_all_counts, that are guaranteed overlap-free.
BIOTYPES = config["biotypes"]
ORIENTATIONS = ["all"]
ORIENTATIONS = ["all"
, "fwd", "rev"
]
aligner = config["aligner"]
alignment_settings = {
...
...
@@ -516,7 +516,7 @@ rule compute_efficiency_difference:
onsuccess:
print("Degradome-seq analysis finished.")
cleanup_and_backup(output_dir, config)
cleanup_and_backup(output_dir, config
, delete=True
)
onerror:
shell(f"rm -rf {output_dir}_err")
...
...
PRO-seq/PRO-seq.snakefile
View file @
7b21ecbe
...
...
@@ -1687,7 +1687,7 @@ rm -rf ${{tmpdir}}
onsuccess:
print("PRO-seq analysis finished.")
cleanup_and_backup(output_dir, config)
cleanup_and_backup(output_dir, config
, delete=True
)
onerror:
shell(f"rm -rf {output_dir}_err")
...
...
RNA_Seq_Cecere/RNA-seq.snakefile
View file @
7b21ecbe
...
...
@@ -2020,7 +2020,7 @@ rule make_contrast_lfc_boxplots:
onsuccess:
print("RNA-seq analysis finished.")
cleanup_and_backup(output_dir, config)
cleanup_and_backup(output_dir, config
, delete=True
)
onerror:
shell(f"rm -rf {output_dir}_err")
...
...
Ribo-seq/Ribo-seq.snakefile
View file @
7b21ecbe
...
...
@@ -3467,7 +3467,7 @@ def try_to_cluster_genes(counts_data):
onsuccess:
print("small RNA-seq analysis finished.")
cleanup_and_backup(output_dir, config)
cleanup_and_backup(output_dir, config
, delete=True
)
onerror:
...
...
libworkflows/libworkflows/libworkflows.py
View file @
7b21ecbe
...
...
@@ -128,7 +128,7 @@ def wc_applied(source_function):
return
wc_applied_source_func
def
cleanup_and_backup
(
output_dir
,
config
):
def
cleanup_and_backup
(
output_dir
,
config
,
delete
=
False
):
"""Performs cleanup and backup according to the information present in the
*config* dictionary."""
print
(
"removing metadata"
)
...
...
@@ -142,6 +142,10 @@ def cleanup_and_backup(output_dir, config):
# If no dest_dir, we assume the directory structure
# is the same on the destination host
dest_dir
=
config
[
"backup"
].
get
(
"dest_dir"
,
os
.
getcwd
())
if
delete
:
rsync_options
=
"-vaP --delete"
else
:
rsync_options
=
"-vaP"
try
:
print
(
f
"backuping results to
{
user
}
@
{
host
}
:
{
dest_dir
}
"
)
shell
(
f
"rsync -vaP
{
output_dir
}
{
user
}
@
{
host
}
:
{
dest_dir
}
"
)
...
...
small_RNA-seq/small_RNA-seq.snakefile
View file @
7b21ecbe
...
...
@@ -4346,7 +4346,7 @@ def try_to_cluster_genes(counts_data):
onsuccess:
print("small RNA-seq analysis finished.")
cleanup_and_backup(output_dir, config)
cleanup_and_backup(output_dir, config
, delete=True
)
onerror:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment