[Swift-commit] r3081 - SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Sat Aug 8 10:36:17 CDT 2009


Author: andric
Date: 2009-08-08 10:36:17 -0500 (Sat, 08 Aug 2009)
New Revision: 3081

Added:
   SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/PermFriedman.swift
   SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/PermFriedman1001.swift
   SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/PermFriedman2001.swift
   SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/oldPermFriedman.swift
   SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/permclust.swift
   SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/permclustThresh6.swift
   SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/permclustnotnew.swift
Log:
SwiftScripts for permutations and clustering

Added: SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/PermFriedman.swift
===================================================================
--- SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/PermFriedman.swift	                        (rev 0)
+++ SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/PermFriedman.swift	2009-08-08 15:36:17 UTC (rev 3081)
@@ -0,0 +1,53 @@
+#---- coded Tuesday; July 22, 2008
+type file{}
+
+(file qout, file rout) run_query (string allcatargs, file config, file r_script, file r_config_conds, file r_config_subjs){
+    app{
+        Mediator allcatargs stdout=@filename(qout) @filename(r_script) @filename(r_config_conds) @filename(r_config_subjs);
+    }
+}
+
+string user = @arg("user");
+string db = "EMBLEM1";
+string host = "tp-neurodb.ci.uchicago.edu";
+#string host = "login4.ranger.tacc.utexas.edu";
+
+file r_script<single_file_mapper; file="scripts/NewPermFriedman.R">;
+file r_config_conds<single_file_mapper; file="config_file.Rdata">;
+file r_config_subjs<single_file_mapper; file="subjs_config_file.txt">;
+file config<single_file_mapper; file="user.config">;
+
+
+loop_query(int bvox, string user, string db, string host, string query_outline, file r_script, file config, file r_config_conds, file r_config_subjs, string id, int medstep, int swiftstep){
+    int evox = bvox+(swiftstep-1);
+    string baseid = "PermFriedman";
+    string r_swift_args = @strcat(id);
+    string theoutprefix = @strcat(id,baseid,bvox,"_",evox);
+    string med_args = @strcat("--user ",user,
+        " --conf ", "user.config",
+        " --db ", db,
+        " --host ", host,
+        " --query ", query_outline,
+        " --r_script ", @filename(r_script),
+        " --begin_vox ", bvox,
+        " --end_vox ", evox,
+        " --outprefix ", theoutprefix,
+        " --batchstep ", medstep,
+        " --r_swift_args ", r_swift_args,
+        " --subject ", id);
+    file q_result <single_file_mapper; file=@strcat("query_results/",theoutprefix,".qresult")>;
+    file r_result <single_file_mapper; file=@strcat(theoutprefix,".tar")>;
+    (q_result, r_result) = run_query(med_args, r_script, config, r_config_conds, r_config_subjs);
+}
+
+int swiftstep = 28000;
+int mediatorstep = 7000;
+int permbrains = [1:1000:1];
+foreach perm in permbrains {
+    int mybatches = [1:196000:swiftstep];
+    foreach batch in mybatches {
+        string id = @strcat(perm);
+        string query_outline = @strcat("select subject, vertex, speech_lag, emblem_lag, embspeech_lag from ccf_phase2_lh where vertex between BEGIN_BATCH and END_BATCH");
+        loop_query(batch, user, db, host, query_outline, r_script, config, r_config_conds, r_config_subjs, id, mediatorstep, swiftstep);
+    }
+}

