[Swift-commit] r3058 - SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Thu Aug 6 10:33:17 CDT 2009


Author: andric
Date: 2009-08-06 10:33:16 -0500 (Thu, 06 Aug 2009)
New Revision: 3058

Added:
   SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccf.final1000_rh.swift
   SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccf_final1000_lh.swift
   SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccf_final1000_rh.swift
   SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccf_lh.swift
   SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccf_rh.swift
   SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccfinterp.swift
   SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccfinterpFINAL1000.swift
   SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccfinterp_lh.swift
   SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccfinterp_lhFINAL1000.swift
Log:
swift script for group ccf analysis

Added: SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccf.final1000_rh.swift
===================================================================
--- SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccf.final1000_rh.swift	                        (rev 0)
+++ SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccf.final1000_rh.swift	2009-08-06 15:33:16 UTC (rev 3058)
@@ -0,0 +1,45 @@
+type file{}
+
+(file qout, file rout) run_query (string allcatargs, file config, file dot_r){
+    app{
+        Mediator allcatargs stdout=@filename(qout) @filename(dot_r);
+    }
+}
+
+string user = @arg("user");
+string db = "EMBLEM1";
+string host = "tp-neurodb.ci.uchicago.edu";
+
+string query_outline = "SELECT subject, voxel, speech0B, speech1B, speech2B, speech3B, speech4B, speech5B, speech6B, speech7B, speech8B, gesture0B, gesture1B, gesture2B, gesture3B, gesture4B, gesture5B, gesture6B, gesture7B, gesture8B, gestspeech0B, gestspeech1B, gestspeech2B, gestspeech3B, gestspeech4B, gestspeech5B, gestspeech6B, gestspeech7B, gestspeech8B, grasp0B, grasp1B, grasp2B, grasp3B, grasp4B, grasp5B, grasp6B, grasp7B, grasp8B FROM emblemfemrh WHERE voxel between BEGIN_BATCH and END_BATCH";
+
+file r_script<single_file_mapper; file="scripts/grid_ccf.R">;
+file config<single_file_mapper; file="user.config">;
+
+string id = "backinCHI_rh";
+
+loop_query(int bvox, string user, string db, string host, string query_outline, file r_script, file config, string id){
+	int evox = bvox+999;
+	string r_swift_args = @strcat("ccf");
+	string med_args = @strcat("--user ","andric",
+    		" --conf ", "user.config",
+    		" --db ", db,
+    		" --host ", host,
+    		" --query ", query_outline,
+    		" --r_script ", @filename(r_script),
+    		" --begin_vox ", bvox,
+    		" --end_vox ", evox,
+    		" --subject ", id,
+    		" --batchstep ", "1000",
+    		" --r_swift_args ", r_swift_args,
+    		" --subject ", id);
+	file q_result <single_file_mapper; file=@strcat("results/",id,bvox,"_",evox,".qresult")>;
+	file r_result <single_file_mapper; file=@strcat(id,bvox,"_",evox,".tar")>;
+	(q_result, r_result) = run_query(med_args, r_script, config);
+}
+
+#int mybatches = [0:191000:5000];
+int mybatches = [195000];
+
+foreach batch in mybatches {
+	loop_query(batch, user, db, host, query_outline, r_script, config, id);
+}

