/// <summary> /// calls the Sort() method in BAMSort and checks if a BAMSortedIndex is returned. /// </summary> /// <param name="seqAlignment">SequenceAlignmentMap to be sorted</param> /// <param name="sortType">The sort type to be used when sorting using BAMSort</param> private void ValidateSort(SequenceAlignmentMap seqAlignment, BAMSortByFields sortType) { var sorter = new BAMSort(seqAlignment, sortType); IList<BAMSortedIndex> sortedIndex = sorter.Sort(); Assert.IsNotNull(sortedIndex); Assert.IsTrue(this.IsSortedIndex(sortedIndex, sortType)); }
/// <summary> /// Sort Sequence Alignments. /// </summary> /// <param name="map">SAM object to be sorted.</param> /// <param name="bAMSortType">Sort based on genomic coordinates or read name.</param> /// <returns></returns> private IList<BAMSortedIndex> Sort(SequenceAlignmentMap map, BAMSortByFields bAMSortType) { BAMSort sort = new BAMSort(map, bAMSortType); return sort.Sort(); }