Пример #1
0
 //constructor
 public Alphabet(IAlphabet alphabet, long id)
 {
     if (id < 1)
     {
         UpdaterException.check_data_exception(true);
     }
     this.id                      = 0;
     this.sequence_id             = id;
     this.A                       = 0;
     this.C                       = 0;
     this.G                       = 0;
     this.T                       = 0;
     this.Gap                     = 0;
     this.ACT                     = 0;
     this.AT                      = 0;
     this.GA                      = 0;
     this.GAT                     = 0;
     this.GC                      = 0;
     this.GCA                     = 0;
     this.GT                      = 0;
     this.GTC                     = 0;
     this.TC                      = 0;
     this.Any                     = 0;
     this.has_ambiguity           = (alphabet.HasAmbiguity)? 1:0;
     this.has_gaps                = (alphabet.HasGaps)? 1:0;
     this.has_termination         = (alphabet.HasTerminations)? 1:0;
     this.is_complement_supported = (alphabet.IsComplementSupported)? 1:0;
     this.dna_name                = alphabet.Name;
     this.alphabet_type_count     = alphabet.Count;
     extract_alphabet_IDs(alphabet);
 }
Пример #2
0
        public Metadata(GenBankMetadata metadata, long id)
        {
            this.id = 0;

            if (id < 1)
            {
                UpdaterException.check_data_exception(true);
            }

            this.sequence_id       = id;
            this.primary_accession = metadata.Accession.Primary;

            foreach (var sec in metadata.Accession.Secondary)
            {
                this.secondary_accession += " " + sec;
            }

            this.contig     = metadata.Contig;
            this.definition = metadata.Definition;
            this.keywords   = metadata.Keywords;
            this.prima      = metadata.Primary;
            this.origin     = metadata.Origin;
            this.basecount  = metadata.BaseCount;
            this.dbsource   = metadata.DbSource;
        }
Пример #3
0
 public Comment(string comment, long id)
 {
     if (id < 1)
     {
         UpdaterException.check_data_exception(true);
     }
     this.id            = 0;
     this.value         = comment;
     this.prokaryote_id = id;
 }
Пример #4
0
 public Qualifier_value(string V, long id)
 {
     if (id < 1)
     {
         UpdaterException.check_data_exception(true);
     }
     this.id               = 0;
     this.qualifier_id     = id;
     this.qualifier_values = V;
 }
Пример #5
0
 public Qualifier(string K, long id)
 {
     if (id < 1)
     {
         UpdaterException.check_data_exception(true);
     }
     this.id            = 0;
     this.feature_id    = id;
     this.qualifier_key = K;
 }
Пример #6
0
 public Sequence(ISequence seq, long id)
 {
     if (id < 1 || seq.ID.Count() > 40)
     {
         UpdaterException.check_data_exception(true);
     }
     this.id            = 0;
     this.prokaryote_id = id;
     this.value         = seq.ToString();
     this.count         = seq.Count;
     this.genbank_ID    = seq.ID;
 }
Пример #7
0
 public Version(GenBankVersion ver, long id)
 {
     if (id < 1 || ver.Accession.Length > 40 || ver.GiNumber.Length > 40 || ver.Version.Length > 2)
     {
         UpdaterException.check_data_exception(true);
     }
     this.id                 = 0;
     this.metadata_id        = id;
     this.accession          = ver.Accession;
     this.compound_accession = ver.CompoundAccession;
     this.ginumber           = ver.GiNumber;
     this.version            = ver.Version;
 }
Пример #8
0
        //private int sublocation { get; }
        //private int location_resolver { get; }

        public Feature(FeatureItem feature, long id)
        {
            if (feature == null || id < 1)
            {
                UpdaterException.check_data_exception(true);
            }
            this.location_operator  = (int)feature.Location.Operator + 1;
            this.location_separator = feature.Location.Separator;
            this.id                 = 0;
            this.metadata_id        = id;
            this.key_type           = feature.Key;
            this.label              = feature.Label;
            this.location_accession = feature.Location.Accession;
            this.location_end       = feature.Location.EndData;
            this.location_start     = feature.Location.StartData;
        }
Пример #9
0
        public Dblink(CrossReferenceLink dblink, long id)
        {
            this.type = (int)dblink.Type + 1;

            if (id < 1 || this.type < 1 || this.type > 4)
            {
                UpdaterException.check_data_exception(true);
            }
            this.id = 0;

            foreach (var s in dblink.Numbers)
            {
                this.value += s + "\t";
            }

            this.prokaryote_id = id;
        }
Пример #10
0
        public Locus(GenBankLocusInfo locus, long id)
        {
            this.divisoncode    = (int)locus.DivisionCode + 1;
            this.molecule       = (int)locus.MoleculeType + 1;
            this.strand         = (int)locus.Strand + 1;
            this.strandtopology = (int)locus.StrandTopology + 1;

            if (id < 1 || this.divisoncode > 20 || this.divisoncode < 1 || this.molecule > 10 || this.molecule < 1 || this.strand > 4 || this.strand < 1 || this.strandtopology > 3 || this.strandtopology < 1 || locus.SequenceType.Length > 40)
            {
                UpdaterException.check_data_exception(true);
            }

            this.id          = 0;
            this.metadata_id = id;
            this.date        = locus.Date.ToString("yyyy-MM-dd HH:mm:ss");
            this.strand_type = locus.SequenceType;
        }
Пример #11
0
 public Reference(CitationReference reference, long id)
 {
     if (id < 1)
     {
         UpdaterException.check_data_exception(true);
     }
     this.id            = 0;
     this.prokaryote_id = id;
     this.authors       = reference.Authors;
     this.consortium    = reference.Consortiums;
     this.journal       = reference.Journal;
     this.location      = reference.Location;
     this.medline       = reference.Medline;
     this.pub_med       = reference.PubMed;
     this.remark        = reference.Remarks;
     this.title         = reference.Title;
 }