Added: SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccf_final1000_lh.swift
===================================================================
--- SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccf_final1000_lh.swift	                        (rev 0)
+++ SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccf_final1000_lh.swift	2009-08-06 15:33:16 UTC (rev 3058)
@@ -0,0 +1,45 @@
+type file{}
+
+(file qout, file rout) run_query (string allcatargs, file config, file dot_r){
+    app{
+        Mediator allcatargs stdout=@filename(qout) @filename(dot_r);
+    }
+}
+
+string user = @arg("user");
+string db = "EMBLEM1";
+string host = "tp-neurodb.ci.uchicago.edu";
+
+string query_outline = "SELECT subject, voxel, speech0B, speech1B, speech2B, speech3B, speech4B, speech5B, speech6B, speech7B, speech8B, gesture0B, gesture1B, gesture2B, gesture3B, gesture4B, gesture5B, gesture6B, gesture7B, gesture8B, gestspeech0B, gestspeech1B, gestspeech2B, gestspeech3B, gestspeech4B, gestspeech5B, gestspeech6B, gestspeech7B, gestspeech8B, grasp0B, grasp1B, grasp2B, grasp3B, grasp4B, grasp5B, grasp6B, grasp7B, grasp8B FROM emblemfemlh WHERE voxel between BEGIN_BATCH and END_BATCH";
+
+file r_script<single_file_mapper; file="scripts/grid_ccf_lh.R">;
+file config<single_file_mapper; file="user.config">;
+
+string id = "canonHRF_lh";
+
+loop_query(int bvox, string user, string db, string host, string query_outline, file r_script, file config, string id){
+	int evox = bvox+999;
+	string r_swift_args = @strcat("ccf");
+	string med_args = @strcat("--user ","andric",
+    		" --conf ", "user.config",
+    		" --db ", db,
+    		" --host ", host,
+    		" --query ", query_outline,
+    		" --r_script ", @filename(r_script),
+    		" --begin_vox ", bvox,
+    		" --end_vox ", evox,
+    		" --subject ", id,
+    		" --batchstep ", "1000",
+    		" --r_swift_args ", r_swift_args,
+    		" --subject ", id);
+	file q_result <single_file_mapper; file=@strcat("results/",id,bvox,"_",evox,".qresult")>;
+	file r_result <single_file_mapper; file=@strcat(id,bvox,"_",evox,".tar")>;
+	(q_result, r_result) = run_query(med_args, r_script, config);
+}
+
+#int mybatches = [0:191000:5000];
+int mybatches = [195000];
+
+foreach batch in mybatches {
+	loop_query(batch, user, db, host, query_outline, r_script, config, id);
+}

Added: SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccf_final1000_rh.swift
===================================================================
--- SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccf_final1000_rh.swift	                        (rev 0)
+++ SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccf_final1000_rh.swift	2009-08-06 15:33:16 UTC (rev 3058)
@@ -0,0 +1,45 @@
+type file{}
+
+(file qout, file rout) run_query (string allcatargs, file config, file dot_r){
+    app{
+        Mediator allcatargs stdout=@filename(qout) @filename(dot_r);
+    }
+}
+
+string user = @arg("user");
+string db = "EMBLEM1";
+string host = "tp-neurodb.ci.uchicago.edu";
+
+string query_outline = "SELECT subject, voxel, speech0B, speech1B, speech2B, speech3B, speech4B, speech5B, speech6B, speech7B, speech8B, gesture0B, gesture1B, gesture2B, gesture3B, gesture4B, gesture5B, gesture6B, gesture7B, gesture8B, gestspeech0B, gestspeech1B, gestspeech2B, gestspeech3B, gestspeech4B, gestspeech5B, gestspeech6B, gestspeech7B, gestspeech8B, grasp0B, grasp1B, grasp2B, grasp3B, grasp4B, grasp5B, grasp6B, grasp7B, grasp8B FROM emblemfemrh WHERE voxel between BEGIN_BATCH and END_BATCH";
+
+file r_script<single_file_mapper; file="scripts/grid_ccf_rh.R">;
+file config<single_file_mapper; file="user.config">;
+
+string id = "canonHRF_rh";
+
+loop_query(int bvox, string user, string db, string host, string query_outline, file r_script, file config, string id){
+	int evox = bvox+999;
+	string r_swift_args = @strcat("ccf");
+	string med_args = @strcat("--user ","andric",
+    		" --conf ", "user.config",
+    		" --db ", db,
+    		" --host ", host,
+    		" --query ", query_outline,
+    		" --r_script ", @filename(r_script),
+    		" --begin_vox ", bvox,
+    		" --end_vox ", evox,
+    		" --subject ", id,
+    		" --batchstep ", "1000",
+    		" --r_swift_args ", r_swift_args,
+    		" --subject ", id);
+	file q_result <single_file_mapper; file=@strcat("results/",id,bvox,"_",evox,".qresult")>;
+	file r_result <single_file_mapper; file=@strcat(id,bvox,"_",evox,".tar")>;
+	(q_result, r_result) = run_query(med_args, r_script, config);
+}
+
+#int mybatches = [0:191000:5000];
+int mybatches = [195000];
+
+foreach batch in mybatches {
+	loop_query(batch, user, db, host, query_outline, r_script, config, id);
+}

