예제 #1
0
        public static List <long> GetFileOffsets(string vcfUrl, int numPartitions, Tabix.Index tabixIndex)
        {
            long fileSize = HttpUtilities.GetLength(vcfUrl);

            long[] sizeBasedOffsets = GetEqualSizeOffsets(fileSize, numPartitions);
            return(GetBlockOffsets(sizeBasedOffsets, tabixIndex));
        }
예제 #2
0
 private static long[] GetAllLinearFileOffsets(Tabix.Index tabixIndex) =>
 MergeConsecutiveEqualValues(tabixIndex.ReferenceSequences.SelectMany(x => x.LinearFileOffsets.Select(y => VirtualPosition.From((long)y).FileOffset))).ToArray();
예제 #3
0
        private static List <long> GetBlockOffsets(long[] sizeBasedOffsets, Tabix.Index tabixIndex)
        {
            long[] allLinearOffsets = GetAllLinearFileOffsets(tabixIndex);

            return(FindEqualOrClosestSmallerOffsets(sizeBasedOffsets, allLinearOffsets));
        }