niaid / image_portal_workflows

Workflows related to project previously referred to as "Hedwig"
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

PERF: Combine newstack commands which apply transforms. #187

Closed blowekamp closed 1 year ago

blowekamp commented 1 year ago

The following three commands are run:

 newstack -x {WORKDIR}/align.xg {WORKDIR}/Source.mrc {WORKDIR}/Align.mrc
 newstack -x {WORKDIR}/stretch.xf {WORKDIR}/aligned.mrc {WORKDIR}/corrected.mrc
 newstack -meansd 150,40 -mo 0 corrected.mrc {BASENAME}.mrc

The newstack command can accept multiple -x/-xform arguments. These three steps could be combined into

newstack -x {WORKDIR}/align.xg -x {WORKDIR}/stretch.xf -meansd 150,40 -mo 0 {WORKDIR}/Source.mrc {WORKDIR}/{BASENAME}.mrc
philipmac commented 1 year ago

Not understanding this assuming input mrc is: source.mrc the idea is we replace the above three steps with:

newstack -x align.xg -x stretch.xf -meansd 150,40 -mo 0 source.mrc out.mrc

seeing: ERROR: NEWSTACK - OPENING OR READING TRANSFORM FILE

philipmac commented 1 year ago

see: https://github.com/niaid/image_portal_workflows/tree/combine_newstack