public void TestAddFeatureLists () { Sequence seq = new Sequence( AlphabetType.DNA, "ACTG" ); FeatureList flist1 = new FeatureList( "test1" ); FeatureList flist2 = new FeatureList( "test2" ); AnnotatedList<FeatureList> flists = new AnnotatedList<FeatureList>(); flists.Add( flist1 ); flists.Add( flist2 ); seq.AddFeatures( flists ); Assert.AreEqual( 2, seq.FeatureLists.Count ); }
/// <summary> /// Adds a list of feature lists to the sequence by a already created annotatedList /// as well. /// </summary> /// <param name="featureLists"> List of feature lists. </param> public void AddFeatures(AnnotatedList featureLists) { for (int i = 0; i < featureLists.Count; i++) AddFeatures((FeatureList)featureLists.Get(i)); }
/// <summary> /// Gets a list of features attached to the sequence. If there /// is no list attached to sequence yet the method will create an empty one /// and attach it to the sequence. /// </summary> /// <returns> Returns the list of feature lists attached to the sequence. </returns> public AnnotatedList Features() { if (ListFeatures == null) ListFeatures = new AnnotatedList(); return ListFeatures; }
public void SetUp() { list = new AnnotatedList<Sequence>("test"); }