Beispiel #1
0
        private static void CheckSequencedBaseDirectionMap(string inputXDtag, string inputCigarString, string sequence,
                                                           DirectionType[] expectedDirectionMap)
        {
            var tagUtils = new TagUtils();

            tagUtils.AddStringTag("XD", inputXDtag);

            var alignment = new BamAlignment
            {
                Bases        = sequence,
                Position     = 100,
                MatePosition = 500,
                Name         = "test",
                CigarData    = new CigarAlignment(inputCigarString),
                MapQuality   = 10,
                TagData      = tagUtils.ToBytes(),
                Qualities    = new[] { (byte)10, (byte)20, (byte)30 }
            };

            var read         = new Read("chr7", alignment);
            var directionMap = read.SequencedBaseDirectionMap;

            Assert.Equal(expectedDirectionMap, directionMap);

            var directTestMap = Read.CreateSequencedBaseDirectionMap(read.CigarDirections, read.CigarData);

            Assert.Equal(expectedDirectionMap, directTestMap);
        }