Esempio n. 1
0
void variantThreadInfo::WriteVariants() {
    int counter = 0;
    vcf::Variant * current_variant;
//  bool heartbeat_done = false;

    while (counter < records_in_thread) {

        current_variant = variantArray[counter++];

        if (current_variant == NULL) {
            fprintf(stdout, "Variant Array in thread returned null for Counter = %d \n", counter - 1);
            exit(-1);
        }
        HeartBeatOut(current_variant);

        if (current_variant->isFiltered && !current_variant->isHotSpot && parameters->my_controls.suppress_no_calls)
            (*filterVCFStream) << *current_variant << endl;
        else
            (*outVCFStream) << *current_variant << endl;
        delete current_variant;
    }
}
void variantThreadInfo::WriteVariants() {
  int counter = 0;
  vcf::Variant * current_variant;
//  bool heartbeat_done = false;
  
  while (counter < records_in_thread) {
    
    current_variant = variantArray[counter++];

    if (current_variant == NULL) {
      fprintf(stdout, "Variant Array in thread returned null for Counter = %d \n", counter - 1);
      exit(-1);
    }
    HeartBeatOut(current_variant);

    //@TODO: why do we need to check for "fail" and "filtered" separately?
    if ((current_variant->isFiltered || (current_variant->filter.compare("FAIL") == 0)) && !current_variant->isHotSpot)
      (*filterVCFStream) << *current_variant << endl;
    else
      (*outVCFStream) << *current_variant << endl;
    delete current_variant;
  }
}