[Swift-commit] r6553 - SwiftTutorials/OHBM_2013-06-16
wilde at ci.uchicago.edu
wilde at ci.uchicago.edu
Fri Jun 14 16:19:58 CDT 2013
Author: wilde
Date: 2013-06-14 16:19:57 -0500 (Fri, 14 Jun 2013)
New Revision: 6553
Modified:
SwiftTutorials/OHBM_2013-06-16/README
SwiftTutorials/OHBM_2013-06-16/apps
SwiftTutorials/OHBM_2013-06-16/apps.beagle
SwiftTutorials/OHBM_2013-06-16/apps.midway
SwiftTutorials/OHBM_2013-06-16/genatlas.swift
SwiftTutorials/OHBM_2013-06-16/sites.xml
SwiftTutorials/OHBM_2013-06-16/swift.properties
Log:
updates for swift version of align() function. Older function is now align_sh().
Modified: SwiftTutorials/OHBM_2013-06-16/README
===================================================================
--- SwiftTutorials/OHBM_2013-06-16/README 2013-06-14 17:13:55 UTC (rev 6552)
+++ SwiftTutorials/OHBM_2013-06-16/README 2013-06-14 21:19:57 UTC (rev 6553)
@@ -48,13 +48,13 @@
swift genatlas.swift # processes data/ directory by default
swift genatlas.swift -d=data_100 # process data_100/ directory
- # With most parallel work on midway westmere parition:
+ # With most parallel work on a midway parition (edit sites.xml to set partition)
swift -tc.file apps.midway genatlas.swift
# From midway to beagle using provider staging:
- swift -config swift.properties.ps -tc.file apps.beagle genatlas.swift -d=data_100
+ swift -config swift.properties.ps -tc.file apps.beagle genatlas.swift -d=data_100
# Choices for -tc.file are:
@@ -62,7 +62,7 @@
apps.beagle # on beagle, 8 nodes
apps.midway # on midway westmere, 1 node
apps.amazon # on Amazon EC2 - needs start-coaster-service, see below
- apps.UC3 # submits to UC3, needs apps to be sent.
+ apps.beagle+midway # both of these
The output files of the workflow are placed under output/,
intermediate files under work/.
@@ -79,5 +79,5 @@
The "aligin" initial stage runs 3 AIR tools under as a single shell
script, to reduce staging between these steps.
+ A swift version of this function is included as well
-
Modified: SwiftTutorials/OHBM_2013-06-16/apps
===================================================================
--- SwiftTutorials/OHBM_2013-06-16/apps 2013-06-14 17:13:55 UTC (rev 6552)
+++ SwiftTutorials/OHBM_2013-06-16/apps 2013-06-14 21:19:57 UTC (rev 6553)
@@ -1,5 +1,9 @@
-localhost sh /bin/sh null null env::AIR5=/home/wilde/software/AIR5.3.0
-#localhost sh /bin/sh
-localhost softmean /home/wilde/software/AIR5.3.0/bin/softmean
-localhost slicer /project/wilde/software/fsl-5.0.4/fsl/bin/slicer null null env::FSLOUTPUTTYPE=NIFTI
-localhost convert convert
+midway sh /bin/sh null null env::AIR5=/home/wilde/software/AIR5.3.0
+#localhost sh /bin/sh
+
+localhost softmean /home/wilde/software/AIR5.3.0/bin/softmean
+localhost alignlinear /home/wilde/software/AIR5.3.0/bin/alignlinear
+localhost align_warp /home/wilde/software/AIR5.3.0/bin/align_warp
+localhost softmean /home/wilde/software/AIR5.3.0/bin/softmean
+localhost slicer /project/wilde/software/fsl-5.0.4/fsl/bin/slicer null null env::FSLOUTPUTTYPE=NIFTI
+localhost convert convert
Modified: SwiftTutorials/OHBM_2013-06-16/apps.beagle
===================================================================
--- SwiftTutorials/OHBM_2013-06-16/apps.beagle 2013-06-14 17:13:55 UTC (rev 6552)
+++ SwiftTutorials/OHBM_2013-06-16/apps.beagle 2013-06-14 21:19:57 UTC (rev 6553)
@@ -1,4 +1,8 @@
-beagle sh /bin/sh null null env::AIR5=/lustre/beagle/wilde/software/AIR5.3.0
-localhost softmean /home/wilde/software/AIR5.3.0/bin/softmean
-localhost slicer /project/wilde/software/fsl-5.0.4/fsl/bin/slicer null null env::FSLOUTPUTTYPE=NIFTI
-localhost convert convert
+beagle sh /bin/sh null null env::AIR5=/lustre/beagle/wilde/software/AIR5.3.0
+beagle alignlinear /lustre/beagle/wilde/software/AIR5.3.0/bin/alignlinear
+beagle align_warp /lustre/beagle/wilde/software/AIR5.3.0/bin/align_warp
+beagle reslice /lustre/beagle/wilde/software/AIR5.3.0/bin/reslice
+
+localhost softmean /home/wilde/software/AIR5.3.0/bin/softmean
+localhost slicer /project/wilde/software/fsl-5.0.4/fsl/bin/slicer null null env::FSLOUTPUTTYPE=NIFTI
+localhost convert convert
Modified: SwiftTutorials/OHBM_2013-06-16/apps.midway
===================================================================
--- SwiftTutorials/OHBM_2013-06-16/apps.midway 2013-06-14 17:13:55 UTC (rev 6552)
+++ SwiftTutorials/OHBM_2013-06-16/apps.midway 2013-06-14 21:19:57 UTC (rev 6553)
@@ -1,4 +1,11 @@
-westmere sh /bin/sh
-localhost softmean /home/wilde/software/AIR5.3.0/bin/softmean
-localhost slicer /project/wilde/software/fsl-5.0.4/fsl/bin/slicer null null env::FSLOUTPUTTYPE=NIFTI
-localhost convert convert
+midway sh /bin/sh null null env::AIR5=/home/wilde/software/AIR5.3.0
+midway alignlinear /home/wilde/software/AIR5.3.0/bin/alignlinear
+midway align_warp /home/wilde/software/AIR5.3.0/bin/align_warp
+midway reslice /home/wilde/software/AIR5.3.0/bin/reslice
+
+localhost softmean /home/wilde/software/AIR5.3.0/bin/softmean
+localhost slicer /project/wilde/software/fsl-5.0.4/fsl/bin/slicer null null env::FSLOUTPUTTYPE=NIFTI
+localhost convert convert
+
+
+
Modified: SwiftTutorials/OHBM_2013-06-16/genatlas.swift
===================================================================
--- SwiftTutorials/OHBM_2013-06-16/genatlas.swift 2013-06-14 17:13:55 UTC (rev 6552)
+++ SwiftTutorials/OHBM_2013-06-16/genatlas.swift 2013-06-14 21:19:57 UTC (rev 6553)
@@ -7,13 +7,10 @@
file image;
};
-# import AIRdefs
-app (Volume alignedVol) align (file script, Volume reference, Volume input)
-{
- sh @script @filename(reference.image) @filename(input.image) @filename(alignedVol.image);
-}
+# import AIR
+
app (Volume atlas) softmean (Volume v[])
{
softmean @filename(atlas.header) "y" "null" @filenames(v);
@@ -29,10 +26,53 @@
convert @i @o;
}
+app (file warp) alignlinear (Volume ref, Volume subject, string params[])
+{
+ alignlinear @filename(ref.header) @filename(subject.header) @filename(warp) params;
+}
+
+app (file warp) alignwarp (Volume ref, Volume subject, file initWarp, string params[])
+{
+ align_warp @filename(ref.header) @filename(subject.header) @filename(warp) "-f" @filename(initWarp) params;
+}
+
+app (Volume v) reslice (file warp, Volume subject)
+{
+ reslice @filename(warp) @filename(v.header) "-a" @filename(subject.header);
+}
+
+
+
+# start of genatlas workflow
+
+file alignScript<"align.sh">;
+ /* This script does:
+ time $AIR5/bin/alignlinear $ref $anat init.warp \
+ -m 15 -t1 55 -t2 55 -x 1 -r 8 -c 0.1 -h 8
+ time $AIR5/bin/align_warp $ref $anat refined.warp \
+ -m 1 12 -b1 .1 .1 .1 -b2 .1 .1 .1 -f init.warp -h 10000 -s 1024 2 2 -c .01 # -v -q -s 1024 2 2 -c .01
+ time $AIR5/bin/reslice refined.warp $resliced -a $anat
+ */
+
+app (Volume alignedVol) align_sh (file script, Volume reference, Volume input)
+{
+ sh @script @filename(reference.image) @filename(input.image) @filename(alignedVol.image);
+}
+
+(Volume alignedVol) native_align (Volume ref, Volume subject)
+{
+ file firstwarp = alignlinear(ref, subject,
+ ["-m","15","-t1","55","-t2","55","-x","1","-r","8","-c","0.1","-h","8"]);
+ file refinedWarp = alignwarp(ref, subject, firstwarp,
+ ["-m","1","12","-b1",".1",".1",".1","-b2",".1",".1",".1",
+ "-h","10000","-s","1024","2","2","-c",".01"]);
+ alignedVol = reslice(refinedWarp,subject);
+}
+
+
# Start code here
string dataDir = @arg("d","data");
-file alignScript<"align.sh">;
Volume referenceVolume<ext; exec="volmapper",name="data/reference">;
Volume inputVolumes []<ext; exec="volmapper",prefix=@strcat(dataDir,"/anatomy")>;
@@ -40,7 +80,8 @@
foreach v, i in inputVolumes {
Volume aligned<ext; exec="volmapper",name=@strcat("work/aligned",i)>;
- aligned = align(alignScript,referenceVolume, v);
+ // aligned = align(alignScript,referenceVolume, v);
+ aligned = native_align(referenceVolume, v);
outputVolumes[i] = aligned;
}
@@ -56,6 +97,12 @@
zSlice = convert(slicer(atlasVolume,"z"));
+
+
+
+
+
+
/******* The following code to be removed
string testNames[] = imageNames(outputVolumes);
Modified: SwiftTutorials/OHBM_2013-06-16/sites.xml
===================================================================
--- SwiftTutorials/OHBM_2013-06-16/sites.xml 2013-06-14 17:13:55 UTC (rev 6552)
+++ SwiftTutorials/OHBM_2013-06-16/sites.xml 2013-06-14 21:19:57 UTC (rev 6553)
@@ -9,11 +9,11 @@
<profile namespace="karajan" key="jobThrottle">.03</profile> <!-- eg .11 -> 12 -->
</pool>
- <pool handle="westmere">
+ <pool handle="midway">
<execution provider="coaster" jobmanager="local:slurm"/>
<!-- Set partition and account here: -->
- <profile namespace="globus" key="queue">westmere</profile>
+ <profile namespace="globus" key="queue">bigmem</profile>
<profile namespace="globus" key="ppn">12</profile>
<!-- <profile namespace="globus" key="project">pi-wilde</profile> -->
Modified: SwiftTutorials/OHBM_2013-06-16/swift.properties
===================================================================
--- SwiftTutorials/OHBM_2013-06-16/swift.properties 2013-06-14 17:13:55 UTC (rev 6552)
+++ SwiftTutorials/OHBM_2013-06-16/swift.properties 2013-06-14 21:19:57 UTC (rev 6553)
@@ -3,7 +3,7 @@
tc.file=apps
use.provider.staging=false
-provider.staging.pin.swiftfiles=true
+provider.staging.pin.swiftfiles=false
use.wrapper.staging=false
status.mode=provider
More information about the Swift-commit
mailing list