Changeset 955 for cpp/frams/_demos/genoconv_test.cpp
- Timestamp:
- 06/25/20 00:34:29 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/_demos/genoconv_test.cpp
r739 r955 66 66 { 67 67 name = "Test Converter #3"; 68 in_format = 'z';68 in_format = "multiply"; 69 69 out_format = '1'; 70 70 mapsupport = 1; … … 112 112 void printGen(Geno &g) 113 113 { 114 printf("Genotype:\n%s\nFormat: % c\nValid: %s\nComment: %s\n",115 g.getGenes().c_str(), g.getFormat(), g.isValid() ? "yes" : "no", g.getComment().c_str());116 } 117 118 static int goodWidthForFormat( intgenotype_format)119 { 120 return genotype_format == '0'? 45 : 15; // more space for long f0 lines114 printf("Genotype:\n%s\nFormat: %s\nValid: %s\nComment: %s\n", 115 g.getGenes().c_str(), g.getFormat().c_str(), g.isValid() ? "yes" : "no", g.getComment().c_str()); 116 } 117 118 static int goodWidthForFormat(const SString& genotype_format) 119 { 120 return genotype_format == "0" ? 45 : 15; // more space for long f0 lines 121 121 } 122 122 … … 154 154 else 155 155 src = "X"; 156 chardst = (argc > 2) ? *argv[2] : '0';156 SString dst = (argc > 2) ? *argv[2] : '0'; 157 157 bool using_checkpoints = (argc > 3) ? (strcmp(argv[3], "checkpoints") == 0) : false; 158 158 … … 162 162 MultiMap m; 163 163 Geno g2 = g1.getConverted(dst, &m, using_checkpoints); 164 printf("*** Converted to f% c:\n", dst);164 printf("*** Converted to f%s:\n", dst.c_str()); 165 165 printGen(g2); 166 166 … … 168 168 { // using Model with checkpoints 169 169 Model m1(g2, false, true);//true=using_checkpoints 170 printf("\nModel built from the converted f% c genotype has %d checkpoints\n", g2.getFormat(), m1.getCheckpointCount());170 printf("\nModel built from the converted f%s genotype has %d checkpoints\n", g2.getFormat().c_str(), m1.getCheckpointCount()); 171 171 Model m2(g1, false, true);//true=using_checkpoints 172 printf("Model built from the source f% c genotype has %d checkpoints\n", g1.getFormat(), m2.getCheckpointCount());172 printf("Model built from the source f%s genotype has %d checkpoints\n", g1.getFormat().c_str(), m2.getCheckpointCount()); 173 173 // accessing individual checkpoint models (if available) 174 174 if (m1.getCheckpointCount() > 0) … … 196 196 197 197 Model mod1(g1, 1); 198 printf("\nModel map for f% c genotype:\n", g1.getFormat());198 printf("\nModel map for f%s genotype:\n", g1.getFormat().c_str()); 199 199 ModelDisplayMap dm1(mod1); 200 200 dm1.print(goodWidthForFormat(g1.getFormat())); … … 203 203 mod1combined.print(); 204 204 Model mod2(g2, 1); 205 printf("\nModel map for f% c genotype:\n", g2.getFormat());205 printf("\nModel map for f%s genotype:\n", g2.getFormat().c_str()); 206 206 ModelDisplayMap dm2(mod2); 207 207 dm2.print(goodWidthForFormat(g2.getFormat()));
Note: See TracChangeset
for help on using the changeset viewer.