Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snakemake-workflows
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FIJI
snakemake-workflows
Commits
6a6f5394
Commit
6a6f5394
authored
9 years ago
by
schmiedc
Browse files
Options
Downloads
Plain Diff
Merge pull request #14 from mpicbg-scicomp/master
Fixed first job bug and added Email
parents
497b2d11
decfbe46
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
spim_registration/timelapse/Snakefile
+12
-4
12 additions, 4 deletions
spim_registration/timelapse/Snakefile
spim_registration/timelapse/timelapse_utils.py
+16
-0
16 additions, 0 deletions
spim_registration/timelapse/timelapse_utils.py
with
28 additions
and
4 deletions
spim_registration/timelapse/Snakefile
+
12
−
4
View file @
6a6f5394
import os, glob, sys, re
from timelaps_utils import produce_xml_merge_job_files, produce_string, padding_of_file_id
from timelaps
e
_utils import produce_xml_merge_job_files, produce_string, padding_of_file_id
, glob_and_escape
#where are we (can be configured through -d/--directory flag)
JOBDIR=os.path.abspath(os.path.curdir)
...
...
@@ -8,6 +8,7 @@ if JOBDIR[-1] != "/": # this checks if jobdir ends with slash if not it adds a s
# Test config file single Channel:
configfile: "single_test.yaml"
# Test config file dual channel one channel contains beads:
# configfile: "dual_OneChannel.yaml"
...
...
@@ -24,8 +25,7 @@ xml_merge_in = produce_xml_merge_job_files(datasets)
rule done:
input: [ ds + "_output_hdf5" for ds in datasets ]
#input: [ ds + "_fusion" for ds in datasets ]
localrules: define_xml_czi, define_xml_tif, hdf5_xml, xml_merge, timelapse,
duplicate_transformations, external_transform, define_output,
hdf5_xml_output
...
...
@@ -37,7 +37,7 @@ rule resave_prepared:
# defining xml for czi dataset
rule define_xml_czi:
input:glob
.glob('
*.czi
'
), config["common"]["first_czi"]
input:
glob
_and_escape("
*.czi
"
), config["common"]["first_czi"]
output: config["common"]["first_xml_filename"] + ".xml"
log: "logs/a1_define_xml_czi.log"
run:
...
...
@@ -514,3 +514,11 @@ rule distclean:
message : os.path.abspath(os.path.curdir) + ": rm -rf {params}"
shell : "rm -rf {params}"
# NOTE! The following enables mailing, which will send out a mail once an entire workflow is done (the below does not include anything in the message body, redirect from /dev/null)
# onsuccess:
# shell("mail -s \"[SUCCESS] our_cluster:{jdir} finished \" xxx@mpi-cbg.de < /dev/null".format(jdir=JOBDIR))
# onerror:
# shell("mail -s \"[ERROR] out_cluster:{jdir}\" xxx@mpi-cbg.de < /dev/null".format(jdir=JOBDIR))
This diff is collapsed.
Click to expand it.
spim_registration/timelapse/timelaps_utils.py
→
spim_registration/timelapse/timelaps
e
_utils.py
+
16
−
0
View file @
6a6f5394
import
re
import
os
import
math
import
glob
def
produce_xml_merge_job_files
(
_datasets
):
fre
=
re
.
compile
(
r
'
(?P<xml_base>\w+)-(?P<file_id>\d+)-00.h5
'
)
...
...
@@ -31,3 +32,18 @@ def padding_of_file_id(_n_timepoints):
return
2
else
:
return
value
def
glob_and_escape
(
_glob_string
):
"""
escaping all brackets in filenames
"""
value
=
glob
.
glob
(
_glob_string
)
translate_table
=
{
'
(
'
:
'
\(
'
,
'
)
'
:
'
\)
'
}
for
index
in
range
(
len
(
value
)):
for
(
k
,
v
)
in
translate_table
.
items
():
value
[
index
]
=
value
[
index
].
replace
(
k
,
v
)
return
value
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment