Exemplo n.º 1
0
boolean dataentry_add_ThreeStateDB(DataEntry * de,ThreeStateScore * tss,ThreeStateDB * mdb)
{

  switch(mdb->dbtype) {
  case TSMDB_SINGLE :
    de->name = stringalloc(mdb->single->name);
    return TRUE;
  case TSMDB_HMMER1PFAM :
    if( tss == NULL ) {
    } else {
      de->name = stringalloc(tss->name);
    }
    return TRUE;
  case TSMDB_PROTEIN :
    add_SequenceDB_info_DataEntry(mdb->sdb,de);
    return TRUE;
  case TSMDB_GENERIC :
    if( (*mdb->dataentry_add)(mdb,de) == FALSE ) {
      warn("Could not add dataentry info to the entry %s",tss->name);
      return FALSE;
    } else {
      return TRUE;
    }
    
  default : 
    warn("Unknown threestatedb type");
    return FALSE;
  }


  return TRUE;
}
Exemplo n.º 2
0
boolean dataentry_add_GenomicDB(DataEntry * de,ComplexSequence * cs,GenomicDB * gendb)
{
  de->name = stringalloc(cs->seq->name);
  de->is_reversed = is_reversed_Sequence(cs->seq);

  if( gendb->is_single_seq ) {
    return TRUE;
  }

  add_SequenceDB_info_DataEntry(gendb->sdb,de);
  return TRUE;
}
Exemplo n.º 3
0
boolean dataentry_add_cDNADB(DataEntry * de,ComplexSequence * cs,cDNADB * cdnadb)
{
  if( cs == NULL || cs->seq == NULL ) {
    warn("Adding a dataentry with a NULL complex sequence or null internal sequence. Nope!");
    return FALSE;
  }

  if( cdnadb->is_single_seq == FALSE) 
    add_SequenceDB_info_DataEntry(cdnadb->sdb,de);
  de->name = stringalloc(cs->seq->name);
  de->is_reversed = is_reversed_Sequence(cs->seq);
  return TRUE;
}