private void Instance_SequenceParseCompleted(iDnaSequence sender, int nodeCount) { if (sender != null) { textBlockNodeCount.Text = sender.Count.ToString(); } }
public static async Task <iDnaSequence> FromString(string str) { iDnaSequence sequence = new iDnaSequence(); await sequence.ParseString(str); return(sequence); }
private void _sequence_SequenceParseCompleted(iDnaSequence sender, int nodeCount) { if (_sequence == null) { return; } // assign repeats and hairpins only after parse string process is complete _sequence.RepeatsRegionIndex = _deserializedRepeatIndexes; _sequence.HairpinsRegionIndex = _deserializedHairPinIndexes; _sequence.NotifySequenceLoaded(); }
public iDnaRegionIndex(iDnaSequence sequence, string regionName) : base() { _name = regionName; if (sequence == null) { return; } int min = sequence.Min(i => i.Index), max = sequence.Max(i => i.Index); _limitMin = min; _limitMax = max; _minValue = min; _maxValue = max; }
/// <summary> /// rebuild sequence basket (repeats and hairpins) from region indexes /// </summary> /// <param name="sourceSequence">the parent sequence to which the basket should be attached</param> /// <param name="sourceList">the region index list</param> /// <returns>the list of sequence basket</returns> protected static List <iDnaSequence> RegionListToSequenceList(iDnaSequence sourceSequence, iDnaRegionIndexList sourceList) { List <iDnaSequence> list = new List <iDnaSequence>(); if (sourceList == null || sourceList.Count() <= 0 || sourceSequence == null) { return(list); } foreach (var region in sourceList) { var nodes = sourceSequence.Where(i => i.Index >= region.MinValue && i.Index <= region.MaxValue); if (nodes == null || nodes.Count() <= 0) { continue; } list.Add(new iDnaSequence(region.Name, nodes, refOnly: true, nOccurrences: region.Occurrences)); } return(list); }
protected override void OnStartup(StartupEventArgs e) { if (e == null) { base.OnStartup(e); return; } string[] args = e.Args; iDnaSequence seq = iDnaSequence.Instance; if (args != null && args.Length > 0) { _startupFileName = args[0]; } if (seq != null) { seq.SequenceParseCompleted += Seq_SequenceParseCompleted; } base.OnStartup(e); }
/// <summary> /// for deserialzation ! /// </summary> /// <param name="seq"></param> internal void SetParentSequenceNoCheck(iDnaSequence seq) { _parentSequence = seq; }
public iDnaRegionIndexList(iDnaSequence sequence, string regionName) { _parentSequence = sequence; }
private void Seq_SequenceParseCompleted(iDnaSequence sender, int nodeCount) { SetMainWindowTitle(iDnaSequence.Instance.Name); }
void InitialzeRootSequence() { _sequence = iDnaSequence.Instance; _sequence.SequenceParseCompleted += _sequence_SequenceParseCompleted; }
public iDnaSequenceContract(iDnaSequence sequence) : base() { _sequence = sequence; }
public iDnaSequenceContract() : base() { _sequence = iDnaSequence.Instance; }
public iDnaNode(iDnaSequence parentSequence, iDnaBase rootBase, int index) : base() { _parentSequence = parentSequence; _base = rootBase; _index = index; }