Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
multichip-snakemake
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Andrey ARISTOV
multichip-snakemake
Commits
0ff77ecc
Commit
0ff77ecc
authored
2 years ago
by
Andrey Aristov
Browse files
Options
Downloads
Patches
Plain Diff
remove conversion, combine directly nd2
parent
2b178663
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Snakefile
+11
-3
11 additions, 3 deletions
Snakefile
combine.py
+4
-3
4 additions, 3 deletions
combine.py
with
15 additions
and
6 deletions
Snakefile
+
11
−
3
View file @
0ff77ecc
...
...
@@ -18,7 +18,7 @@ rule align_and_count:
input:
data="{folder}/day{day}/BF_TRITC_maxZ.zarr",
concentrations="{folder}/concentrations.yaml",
template="template
16_pad100-adj-sm2
.tif",
template="
v3/
template
_bin16_v3
.tif",
labels="v3/labels_bin2_v4.tif"
output:
zarr = directory("{folder}/day{day}/BF_TRITC_aligned.zarr"),
...
...
@@ -26,6 +26,14 @@ rule align_and_count:
shell:
"python align.py {input.data} {output.zarr} {input.concentrations} {input.template} {input.labels} {output.table} 1"
rule correct_xy:
input:
zarr = "{folder}/day{day}/BF_TRITC_aligned-to-correct.zarr",
table = "{folder}/day{day}/correction.csv"
output:
zarr = directory("{folder}/day{day}/BF_TRITC_aligned-corrected.zarr")
shell:
"python correct.py {input.zarr} {input.table} {output.zarr}"
rule align_and_count_2D:
input:
...
...
@@ -50,8 +58,8 @@ rule get_sizes_nd2:
rule combine_BF_TRITC_3D_maxZ:
input:
bf="{folder}/day{day}/BF-2D.
zarr
",
fluo="{folder}/day{day}/TRITC-3D.
zarr
"
bf="{folder}/day{day}/BF-2D.
nd2
",
fluo="{folder}/day{day}/TRITC-3D.
nd2
"
output:
directory("{folder}/day{day}/BF_TRITC_maxZ.zarr")
shell:
...
...
This diff is collapsed.
Click to expand it.
combine.py
+
4
−
3
View file @
0ff77ecc
...
...
@@ -2,11 +2,12 @@ import dask.array as da
import
os
from
zarr_tools.convert
import
to_zarr
import
fire
import
nd2
def
combine
(
BF_
zarr_
2D_path
:
str
,
TRITC_
zarr_
3D_path
:
str
,
out_zarr_path
:
str
):
bd2d
=
da
.
from_zarr
(
os
.
path
.
join
(
BF_zarr_2D_path
,
'
0/
'
)
)
def
combine
(
BF_2D_path
:
str
,
TRITC_3D_path
:
str
,
out_zarr_path
:
str
):
bd2d
=
nd2
.
ND2File
(
BF_2D_path
).
to_dask
(
)
print
(
'
Opened BF:
'
,
bd2d
)
fd3d
=
da
.
from_zarr
(
os
.
path
.
join
(
TRITC_
zarr_
3D_path
,
'
0/
'
)
)
fd3d
=
nd2
.
ND2File
(
TRITC_3D_path
).
to_dask
(
)
print
(
'
Opened TRITC:
'
,
fd3d
)
fd2d
=
fd3d
.
max
(
axis
=
1
)
bd2d
=
da
.
stack
([
bd2d
,
fd2d
],
axis
=
1
)
...
...
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