Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the VirtualAlignedSequenceList class with a specified provider,
 /// a specified parser, and a specifed sequence count.
 /// </summary>
 /// <param name="provider">SequencePointer provider from sidecar file.</param>
 /// <param name="parser">Parser used to parse sequence data on request.</param>
 /// <param name="count">Number of items in the actual file.</param>
 public VirtualAlignedSequenceList(SidecarFileProvider provider, IVirtualSequenceAlignmentParser parser, int count)
 {
     _sequenceParser     = parser;
     _sidecarProvider    = provider;
     _count              = count;
     _sequenceDictionary = new Dictionary <int, WeakReference>();
 }
Exemple #2
0
        public void ValidateSamParserWithDVIscFile()
        {
            // Gets the expected sequence from the Xml
            string filePath = _utilityObj._xmlUtil.GetTextValue(
                Constants.SAMFileWithRefNode, Constants.FilePathNode);

            ISequenceAlignmentParser iSeqParser =
                SequenceAlignmentParsers.FindParserByFile(filePath);

            if (null != iSeqParser)
            {
                IVirtualSequenceAlignmentParser vParserObj =
                    iSeqParser as IVirtualSequenceAlignmentParser;
                if (null != vParserObj)
                {
                    vParserObj.EnforceDataVirtualization = true;
                }
                else
                {
                    Assert.Fail("SAM P1 Cases : Could not find the SAM Parser Object.");
                }

                string iscFilePath =
                    string.Concat(filePath, ".isc");

                iSeqParser.Parse(filePath);

                if (File.Exists(iscFilePath))
                {
                    Console.WriteLine(
                        "SAM P1 Cases : DV enabled as expected and isc file created successfully.");
                    ApplicationLog.WriteLine(
                        "SAM P1 Cases : DV enabled as expected and isc file created successfully.");
                }
                else
                {
                    Assert.Fail("SAM P1 Cases : DV not enabled as expected.");
                }
            }
            else
            {
                Assert.Fail("SAM P1 Cases : Could not find the SAM file");
            }
        }