Added: SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccf_lh.swift
===================================================================
--- SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccf_lh.swift	                        (rev 0)
+++ SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccf_lh.swift	2009-08-06 15:33:16 UTC (rev 3058)
@@ -0,0 +1,44 @@
+type file{}
+
+(file qout, file rout) run_query (string allcatargs, file config, file dot_r){
+    app{
+        Mediator allcatargs stdout=@filename(qout) @filename(dot_r);
+    }
+}
+
+string user = @arg("user");
+string db = "EMBLEM1";
+string host = "tp-neurodb.ci.uchicago.edu";
+
+string query_outline = "SELECT subject, voxel, speech0B, speech1B, speech2B, speech3B, speech4B, speech5B, speech6B, speech7B, speech8B, gesture0B, gesture1B, gesture2B, gesture3B, gesture4B, gesture5B, gesture6B, gesture7B, gesture8B, gestspeech0B, gestspeech1B, gestspeech2B, gestspeech3B, gestspeech4B, gestspeech5B, gestspeech6B, gestspeech7B, gestspeech8B, grasp0B, grasp1B, grasp2B, grasp3B, grasp4B, grasp5B, grasp6B, grasp7B, grasp8B FROM emblemfemlh WHERE voxel between BEGIN_BATCH and END_BATCH";
+
+file r_script<single_file_mapper; file="scripts/grid_ccf_lh.R">;
+file config<single_file_mapper; file="user.config">;
+
+string id = "canonHRF_lh";
+
+loop_query(int bvox, string user, string db, string host, string query_outline, file r_script, file config, string id){
+	int evox = bvox+4999;
+	string r_swift_args = @strcat("ccf");
+	string med_args = @strcat("--user ","andric",
+    		" --conf ", "user.config",
+    		" --db ", db,
+    		" --host ", host,
+    		" --query ", query_outline,
+    		" --r_script ", @filename(r_script),
+    		" --begin_vox ", bvox,
+    		" --end_vox ", evox,
+    		" --subject ", id,
+    		" --batchstep ", "1000",
+    		" --r_swift_args ", r_swift_args,
+    		" --subject ", id);
+	file q_result <single_file_mapper; file=@strcat("results/",id,bvox,"_",evox,".qresult")>;
+	file r_result <single_file_mapper; file=@strcat(id,bvox,"_",evox,".tar")>;
+	(q_result, r_result) = run_query(med_args, r_script, config);
+}
+
+int mybatches = [0:191000:5000];
+
+foreach batch in mybatches {
+	loop_query(batch, user, db, host, query_outline, r_script, config, id);
+}

Added: SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccf_rh.swift
===================================================================
--- SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccf_rh.swift	                        (rev 0)
+++ SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccf_rh.swift	2009-08-06 15:33:16 UTC (rev 3058)
@@ -0,0 +1,44 @@
+type file{}
+
+(file qout, file rout) run_query (string allcatargs, file config, file dot_r){
+    app{
+        Mediator allcatargs stdout=@filename(qout) @filename(dot_r);
+    }
+}
+
+string user = @arg("user");
+string db = "EMBLEM1";
+string host = "tp-neurodb.ci.uchicago.edu";
+
+string query_outline = "SELECT subject, voxel, speech0B, speech1B, speech2B, speech3B, speech4B, speech5B, speech6B, speech7B, speech8B, gesture0B, gesture1B, gesture2B, gesture3B, gesture4B, gesture5B, gesture6B, gesture7B, gesture8B, gestspeech0B, gestspeech1B, gestspeech2B, gestspeech3B, gestspeech4B, gestspeech5B, gestspeech6B, gestspeech7B, gestspeech8B, grasp0B, grasp1B, grasp2B, grasp3B, grasp4B, grasp5B, grasp6B, grasp7B, grasp8B FROM emblemfemrh WHERE voxel between BEGIN_BATCH and END_BATCH";
+
+file r_script<single_file_mapper; file="scripts/grid_ccf_rh.R">;
+file config<single_file_mapper; file="user.config">;
+
+string id = "canonHRF_rh";
+
+loop_query(int bvox, string user, string db, string host, string query_outline, file r_script, file config, string id){
+	int evox = bvox+4999;
+	string r_swift_args = @strcat("ccf");
+	string med_args = @strcat("--user ","andric",
+    		" --conf ", "user.config",
+    		" --db ", db,
+    		" --host ", host,
+    		" --query ", query_outline,
+    		" --r_script ", @filename(r_script),
+    		" --begin_vox ", bvox,
+    		" --end_vox ", evox,
+    		" --subject ", id,
+    		" --batchstep ", "1000",
+    		" --r_swift_args ", r_swift_args,
+    		" --subject ", id);
+	file q_result <single_file_mapper; file=@strcat("results/",id,bvox,"_",evox,".qresult")>;
+	file r_result <single_file_mapper; file=@strcat(id,bvox,"_",evox,".tar")>;
+	(q_result, r_result) = run_query(med_args, r_script, config);
+}
+
+int mybatches = [0:191000:5000];
+
+foreach batch in mybatches {
+	loop_query(batch, user, db, host, query_outline, r_script, config, id);
+}