Added: SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/PermFriedman1001.swift
===================================================================
--- SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/PermFriedman1001.swift	                        (rev 0)
+++ SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/PermFriedman1001.swift	2009-08-08 15:36:17 UTC (rev 3081)
@@ -0,0 +1,53 @@
+#---- coded Tuesday; July 22, 2008
+type file{}
+
+(file qout, file rout) run_query (string allcatargs, file config, file r_script, file r_config_conds, file r_config_subjs){
+    app{
+        Mediator allcatargs stdout=@filename(qout) @filename(r_script) @filename(r_config_conds) @filename(r_config_subjs);
+    }
+}
+
+string user = @arg("user");
+string db = "EMBLEM1";
+string host = "tp-neurodb.ci.uchicago.edu";
+#string host = "login4.ranger.tacc.utexas.edu";
+
+file r_script<single_file_mapper; file="scripts/NewPermFriedman.R">;
+file r_config_conds<single_file_mapper; file="config_file.Rdata">;
+file r_config_subjs<single_file_mapper; file="subjs_config_file.txt">;
+file config<single_file_mapper; file="user.config">;
+
+
+loop_query(int bvox, string user, string db, string host, string query_outline, file r_script, file config, file r_config_conds, file r_config_subjs, string id, int medstep, int swiftstep){
+    int evox = bvox+(swiftstep-1);
+    string baseid = "PermFriedman";
+    string r_swift_args = @strcat(id);
+    string theoutprefix = @strcat(id,baseid,bvox,"_",evox);
+    string med_args = @strcat("--user ",user,
+        " --conf ", "user.config",
+        " --db ", db,
+        " --host ", host,
+        " --query ", query_outline,
+        " --r_script ", @filename(r_script),
+        " --begin_vox ", bvox,
+        " --end_vox ", evox,
+        " --outprefix ", theoutprefix,
+        " --batchstep ", medstep,
+        " --r_swift_args ", r_swift_args,
+        " --subject ", id);
+    file q_result <single_file_mapper; file=@strcat("query_results/",theoutprefix,".qresult")>;
+    file r_result <single_file_mapper; file=@strcat(theoutprefix,".tar")>;
+    (q_result, r_result) = run_query(med_args, r_script, config, r_config_conds, r_config_subjs);
+}
+
+int swiftstep = 28000;
+int mediatorstep = 7000;
+int permbrains = [1001:2000:1];
+foreach perm in permbrains {
+    int mybatches = [1:196000:swiftstep];
+    foreach batch in mybatches {
+        string id = @strcat(perm);
+        string query_outline = @strcat("select subject, vertex, speech_lag, emblem_lag, embspeech_lag from ccf_phase2_lh where vertex between BEGIN_BATCH and END_BATCH");
+        loop_query(batch, user, db, host, query_outline, r_script, config, r_config_conds, r_config_subjs, id, mediatorstep, swiftstep);
+    }
+}

Added: SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/PermFriedman2001.swift
===================================================================
--- SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/PermFriedman2001.swift	                        (rev 0)
+++ SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/PermFriedman2001.swift	2009-08-08 15:36:17 UTC (rev 3081)
@@ -0,0 +1,53 @@
+#---- coded Tuesday; July 22, 2008
+type file{}
+
+(file qout, file rout) run_query (string allcatargs, file config, file r_script, file r_config_conds, file r_config_subjs){
+    app{
+        Mediator allcatargs stdout=@filename(qout) @filename(r_script) @filename(r_config_conds) @filename(r_config_subjs);
+    }
+}
+
+string user = @arg("user");
+string db = "EMBLEM1";
+string host = "tp-neurodb.ci.uchicago.edu";
+#string host = "login4.ranger.tacc.utexas.edu";
+
+file r_script<single_file_mapper; file="scripts/NewPermFriedman.R">;
+file r_config_conds<single_file_mapper; file="config_file.Rdata">;
+file r_config_subjs<single_file_mapper; file="subjs_config_file.txt">;
+file config<single_file_mapper; file="user.config">;
+
+
+loop_query(int bvox, string user, string db, string host, string query_outline, file r_script, file config, file r_config_conds, file r_config_subjs, string id, int medstep, int swiftstep){
+    int evox = bvox+(swiftstep-1);
+    string baseid = "PermFriedman";
+    string r_swift_args = @strcat(id);
+    string theoutprefix = @strcat(id,baseid,bvox,"_",evox);
+    string med_args = @strcat("--user ",user,
+        " --conf ", "user.config",
+        " --db ", db,
+        " --host ", host,
+        " --query ", query_outline,
+        " --r_script ", @filename(r_script),
+        " --begin_vox ", bvox,
+        " --end_vox ", evox,
+        " --outprefix ", theoutprefix,
+        " --batchstep ", medstep,
+        " --r_swift_args ", r_swift_args,
+        " --subject ", id);
+    file q_result <single_file_mapper; file=@strcat("query_results/",theoutprefix,".qresult")>;
+    file r_result <single_file_mapper; file=@strcat(theoutprefix,".tar")>;
+    (q_result, r_result) = run_query(med_args, r_script, config, r_config_conds, r_config_subjs);
+}
+
+int swiftstep = 28000;
+int mediatorstep = 7000;
+int permbrains = [2001:3000:1];
+foreach perm in permbrains {
+    int mybatches = [1:196000:swiftstep];
+    foreach batch in mybatches {
+        string id = @strcat(perm);
+        string query_outline = @strcat("select subject, vertex, speech_lag, emblem_lag, embspeech_lag from ccf_phase2_lh where vertex between BEGIN_BATCH and END_BATCH");
+        loop_query(batch, user, db, host, query_outline, r_script, config, r_config_conds, r_config_subjs, id, mediatorstep, swiftstep);
+    }
+}

