Changes

From Genome Analysis Wiki
Jump to navigationJump to search
no edit summary
Line 10: Line 10:  
   ReadParameters(argc, argv);
 
   ReadParameters(argc, argv);
   −
   // Read marker list
+
  // =======================================================================================
 +
   // Read marker list ======================================================================
 
   printf("Reading Reference Marker List ...\n");
 
   printf("Reading Reference Marker List ...\n");
   Line 26: Line 27:  
       error("Reference panel marker list is empty - please verify filenames and contents!");
 
       error("Reference panel marker list is empty - please verify filenames and contents!");
   −
   // Load reference haplotypes
+
  // =======================================================================================
 +
   // Load reference haplotypes =============================================================
 
   printf("Loading reference haplotypes ...\n");
 
   printf("Loading reference haplotypes ...\n");
 
   HaplotypeSet reference;
 
   HaplotypeSet reference;
Line 43: Line 45:  
       error("Framework marker list is empty - please verify filenames and contents!");
 
       error("Framework marker list is empty - please verify filenames and contents!");
   −
   // Crossref Marker Names to Reference Panel Positions
+
  // =======================================================================================
 +
   // Crossref Marker Names to Reference Panel Positions ====================================
 
   IntArray markerIndex;
 
   IntArray markerIndex;
 
   markerIndex.Dimension(markerList.Length());
 
   markerIndex.Dimension(markerList.Length());
Line 52: Line 55:  
       {
 
       {
 
       markerIndex[i] = referenceHash.Integer(markerList[i].Trim());
 
       markerIndex[i] = referenceHash.Integer(markerList[i].Trim());
   
       if (markerIndex[i] >= 0) matches++;
 
       if (markerIndex[i] >= 0) matches++;
 
       }
 
       }
Line 64: Line 66:  
   printf("  %d Other Markers in Framework Haplotypes Discarded ...\n\n", markerList.Length() - matches);
 
   printf("  %d Other Markers in Framework Haplotypes Discarded ...\n\n", markerList.Length() - matches);
   −
   // Check for flips in reference vs. target haplotypes
+
  // =======================================================================================
  int flips = 0;
+
   // Check for flips in reference vs. target haplotypes discarded for simplicity ===========
  int previous = -1;
  −
  for (int i = 0; i < markerIndex.Length(); i++)
  −
      if (markerIndex[i] >= 0)
  −
        if (markerIndex[i] < previous)
  −
            {
  −
            if (flips++ < 10)
  −
              printf("  -> Marker %s precedes %s in reference, but follows it in target\n",
  −
                    (const char *) refMarkerList[previous],
  −
                    (const char *) markerList[i]);
  −
            previous = markerIndex[i];
  −
            }
  −
  if (flips > 10)
  −
      printf("  -> %d Additional Marker Order Changes Not Listed\n", flips - 10);
  −
  if (flips)
  −
      printf("  %d Marker Pairs Change Order in Target vs Framework Haplotypes\n", flips);
     −
   // Load target haplotypes
+
  // =======================================================================================
 +
   // Load target haplotypes ================================================================
 
   printf("Loading target haplotypes ...\n");
 
   printf("Loading target haplotypes ...\n");
 
   HaplotypeSet target;
 
   HaplotypeSet target;
Line 95: Line 83:  
   printf("  %d Target Haplotypes Loaded ...\n\n", target.count);
 
   printf("  %d Target Haplotypes Loaded ...\n\n", target.count);
    +
  // =======================================================================================
 +
  // Setup basic model parameters ========================================================== 
 
   int startIndex = 0;
 
   int startIndex = 0;
 
   int stopIndex = reference.markerCount - 1;
 
   int stopIndex = reference.markerCount - 1;
Line 104: Line 94:     
   mp.Allocate(reference.markerCount);
 
   mp.Allocate(reference.markerCount);
  −
  if (rounds > 0)
  −
      printf("Initializing Model Parameters (using E-M and up to %d haplotypes)\n", states);
      
   // Simple initial estimates of error and recombination rate
 
   // Simple initial estimates of error and recombination rate
Line 121: Line 108:  
       printf("  Updated recombination rates using %s ...\n", (const char *) recombinationRates);
 
       printf("  Updated recombination rates using %s ...\n", (const char *) recombinationRates);
   −
   // Parameter estimation loop
+
 
 +
  if (rounds > 0)
 +
      printf("Initializing Model Parameters (using E-M and up to %d haplotypes)\n", states);
 +
 
 +
  // =======================================================================================
 +
   // Parameter estimation loop =============================================================
 
   for (int round = 0; round < rounds; round++)
 
   for (int round = 0; round < rounds; round++)
 
       {
 
       {

Navigation menu