Exemplo n.º 1
0
SimpleFeature *SimpleFeature_shallowCopyImpl(SimpleFeature *sf) {
  SimpleFeature *newSimpleFeature = SimpleFeature_new();

  memcpy(newSimpleFeature,sf,sizeof(SimpleFeature));

  return newSimpleFeature;
}
Exemplo n.º 2
0
SeqFeature *SeqFeatureFactory_newFeature(ClassType type) {
  void *feature;

  switch (type) {
    case CLASS_BASEALIGNFEATURE:
      feature = BaseAlignFeature_new(); 
      break;
    case CLASS_DNADNAALIGNFEATURE:
      feature = DNAAlignFeature_new(); 
      break;
    case CLASS_DNAPEPALIGNFEATURE:
      feature = DNAPepAlignFeature_new(); 
      break;
    case CLASS_FEATUREPAIR:
      feature = FeaturePair_new(); 
      break;
    case CLASS_PREDICTIONTRANSCRIPT:
      feature = PredictionTranscript_new(); 
      break;
    case CLASS_SIMPLEFEATURE:
      feature = SimpleFeature_new(); 
      break;
    case CLASS_SEQFEATURE:
      feature = SeqFeature_new(); 
      break;
    case CLASS_EXON:
      feature = Exon_new(); 
      break;
    case CLASS_TRANSCRIPT:
      feature = Transcript_new(); 
      break;
    case CLASS_PREDICTIONEXON:
      feature = PredictionExon_new(); 
      break;
    case CLASS_REPEATFEATURE:
      feature = RepeatFeature_new();
      break;
    case CLASS_INTRONSUPPORTINGEVIDENCE:
      fprintf(stderr,"!!!!!! ise new in seqfeaturefactory\n");
      feature = IntronSupportingEvidence_new(); 
      break;
    default:
      fprintf(stderr,"Error: Unknown feature type %s SeqFeatureFactory_newFeature\n",Class_findByType(type)->name);
      exit(1);
  }

  return (SeqFeature *)feature;
}