• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#windowsobjective-ccocoaqt誰得pythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisión14cc3674750f11f3225c7e8b34a8418c425b75bf (tree)
Tiempo2015-04-02 04:39:17
AutorTakuo Yasunaga <yasunaga@bio....>
CommiterTakuo Yasunaga

Log Message

ticket #35034
Sphere index, Disk index, Cylinder index
Larger values indicate its shape.

Cambiar Resumen

Diferencia incremental

--- a/src/Objects/DataManip/mrcImage/src/lmrcImageShapePCA.c
+++ b/src/Objects/DataManip/mrcImage/src/lmrcImageShapePCA.c
@@ -66,7 +66,7 @@ lmrcImageShapePCA(mrcImage* in, lmrcImageShapePCAInfo* linfo, int mode)
6666 int
6767 lmrcImageShapePCAResultsPrint(FILE* fpt, lmrcImageShapePCAInfo* linfo, int mode)
6868 {
69- double sum;
69+ double sum, sum2;
7070 double lambda[3];
7171 int i;
7272
@@ -88,18 +88,42 @@ lmrcImageShapePCAResultsPrint(FILE* fpt, lmrcImageShapePCAInfo* linfo, int mode)
8888 for(i=0; i<3; i++) {
8989 sum += lambda[i];
9090 }
91+ sum2 = 0;
9192 for(i=0; i<3; i++) {
9293 lambda[i] /= sum;
94+ sum2 += SQR(lambda[i]);
9395 }
9496 for(i=0; i<3; i++) {
9597 fprintf(fpt, "%15.6f ", lambda[i]);
9698 }
9799 fprintf(fpt, "\n");
98100
99- fprintf(fpt, "logS(SphereIndex) : %15.6f\n", log10(1/(lambda[0]*lambda[1] + lambda[1]*lambda[2] +lambda[2]*lambda[0] )));
100- fprintf(fpt, "exp(S-1)(SphereIndex) : %15.6f\n", exp(1/(lambda[0]*lambda[1] + lambda[1]*lambda[2] +lambda[2]*lambda[0] )-1));
101- fprintf(fpt, "SphereIndex : %15.6f\n", SQR(lambda[0] - lambda[1]) + SQR(lambda[1]-lambda[2]) + SQR(lambda[2]-lambda[0]));
102- fprintf(fpt, "Log(SphereIndex) : %15.6f\n", log10(SQR(lambda[0] - lambda[1]) + SQR(lambda[1]-lambda[2]) + SQR(lambda[2]-lambda[0])));
101+ if(mode&0x1) {
102+ fprintf(fpt, "logS(SphereIndex): %15.6f\n", -log10(1/(lambda[0]*lambda[1] + lambda[1]*lambda[2] +lambda[2]*lambda[0] )));
103+ fprintf(fpt, "exp(S-1)(SphereIndex): %15.6f\n", 1.0/exp(1/(lambda[0]*lambda[1] + lambda[1]*lambda[2] +lambda[2]*lambda[0] )-1));
104+ fprintf(fpt, "SphereIndex(var): %15.6f\n", 1.0/(SQR(lambda[0] - lambda[1]) + SQR(lambda[1]-lambda[2]) + SQR(lambda[2]-lambda[0])));
105+ fprintf(fpt, "Log(SphereIndex(var)): %15.6f\n", -log10(SQR(lambda[0] - lambda[1]) + SQR(lambda[1]-lambda[2]) + SQR(lambda[2]-lambda[0])));
106+ fprintf(fpt, "SphereIndex(var): %15.6f\n", 1.0/(SQR(lambda[0] - lambda[1]) + SQR(lambda[1]-lambda[2]) + SQR(lambda[2]-lambda[0])));
107+ fprintf(fpt, "SphereIndex(0.33): %15.6f\n", 1.0/(SQR(lambda[0] - 1.0/3) + SQR(lambda[1]-1.0/3) + SQR(lambda[2]-1.0/3)));
108+ fprintf(fpt, "Log(SphereIndex(0.33)): %15.6f\n", -log10(SQR(lambda[0] - 1.0/3) + SQR(lambda[1]-1.0/3) + SQR(lambda[2]-1.0/3)));
109+ }
110+ if(mode&0x2) {
111+ fprintf(fpt, "DiskIndex: %15.6f\n", 1.0/(lambda[2]/lambda[0]*lambda[2]/lambda[1]));
112+ fprintf(fpt, "logD(DiskIndex): %15.6f\n", -log10(lambda[2]/lambda[0]*lambda[2]/lambda[1]));
113+ fprintf(fpt, "DiskIndex(var): %15.6f\n", 1.0/(SQR(lambda[0]-lambda[1]) + SQR(lambda[2] )));
114+ fprintf(fpt, "Log(DiskIndex(var)): %15.6f\n", -log10(SQR(lambda[0]-lambda[1]) + SQR(lambda[2] )));
115+ fprintf(fpt, "DiskIndex(0.5): %15.6f\n", 1.0/(SQR(lambda[0]-0.5) + SQR(lambda[1]-0.5) + SQR(lambda[2] )));
116+ fprintf(fpt, "Log(DiskIndex(0.5)): %15.6f\n", -log10(SQR(lambda[0]-0.5) + SQR(lambda[1]-0.5) + SQR(lambda[2] )));
117+ }
118+ if(mode&0x4) {
119+ fprintf(fpt, "CylinderIndex: %15.6f\n", 1.0/(lambda[1]/lambda[0]*lambda[2]/lambda[0]));
120+ fprintf(fpt, "logC(CylinderIndex): %15.6f\n", -log10(lambda[1]/lambda[0]*lambda[2]/lambda[0]));
121+ fprintf(fpt, "CylinderIndex(var) : %15.6f\n", 1.0/(SQR(lambda[0] -1) + SQR(lambda[1] - lambda[2])));
122+ fprintf(fpt, "Log(CylinderIndex(var) : %15.6f\n", -log10(SQR(lambda[0] -1) +SQR(lambda[1] - lambda[2])));
123+ fprintf(fpt, "CylinderIndex(1.0) : %15.6f\n", 1.0/(SQR(lambda[0] -1) + SQR(lambda[1]) + SQR(lambda[2])));
124+ fprintf(fpt, "Log(CylinderIndex(1.0)) : %15.6f\n", -log10(SQR(lambda[0] -1) +SQR(lambda[1]) + SQR(lambda[2])));
125+ }
126+
103127
104128 return 0;
105129 }
--- a/src/Tools/Config/Define.inc
+++ b/src/Tools/Config/Define.inc
@@ -580,3 +580,5 @@ WORLDNAME=Tools
580580 WORLDNAME=Tools
581581 WORLDNAME=Tools
582582 WORLDNAME=Tools
583+WORLDNAME=Tools
584+WORLDNAME=Tools
--- a/src/Tools/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
1-include ../Config/Define.inc
2-include Config/Define.inc
3-include .Source
4-
5-include Config/Target.inc
--- /dev/null
+++ b/src/Tools/Makefile
@@ -0,0 +1 @@
1+/Users/tacyas/Eos/src/Config/Template/ToolsHomeTemplate.Dir/Makefile
\ No newline at end of file
--- a/src/Tools/mrcImage/mrcImageShapePCA/Config/OptionControlFile
+++ b/src/Tools/mrcImage/mrcImageShapePCA/Config/OptionControlFile
@@ -3,5 +3,5 @@
33 "-i","-i[nput]","Input: mrcImage","Essential","1","1","In","inFile::mrcImage","NULL"
44 "-o","-o[utput]","Output: ASCII","Optional","1","1","Out","outFile::ASCII","stdout"
55 "-c","-c[onfig]","ConfigurationFile","Optional","1","1","configFile","inFile","NULL"
6-"-m","-m[ode]","Mode","Optional","1","1","mode","Integer","0"
6+"-m","-m[ode]","Mode","Optional","1","1","mode","Integer","1"
77 "-C","-C[ontour]","Contour","Variable","1","1","Contour","Real","1.0"
--- a/src/Tools/mrcImage/mrcImageShapePCA/src/init.c
+++ b/src/Tools/mrcImage/mrcImageShapePCA/src/init.c
@@ -15,7 +15,7 @@ init0(mrcImageShapePCAInfo* info)
1515 info->fptIn = NULL; info->flagIn = 0;
1616 info->fptOut = stdout; info->flagOut = 0;
1717 info->fptconfigFile = NULL; info->flagconfigFile = 0;
18- info->mode = 0; info->flagmode = 0;
18+ info->mode = 1; info->flagmode = 0;
1919 info->Contour = NULL; info->flagContour = 0;
2020 }
2121
--- a/src/Tools/mrcImage/mrcImageShapePCA/src/mrcImageShapePCA.c
+++ b/src/Tools/mrcImage/mrcImageShapePCA/src/mrcImageShapePCA.c
@@ -64,7 +64,11 @@ additionalUsage()
6464 fprintf(stderr, " 100%% 60%% 40%%\n");
6565 fprintf(stderr, "----- Objectives -----\n");
6666 fprintf(stderr, "Determine the orientations/molecular axis by PCA alogrism\n");
67- fprintf(stderr, " $ mrcImagePCA -i mrc -o parameter -C C1 C2 C3 ...\n");
67+ fprintf(stderr, " $ mrcImageShapePCA -i mrc -o parameter -C C1 C2 C3 ...\n");
68+ fprintf(stderr, "-m \n");
69+ fprintf(stderr, " +1: Sphere (default)\n");
70+ fprintf(stderr, " +2: Disk\n");
71+ fprintf(stderr, " +4: Cylinder\n");
6872 fprintf(stderr, "\n");
6973
7074 }
--- a/src/Tools/mrcImage/mrcImageShapePCA/src/mrcImageShapePCA.html
+++ b/src/Tools/mrcImage/mrcImageShapePCA/src/mrcImageShapePCA.html
@@ -11,7 +11,7 @@ Options:
1111 [-i[nput] In (NULL ).as(inFile::mrcImage ) ] :Essential :Input: mrcImage
1212 [-o[utput] Out (stdout ).as(outFile::ASCII ) ] :Optional :Output: ASCII
1313 [-c[onfig] configFile (NULL ).as(inFile ) ] :Optional :ConfigurationFile
14- [-m[ode] mode (0 ).as(Integer ) ] :Optional :Mode
14+ [-m[ode] mode (1 ).as(Integer ) ] :Optional :Mode
1515 [-C[ontour] Contour (1.0 ).as(Real ) ... ] :Variable :Contour
1616 ----- Additional Usage -----
1717 -C : ContourLevels
@@ -19,7 +19,11 @@ Options:
1919 100% 60% 40%
2020 ----- Objectives -----
2121 Determine the orientations/molecular axis by PCA alogrism
22- $ mrcImagePCA -i mrc -o parameter -C C1 C2 C3 ...
22+ $ mrcImageShapePCA -i mrc -o parameter -C C1 C2 C3 ...
23+-m
24+ +1: Sphere (default)
25+ +2: Disk
26+ +4: Cylinder
2327
2428 </PRE>
2529 </BODY>
--- a/src/Tools/mrcImage/mrcImageShapePCA/src/mrcImageShapePCA.pane
+++ b/src/Tools/mrcImage/mrcImageShapePCA/src/mrcImageShapePCA.pane
@@ -10,7 +10,7 @@
1010 -I 1 0 1 1 0 1 -1x1+1+1.500000 ' ' 'In' 'Input: mrcImage' i
1111 -O 1 0 1 0 0 1 -1x1+1+3.000000 ' ' 'Out' 'Output: ASCII' o
1212 -I 1 0 1 0 0 1 -1x1+1+4.500000 ' ' 'configFile' 'ConfigurationFile' c
13- -i 1 0 1 0 0 -1x1+1+6.000000 0 0 0 0 0 'mode' 'Mode' m
13+ -i 1 0 1 0 0 -1x1+1+6.000000 0 0 1 0 0 'mode' 'Mode' m
1414 -f 1 0 1 0 0 -1x1+1+7.500000 0 0 1.000000 0 0 0 'Contour' 'Contour' C
1515 -E
1616 -E
--- a/src/Tools/mrcImage/mrcImageShapePCA/src/test/Makefile
+++ b/src/Tools/mrcImage/mrcImageShapePCA/src/test/Makefile
@@ -11,13 +11,13 @@ help:
1111
1212 exec: exec2
1313 @echo "----- Execution Check -----"
14- ../$(OSTYPE)/$(OBJECTNAME) -i data/121p-move.mrc -o data/121p-move.mrc.PCA -C 23696.7
14+ ../$(OSTYPE)/$(OBJECTNAME) -i data/121p-move.mrc -o data/121p-move.mrc.PCA -C 23696.7 -m 7
1515 pdbPCA -i data/121p-move.pdb -o data/121p-move.pdb.PCA
1616 @echo "----- Calc check -----"
1717
1818 exec2:
1919 @echo "----- Execution Check -----"
20- ../$(OSTYPE)/$(OBJECTNAME) -i data/myosinSwissModRefine2.mrc -o data/myosinSwissModRefine2.mrc.PCA -C 3.11319
20+ ../$(OSTYPE)/$(OBJECTNAME) -i data/myosinSwissModRefine2.mrc -o data/myosinSwissModRefine2.mrc.PCA -C 3.11319 -m 7
2121 pdbPCA -i data/myosinSwissModRefine2.pdb -o data/myosinSwissModRefine2.pdb.PCA
2222 @echo "----- Calc check -----"
2323
--- a/src/Tools/mrcImage/mrcImageShapePCA/src/usage.c
+++ b/src/Tools/mrcImage/mrcImageShapePCA/src/usage.c
@@ -10,7 +10,7 @@ usage(char* thisProgram)
1010 fprintf(stderr, " [-i[nput] In (NULL ).as(inFile::mrcImage ) ] :Essential :Input: mrcImage\n");
1111 fprintf(stderr, " [-o[utput] Out (stdout ).as(outFile::ASCII ) ] :Optional :Output: ASCII\n");
1212 fprintf(stderr, " [-c[onfig] configFile (NULL ).as(inFile ) ] :Optional :ConfigurationFile\n");
13- fprintf(stderr, " [-m[ode] mode (0 ).as(Integer ) ] :Optional :Mode\n");
13+ fprintf(stderr, " [-m[ode] mode (1 ).as(Integer ) ] :Optional :Mode\n");
1414 fprintf(stderr, " [-C[ontour] Contour (1.0 ).as(Real ) ... ] :Variable :Contour\n");
1515 additionalUsage();
1616 }