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

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Sat Aug 8 17:04:15 CDT 2009


Author: andric
Date: 2009-08-08 17:04:14 -0500 (Sat, 08 Aug 2009)
New Revision: 3084

Added:
   SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/FriedmanPerm.swift
Log:
new way of running Friedman test permutations

Added: SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/FriedmanPerm.swift
===================================================================
--- SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/FriedmanPerm.swift	                        (rev 0)
+++ SwiftApps/SIDGrid/swift/projects/andric/ccf_emblem/NonParametric_lag_analy/FriedmanPerm.swift	2009-08-08 22:04:14 UTC (rev 3084)
@@ -0,0 +1,56 @@
+#---- coded 08.August.2009
+type file{}
+type Rscript;
+type AnalyConfig{
+    file Rdata;
+    file txt;
+}
+
+app (file rout) run_query (string allcatargs, file config, Rscript code, AnalyConfig permutationSetup){
+    Mediator allcatargs @filename(code);
+}
+
+
+loop_query(int bvox, string user, string db, string host, string query_outline, Rscript code, file config, string id, string h, int perm, AnalyConfig permutationSetup, int batchstep){
+    int evox = bvox+(batchstep-1);
+    string outName = @strcat("permout",h,"/perm",perm,"_",h,bvox,"_",evox);
+    string med_args = @strcat("--user ","andric",
+        " --conf ", @filename(config),
+        " --db ", db,
+        " --host ", host,
+        " --query ", query_outline,
+        " --r_script ", @filename(code),
+        " --begin_vox ", bvox,
+        " --end_vox ", evox,
+        " --outprefix ", "TOLDJA",
+        " --batchstep ", batchstep,
+        " --r_swift_args ", outName," ",perm,
+        " --subject ", id);
+    file r_result <single_file_mapper; file=@strcat(outName,".txt")>;
+    r_result = run_query(med_args, config, code, permutationSetup);
+}
+
+string user = @arg("user");
+string db = "EMBLEM1";
+string host = "tp-neurodb.ci.uchicago.edu";
+file config<single_file_mapper; file="user.config">;
+
+Rscript code<single_file_mapper; file="PermScripts/FriedmanPerm.R">;
+AnalyConfig permutationSetup<simple_mapper; location="PermScripts", prefix="PermConfig.">;
+
+string hemilist[] = ["lh"];
+int batchstep = 7000;
+#int permbrains[] = [1:3000:1];
+int permbrains[] = [1:2:1];
+#int mybatches[] = [1:196000:batchstep];
+int mybatches[] = [1:14000:batchstep];
+string id = "perminterp";
+
+foreach h in hemilist{
+    foreach perm in permbrains{
+        foreach batch in mybatches{
+            string query_outline = @strcat("SELECT subject, vertex, speech_lag, emblem_lag, embspeech_lag FROM interpCCF_",h," WHERE vertex BETWEEN BEGIN_BATCH and END_BATCH");
+            loop_query(batch, user, db, host, query_outline, code, config, id, h, perm, permutationSetup, batchstep);
+        }
+    }
+}




More information about the Swift-commit mailing list