예제 #1
0
 /// <summary>
 /// Private constructor for clone method.
 /// </summary>
 /// <param name="other">Other NonCodingRNA instance.</param>
 private NonCodingRna(NonCodingRna other)
     : base(other) { }
예제 #2
0
 /// <summary>
 /// Private constructor for clone method.
 /// </summary>
 /// <param name="other">Other NonCodingRNA instance.</param>
 private NonCodingRna(NonCodingRna other)
     : base(other)
 {
 }
예제 #3
0
        /// <summary>
        ///     Validate GenBank Non Coding RNA features
        /// </summary>
        /// <param name="nodeName">XML node name</param>
        /// <param name="genMetadata">GenBank Metadata</param>
        private void ValidateGenBankNonCodingRNA(string nodeName,
                                                 GenBankMetadata genMetadata)
        {
            // Get Values from XML node.           
            string expectedLocation = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.Location);
            string featureCount = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.QualifierCount);
            string expectedLabel = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.LabelNode);
            string expectedNonCodingRnaClass = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.NonCodingRnaClassNode);

            List<NonCodingRna> nonCodingRNAFeatureList =
                genMetadata.Features.NonCodingRNAs;
            var locBuilder = new LocationBuilder();

            // Create a copy of Non coding RNA feature.
            NonCodingRna cloneNonCodingRNA =
                nonCodingRNAFeatureList[0].Clone();

            // Validate Non Coding RNA Region qualifiers.
            Assert.AreEqual(nonCodingRNAFeatureList.Count.ToString((IFormatProvider) null),
                            featureCount);
            Assert.AreEqual(nonCodingRNAFeatureList[0].NonCodingRnaClass,
                            expectedNonCodingRnaClass);
            Assert.AreEqual(cloneNonCodingRNA.Label,
                            expectedLabel);
            Assert.AreEqual(locBuilder.GetLocationString(
                genMetadata.Features.NonCodingRNAs[0].Location),
                            expectedLocation);

            // Create a non Coding RNA and validate the same.
            var nRNA =
                new NonCodingRna(genMetadata.Features.NonCodingRNAs[0].Location);
            var nRNAWithLocation =
                new NonCodingRna(expectedLocation);

            // Set properties 
            nRNA.NonCodingRnaClass = expectedNonCodingRnaClass;
            nRNAWithLocation.NonCodingRnaClass = expectedNonCodingRnaClass;

            // Validate created nRNA.
            Assert.AreEqual(nRNA.NonCodingRnaClass,
                            expectedNonCodingRnaClass);
            Assert.AreEqual(nRNAWithLocation.NonCodingRnaClass,
                            expectedNonCodingRnaClass);
        }