/// <summary> /// Copying Fragment constructor. /// </summary> public Fragment(Fragment frag) { this.Name = frag.Name; this.Sequence = new Sequence(frag.Sequence); this.Source = frag.Source; }
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; }