Added: SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccfinterp.swift
===================================================================
--- SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccfinterp.swift	                        (rev 0)
+++ SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccfinterp.swift	2009-08-06 15:33:16 UTC (rev 3058)
@@ -0,0 +1,49 @@
+#-- doing this analysis this time interpolating the HRFs for better lag precision
+type file{}
+
+app (file qout, file rout) run_query (string allcatargs, file config, file dot_r){
+    Mediator allcatargs stdout=@filename(qout) @filename(dot_r);
+}
+
+
+loop_query(int bvox, string user, string db, string host, string query_outline, file r_script, file config, string id, string h){
+    int evox = bvox+4999;
+    string r_swift_args = h;
+    string theoutprefix = @strcat("interp_results/",id,bvox,"_",evox);
+    string med_args = @strcat("--user ","andric",
+            " --conf ", "user.config",
+            " --db ", db,
+            " --host ", host,
+            " --query ", query_outline,
+            " --r_script ", @filename(r_script),
+            " --begin_vox ", bvox,
+            " --end_vox ", evox,
+            " --subject ", id,
+            " --batchstep ", "1000",
+            " --outprefix ", theoutprefix,
+            " --r_swift_args ", r_swift_args,
+            " --subject ", id);
+    file q_result <single_file_mapper; file=@strcat("Qresults/",id,bvox,"_",evox,".qresult")>;
+    file r_result <single_file_mapper; file=@strcat(theoutprefix,".tar")>;
+    (q_result, r_result) = run_query(med_args, r_script, config);
+}
+
+
+string user = @arg("user");
+string db = "EMBLEM1";
+string host = "tp-neurodb.ci.uchicago.edu";
+
+file r_script<single_file_mapper; file="scripts/grid_ccfinterp.R">;
+file config<single_file_mapper; file="user.config">;
+
+int mybatches[] = [0:191000:5000];
+string hemis[] = ["lh","rh"];
+string nombre = "interp";
+
+foreach h in hemis {
+    string query_outline = @strcat("SELECT subject, voxel, speech0B, speech1B, speech2B, speech3B, speech4B, speech5B, speech6B, speech7B, speech8B, gesture0B, gesture1B, gesture2B, gesture3B, gesture4B, gesture5B, gesture6B, gesture7B, gesture8B, gestspeech0B, gestspeech1B, gestspeech2B, gestspeech3B, gestspeech4B, gestspeech5B, gestspeech6B, gestspeech7B, gestspeech8B, grasp0B, grasp1B, grasp2B, grasp3B, grasp4B, grasp5B, grasp6B, grasp7B, grasp8B FROM emblemfem",h," WHERE voxel between BEGIN_BATCH and END_BATCH");
+    string id = @strcat(nombre,"_",h);
+    foreach batch in mybatches {
+        loop_query(batch, user, db, host, query_outline, r_script, config, id, h);
+    }
+}