Added: SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/oldPermFriedman.swift
===================================================================
--- SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/oldPermFriedman.swift	                        (rev 0)
+++ SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/oldPermFriedman.swift	2009-08-08 15:36:17 UTC (rev 3081)
@@ -0,0 +1,54 @@
+#---- coded Tuesday; July 22, 2008
+type file{}
+
+(file qout, file rout) run_query (string allcatargs, file config, file r_script, file r_config_conds, file r_config_subjs){
+    app{
+        Mediator allcatargs stdout=@filename(qout) @filename(r_script) @filename(r_config_conds) @filename(r_config_subjs);
+    }
+}
+
+string user = @arg("user");
+string db = "EMBLEM1";
+string host = "tp-neurodb.ci.uchicago.edu";
+#string host = "login4.ranger.tacc.utexas.edu";
+
+file r_script<single_file_mapper; file="scripts/NewPermFriedman.R">;
+file r_config_conds<single_file_mapper; file="config_file.Rdata">;
+file r_config_subjs<single_file_mapper; file="subjs_config_file.txt">;
+file config<single_file_mapper; file="user.config">;
+
+
+loop_query(int bvox, string user, string db, string host, string query_outline, file r_script, file config, file r_config_conds, file r_config_subjs, string id, int medstep, int swiftstep){
+    int evox = bvox+(swiftstep-1);
+    int batch_evox = bvox+(medstep-1);
+    string baseid = "PermFriedman";
+    string r_swift_args = @strcat(id);
+    string theoutprefixR_result = @strcat(id,baseid,bvox,"_",batch_evox);
+    string theoutprefixQuery_result = @strcat(id,baseid,bvox,"_",evox);
+    string med_args = @strcat("--user ",user,
+        " --conf ", "user.config",
+        " --db ", db,
+        " --host ", host,
+        " --query ", query_outline,
+        " --r_script ", @filename(r_script),
+        " --begin_vox ", bvox,
+        " --end_vox ", evox,
+        " --batchstep ", medstep,
+        " --r_swift_args ", r_swift_args,
+        " --subject ", id);
+    file q_result <single_file_mapper; file=@strcat("query_results/",theoutprefixQuery_result,".qresult")>;
+    file r_result <single_file_mapper; file=@strcat(theoutprefixR_result,".txt")>;
+    (q_result, r_result) = run_query(med_args, r_script, config, r_config_conds, r_config_subjs);
+}
+
+int swiftstep = 28000;
+int mediatorstep =7000;
+int permbrains = [1:1:1];
+foreach perm in permbrains {
+    int mybatches = [1:196000:swiftstep];
+    foreach batch in mybatches {
+        string id = @strcat(perm);
+        string query_outline = @strcat("select subject, vertex, speech_lag, emblem_lag, embspeech_lag from ccf_phase2_lh where vertex between BEGIN_BATCH and END_BATCH");
+        loop_query(batch, user, db, host, query_outline, r_script, config, r_config_conds, r_config_subjs, id, mediatorstep, swiftstep);
+    }
+}

Added: SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/permclust.swift
===================================================================
--- SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/permclust.swift	                        (rev 0)
+++ SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/permclust.swift	2009-08-08 15:36:17 UTC (rev 3081)
@@ -0,0 +1,33 @@
+# Tuesday; July 22, 2008
+# checked over and set again on Friday; August 22, 2008
+# this version loops also the rmm value
+type file{}
+
+type surfclust_table{}
+
+
+(surfclust_table surfclustOutput) SurfClust (file specFile, file surfFile, file input, int threshVal, float rmmVal, string prefix){
+    app {
+        SurfClust "-spec" @filename(specFile) "-surf_A" @filename(surfFile) "-input" @filename(input) "1" "-rmm" rmmVal "-thresh_col" "1" "-thresh" threshVal "-amm2" "2" "-sort_n_nodes" "-prepend_node_index" "-prefix" prefix;
+    }
+}
+
+
+int vertexThresh[] = [6,9];
+int permbrains[] = [3:3000:1];
+#int permbrains[] = [1:2:1];
+float rmm_vals[] = [2.2,2.5];
+
+foreach brain in permbrains{
+    foreach thresh in vertexThresh{
+        foreach rmm in rmm_vals{
+            file HORRYspec <single_file_mapper;file=@strcat("HORRY.rh.mesh140_std.spec")>;
+            file HORRYsurf <single_file_mapper;file=@strcat("HORRY.rh.mesh140_std.pial.asc")>;
+            string inputName=@strcat("PermBrain",brain,"_output.txt");
+            file inputFile <single_file_mapper;file=inputName>;
+            string outPrefix=@strcat(brain,"_Thresh",thresh);
+            surfclust_table surfclustOutput <single_file_mapper; file=@strcat(outPrefix,"_ClstTable_r",rmm,"_a2.0.1D")>;
+            (surfclustOutput) = SurfClust(HORRYspec,HORRYsurf,inputFile,thresh,rmm,outPrefix);
+        }
+    }
+}

