Changeset 739 for cpp/frams/_demos/genoconv_test.cpp
- Timestamp:
- 02/18/18 02:54:36 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/_demos/genoconv_test.cpp
r732 r739 116 116 } 117 117 118 static int goodWidthForFormat(int genotype_format) 119 { 120 return genotype_format == '0' ? 45 : 15; // more space for long f0 lines 121 } 122 118 123 // arguments: 119 124 // genotype (or - meaning "read from stdin") [default: X] … … 182 187 printf("Conversion map:\n"); 183 188 m.print(); 184 printConvMap(g1.getGenes(), g2.getGenes(), m );189 printConvMap(g1.getGenes(), g2.getGenes(), m, goodWidthForFormat(g1.getFormat())); 185 190 printf("Reverse conversion map:\n"); 186 191 MultiMap rm; 187 192 rm.addReversed(m); 188 193 rm.print(); 189 printConvMap(g2.getGenes(), g1.getGenes(), rm );194 printConvMap(g2.getGenes(), g1.getGenes(), rm, goodWidthForFormat(g2.getFormat())); 190 195 } 191 196 192 197 Model mod1(g1, 1); 193 198 printf("\nModel map for f%c genotype:\n", g1.getFormat()); 194 printModelMap(g1.getGenes(), mod1.getMap()); 199 ModelDisplayMap dm1(mod1); 200 dm1.print(goodWidthForFormat(g1.getFormat())); 195 201 MultiMap mod1combined; 196 mod1combined.addCombined(mod1.getMap(), getModelDisplayMap());202 mod1combined.addCombined(mod1.getMap(), dm1.getMap()); 197 203 mod1combined.print(); 198 204 Model mod2(g2, 1); 199 205 printf("\nModel map for f%c genotype:\n", g2.getFormat()); 200 printModelMap(g2.getGenes(), mod2.getMap()); 206 ModelDisplayMap dm2(mod2); 207 dm2.print(goodWidthForFormat(g2.getFormat())); 201 208 MultiMap mod2combined; 202 mod2combined.addCombined(mod2.getMap(), getModelDisplayMap());209 mod2combined.addCombined(mod2.getMap(), dm2.getMap()); 203 210 mod2combined.print(); 204 211 }
Note: See TracChangeset
for help on using the changeset viewer.