示例#1
0
 /// <summary>
 /// Copying Fragment constructor.
 /// </summary>
 public Fragment(Fragment frag)
 {
     this.Name     = frag.Name;
     this.Sequence = new Sequence(frag.Sequence);
     this.Source   = frag.Source;
 }
示例#2
0
 /// <summary>
 /// Copying Fragment constructor.
 /// </summary>
 public Fragment(Fragment frag)
 {
     this.Name = frag.Name;
     this.Sequence = new Sequence(frag.Sequence);
     this.Source = frag.Source;
 }
示例#3
0
        public void openProject(String file)
        {
            Sequence sequence = null;

            parser = SequenceParsers.GenBank;
            parser.Open(file);
            sequence = (Sequence)parser.Parse().ToList()[0];
            parser.Close();

            Fragment project = new Fragment(file, "project", sequence);
            GenBankMetadata meta = sequence.Metadata["GenBank"] as GenBankMetadata;
            FragmentDict = new Dictionary<string, Fragment>();
            foreach (var feat in meta.Features.MiscFeatures)
            {
                String subseq = project.GetString().Substring(feat.Location.LocationStart-1, feat.Location.LocationEnd - feat.Location.LocationStart + 1);
                FragmentDict.Add(feat.StandardName, new Fragment(file, feat.StandardName, new Sequence(Alphabets.AmbiguousDNA, subseq)));
            }
        }        
 /// <summary>
 /// FragmentViewModel constructor.
 /// </summary>
 /// <param name="m">Fragment model.</param>
 public FragmentViewModel(Fragment m)
 {
     this.Model = m;
 }