Added: SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/permclustThresh6.swift
===================================================================
--- SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/permclustThresh6.swift	                        (rev 0)
+++ SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/permclustThresh6.swift	2009-08-08 15:36:17 UTC (rev 3081)
@@ -0,0 +1,33 @@
+# Tuesday; July 22, 2008
+# checked over and set again on Friday; August 22, 2008
+# this version loops also the rmm value
+type file{}
+
+type surfclust_table{}
+
+
+(surfclust_table surfclustOutput) SurfClust (file specFile, file surfFile, file input, int threshVal, float rmmVal, string prefix){
+    app {
+        SurfClust "-spec" @filename(specFile) "-surf_A" @filename(surfFile) "-input" @filename(input) "1" "-rmm" rmmVal "-thresh_col" "1" "-thresh" threshVal "-amm2" "2" "-sort_n_nodes" "-prepend_node_index" "-prefix" prefix;
+    }
+}
+
+
+int vertexThresh[] = [6];
+int permbrains[] = [3:3000:1];
+#int permbrains[] = [1:2:1];
+float rmm_vals[] = [2.2,2.5];
+
+foreach brain in permbrains{
+    foreach thresh in vertexThresh{
+        foreach rmm in rmm_vals{
+            file HORRYspec <single_file_mapper;file=@strcat("HORRY.lh.mesh140_std.spec")>;
+            file HORRYsurf <single_file_mapper;file=@strcat("HORRY.lh.mesh140_std.pial.asc")>;
+            string inputName=@strcat("PermBrain",brain,"_output.txt");
+            file inputFile <single_file_mapper;file=inputName>;
+            string outPrefix=@strcat(brain,"_Thresh",thresh);
+            surfclust_table surfclustOutput <single_file_mapper; file=@strcat(outPrefix,"_ClstTable_r",rmm,"_a2.0.1D")>;
+            (surfclustOutput) = SurfClust(HORRYspec,HORRYsurf,inputFile,thresh,rmm,outPrefix);
+        }
+    }
+}

Added: SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/permclustnotnew.swift
===================================================================
--- SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/permclustnotnew.swift	                        (rev 0)
+++ SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/NewPermutations/permclustnotnew.swift	2009-08-08 15:36:17 UTC (rev 3081)
@@ -0,0 +1,33 @@
+# coded Tuesday; July 22, 2008
+# checked over and set again on Friday; August 22, 2008
+# this version loops also the rmm value
+type file{}
+
+type surfclust_table{}
+
+
+(surfclust_table surfclustOutput) SurfClust (file specFile, file surfFile, file input, int threshVal, float rmmVal, string prefix){
+    app {
+        SurfClust "-spec" @filename(specFile) "-surf_A" @filename(surfFile) "-input" @filename(input) "1 -rmm" rmmVal "-thresh_col 1 -thresh" threshVal "-amm2 2 -sort_n_nodes -prepend_node_index -prefix" prefix;
+    }
+}
+
+
+int vertexThresh[] = [9];
+#int permbrains = [2001:3000:1];
+int permbrains = [1:2:1];
+float rmm_vals = [2.2,2.5];
+
+foreach brain in permbrains{
+    foreach thresh in vertexThresh{
+        foreach rmm in rmm_vals{
+            file HORRYspec <single_file_mapper;file=@strcat("HORRY.lh.mesh140_std.spec")>;
+            file HORRYsurf <single_file_mapper;file=@strcat("HORRY.lh.mesh140_std.pial.asc")>;
+            string inputName=@strcat("brain_",brain,"PermFriedman.txt");
+            file inputFile <single_file_mapper;file=inputName>;
+            string outPrefix=@strcat(brain,"_Thresh",thresh);
+            surfclust_table surfclustOutput <single_file_mapper; file=@strcat(outPrefix,"_ClstTable_r",rmm,"_a2.0.1D")>;
+            (surfclustOutput) = SurfClust(HORRYspec,HORRYsurf,inputFile,thresh,rmm,outPrefix);
+        }
+    }
+}




More information about the Swift-commit mailing list