Added: SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccfinterpFINAL1000.swift
===================================================================
--- SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccfinterpFINAL1000.swift	                        (rev 0)
+++ SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccfinterpFINAL1000.swift	2009-08-06 15:33:16 UTC (rev 3058)
@@ -0,0 +1,50 @@
+#-- doing this analysis this time interpolating the HRFs for better lag precision
+type file{}
+
+app (file qout, file rout) run_query (string allcatargs, file config, file dot_r){
+    Mediator allcatargs stdout=@filename(qout) @filename(dot_r);
+}
+
+
+loop_query(int bvox, string user, string db, string host, string query_outline, file r_script, file config, string id, string h){
+    int evox = bvox+999;
+    string r_swift_args = h;
+    string theoutprefix = @strcat("interp_results/",id,bvox,"_",evox);
+    string med_args = @strcat("--user ","andric",
+            " --conf ", "user.config",
+            " --db ", db,
+            " --host ", host,
+            " --query ", query_outline,
+            " --r_script ", @filename(r_script),
+            " --begin_vox ", bvox,
+            " --end_vox ", evox,
+            " --subject ", id,
+            " --batchstep ", "1000",
+            " --outprefix ", theoutprefix,
+            " --r_swift_args ", r_swift_args,
+            " --subject ", id);
+    file q_result <single_file_mapper; file=@strcat("Qresults/",id,bvox,"_",evox,".qresult")>;
+    file r_result <single_file_mapper; file=@strcat(theoutprefix,".tar")>;
+    (q_result, r_result) = run_query(med_args, r_script, config);
+}
+
+
+string user = @arg("user");
+string db = "EMBLEM1";
+string host = "tp-neurodb.ci.uchicago.edu";
+
+file r_script<single_file_mapper; file="scripts/grid_ccfinterp.R">;
+file config<single_file_mapper; file="user.config">;
+
+#int mybatches[] = [0:191000:5000];
+int mybatches[] = [195000];
+string hemis[] = ["lh","rh"];
+string nombre = "interp";
+
+foreach h in hemis {
+    string query_outline = @strcat("SELECT subject, voxel, speech0B, speech1B, speech2B, speech3B, speech4B, speech5B, speech6B, speech7B, speech8B, gesture0B, gesture1B, gesture2B, gesture3B, gesture4B, gesture5B, gesture6B, gesture7B, gesture8B, gestspeech0B, gestspeech1B, gestspeech2B, gestspeech3B, gestspeech4B, gestspeech5B, gestspeech6B, gestspeech7B, gestspeech8B, grasp0B, grasp1B, grasp2B, grasp3B, grasp4B, grasp5B, grasp6B, grasp7B, grasp8B FROM emblemfem",h," WHERE voxel between BEGIN_BATCH and END_BATCH");
+    string id = @strcat(nombre,"_",h);
+    foreach batch in mybatches {
+        loop_query(batch, user, db, host, query_outline, r_script, config, id, h);
+    }
+}

