Beispiel #1
0
void Translation_free(Translation *translation) {
  Object_decRefCount(translation);

  if (Object_getRefCount(translation) > 0) {
    return;
  } else if (Object_getRefCount(translation) < 0) {
    fprintf(stderr,"Error: Negative reference count for Translation\n"
                   "       Freeing it anyway\n");
  }

  
  free(translation);
}
Beispiel #2
0
void PredictionExon_freeImpl(PredictionExon *pe) {
  Object_decRefCount(pe);

  if (Object_getRefCount(pe) > 0) {
    return;
  } else if (Object_getRefCount(pe) < 0) {
    fprintf(stderr,"Error: Negative reference count for PredictionExon\n"
                   "       Freeing it anyway\n");
  }

  if (pe->displayLabel) EcoString_freeStr(ecoSTable, pe->displayLabel);

  SeqFeature_freePtrs((SeqFeature *)pe);
  free(pe);
}
Beispiel #3
0
void RawContig_free(RawContig *rc) {
  Object_decRefCount(rc);

  if (Object_getRefCount(rc) > 0) {
    return;
  } else if (Object_getRefCount(rc) < 0) {
    fprintf(stderr,"Error: Negative reference count for RawContig\n"
                   "       Freeing it anyway\n");
  }

  printf("Freeing rawcontig\n");
  BaseContig_freePtrs((BaseContig*)rc);

  free(rc);
}
Beispiel #4
0
void Clone_free(Clone *clone) {
  Object_decRefCount(clone);

  if (Object_getRefCount(clone) > 0) {
    return;
  } else if (Object_getRefCount(clone) < 0) {
    fprintf(stderr,"Error: Negative reference count for Clone\n"
                   "       Freeing it anyway\n");
  }

  if (clone->name) EcoString_freeStr(ecoSTable, clone->name);
  if (clone->emblAcc) EcoString_freeStr(ecoSTable, clone->emblAcc);

  free(clone);
}
Beispiel #5
0
void GenomeDB_free(GenomeDB *gdb) {
  Object_decRefCount(gdb);

  if (Object_getRefCount(gdb) > 0) {
    return;
  } else if (Object_getRefCount(gdb) < 0) {
    fprintf(stderr,"Error: Negative reference count for GenomeDB\n"
                   "       Freeing it anyway\n");
  }

  if (gdb->name)     free(gdb->name);
  if (gdb->assembly) free(gdb->assembly);

  free(gdb);
}
Beispiel #6
0
void SimpleFeature_freeImpl(SimpleFeature *sf) {
  Object_decRefCount(sf);

  if (Object_getRefCount(sf) > 0) {
    return;
  } else if (Object_getRefCount(sf) < 0) {
    fprintf(stderr,"Error: Negative reference count for SimpleFeature\n"
                   "       Freeing it anyway\n");
  }

  if (sf->displayLabel) EcoString_freeStr(ecoSTable, sf->displayLabel);

  SeqFeature_freePtrs((SeqFeature *)sf);
  free(sf);
}
Beispiel #7
0
void SyntenyRegion_free(SyntenyRegion *sr) {
  Object_decRefCount(sr);

  if (Object_getRefCount(sr) > 0) {
    return;
  } else if (Object_getRefCount(sr) < 0) {
    fprintf(stderr,"Error: Negative reference count for SyntenyRegion\n"
                   "       Freeing it anyway\n");
  }

  if (sr->chrName)    EcoString_freeStr(ecoSTable, sr->chrName);
  if (sr->hitChrName) EcoString_freeStr(ecoSTable, sr->hitChrName);
  if (sr->seqType)    EcoString_freeStr(ecoSTable, sr->seqType);
  if (sr->hitSeqType) EcoString_freeStr(ecoSTable, sr->hitSeqType);

  free(sr);
}
void PredictionTranscript_free(PredictionTranscript *trans) {
    Object_decRefCount(trans);

    if (Object_getRefCount(trans) > 0) {
        return;
    } else if (Object_getRefCount(trans) < 0) {
        fprintf(stderr,"Error: Negative reference count for PredictionTranscript\n"
                "       Freeing it anyway\n");
    }

    if (trans->exonCoordMapper)    Mapper_free(trans->exonCoordMapper);
    if (trans->translateableExons) Vector_free(trans->translateableExons);
    if (trans->exons)              Vector_free(trans->exons);


    free(trans);
}
Beispiel #9
0
void Analysis_free(Analysis *anal) {
  Object_decRefCount(anal);

  if (Object_getRefCount(anal) > 0) {
    return;
  } else if (Object_getRefCount(anal) < 0) {
    fprintf(stderr,"Error: Negative reference count for Analysis\n"
                   "       Freeing it anyway\n");
  }

  if (anal->db)          free(anal->db);
  if (anal->dbFile)      free(anal->dbFile);
  if (anal->program)     free(anal->program);
  if (anal->programFile) free(anal->programFile);
  if (anal->gffSource)   free(anal->gffSource);
  if (anal->gffFeature)  free(anal->gffFeature);
  if (anal->module)      free(anal->module);
  if (anal->parameters)  free(anal->parameters);
  if (anal->created)     free(anal->created);
  if (anal->logicName)   free(anal->logicName);

  free(anal);
}