Added: SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccfinterp_lh.swift
===================================================================
--- SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccfinterp_lh.swift	                        (rev 0)
+++ SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccfinterp_lh.swift	2009-08-06 15:33:16 UTC (rev 3058)
@@ -0,0 +1,44 @@
+#-- doing this analysis this time interpolating the HRFs for better lag precision
+type file{}
+
+app (file qout, file rout) run_query (string allcatargs, file config, file dot_r){
+    Mediator allcatargs stdout=@filename(qout) @filename(dot_r);
+}
+
+
+string user = @arg("user");
+string db = "EMBLEM1";
+string host = "tp-neurodb.ci.uchicago.edu";
+
+string query_outline = "SELECT subject, voxel, speech0B, speech1B, speech2B, speech3B, speech4B, speech5B, speech6B, speech7B, speech8B, gesture0B, gesture1B, gesture2B, gesture3B, gesture4B, gesture5B, gesture6B, gesture7B, gesture8B, gestspeech0B, gestspeech1B, gestspeech2B, gestspeech3B, gestspeech4B, gestspeech5B, gestspeech6B, gestspeech7B, gestspeech8B, grasp0B, grasp1B, grasp2B, grasp3B, grasp4B, grasp5B, grasp6B, grasp7B, grasp8B FROM emblemfemlh WHERE voxel between BEGIN_BATCH and END_BATCH";
+
+file r_script<single_file_mapper; file="scripts/grid_ccfinterp_lh.R">;
+file config<single_file_mapper; file="user.config">;
+
+string id = "interp_lh";
+
+loop_query(int bvox, string user, string db, string host, string query_outline, file r_script, file config, string id){
+    int evox = bvox+4999;
+    string r_swift_args = @strcat("ccf");
+    string med_args = @strcat("--user ","andric",
+            " --conf ", "user.config",
+            " --db ", db,
+            " --host ", host,
+            " --query ", query_outline,
+            " --r_script ", @filename(r_script),
+            " --begin_vox ", bvox,
+            " --end_vox ", evox,
+            " --subject ", id,
+            " --batchstep ", "1000",
+            " --r_swift_args ", r_swift_args,
+            " --subject ", id);
+    file q_result <single_file_mapper; file=@strcat("Qresults/",id,bvox,"_",evox,".qresult")>;
+    file r_result <single_file_mapper; file=@strcat(id,bvox,"_",evox,".tar")>;
+    (q_result, r_result) = run_query(med_args, r_script, config);
+}
+
+int mybatches = [0:191000:5000];
+
+foreach batch in mybatches {
+    loop_query(batch, user, db, host, query_outline, r_script, config, id);
+}

Added: SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccfinterp_lhFINAL1000.swift
===================================================================
--- SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccfinterp_lhFINAL1000.swift	                        (rev 0)
+++ SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/ccf_emblemIDEAL/ccfinterp_lhFINAL1000.swift	2009-08-06 15:33:16 UTC (rev 3058)
@@ -0,0 +1,49 @@
+#-- doing this analysis this time interpolating the HRFs for better lag precision
+type file{}
+
+app (file qout, file rout) run_query (string allcatargs, file config, file dot_r){
+    Mediator allcatargs stdout=@filename(qout) @filename(dot_r);
+}
+
+
+string user = @arg("user");
+string db = "EMBLEM1";
+string host = "tp-neurodb.ci.uchicago.edu";
+
+string query_outline = "SELECT subject, voxel, speech0B, speech1B, speech2B, speech3B, speech4B, speech5B, speech6B, speech7B, speech8B, gesture0B, gesture1B, gesture2B, gesture3B, gesture4B, gesture5B, gesture6B, gesture7B, gesture8B, gestspeech0B, gestspeech1B, gestspeech2B, gestspeech3B, gestspeech4B, gestspeech5B, gestspeech6B, gestspeech7B, gestspeech8B, grasp0B, grasp1B, grasp2B, grasp3B, grasp4B, grasp5B, grasp6B, grasp7B, grasp8B FROM emblemfemlh WHERE voxel between BEGIN_BATCH and END_BATCH";
+
+file r_script<single_file_mapper; file="scripts/grid_ccfinterp_lh.R">;
+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, string id){
+    int evox = bvox+999;
+    string r_swift_args = @strcat("ccf");
+    string med_args = @strcat("--user ","andric",
+            " --conf ", "user.config",
+            " --db ", db,
+            " --host ", host,
+            " --query ", query_outline,
+            " --r_script ", @filename(r_script),
+            " --begin_vox ", bvox,
+            " --end_vox ", evox,
+            " --subject ", id,
+            " --batchstep ", "1000",
+            " --r_swift_args ", r_swift_args,
+            " --subject ", id);
+    file q_result <single_file_mapper; file=@strcat("Qresults/",id,bvox,"_",evox,".qresult")>;
+    file r_result <single_file_mapper; file=@strcat(id,bvox,"_",evox,".tar")>;
+    (q_result, r_result) = run_query(med_args, r_script, config);
+}
+
+
+#int mybatches = [0:191000:5000];
+int mybatches[] = [195000];
+string hemis[] = ["lh","rh"];
+string nombre = "interp";
+
+foreach h in hemis {
+    string id = @strcat(nombre,"_",h);
+    foreach batch in mybatches {
+        loop_query(batch, user, db, host, query_outline, r_script, config, id);
+    }
+}




More information about the Swift-commit mailing list