Esempio n. 1
0
 public Sequencer(uint[] c, OccurrenceArray[] occurrences, OccurrenceArray[] occurrencesRev,
                   CompressedSuffixArray suffixArray, CompressedSuffixArray suffixArrayRev,
                   int threadCount)
 {
     _c = c;
     _occurrences = occurrences;
     _occurrencesRev = occurrencesRev;
     _suffixArray = suffixArray;
     _suffixArrayRev = suffixArrayRev;
     _database = new AlignmentDatabase("temp.db");
     _threadCount = threadCount;
 }
        public static CompressedSuffixArray CreateFromFile(string fileName, DnaBwt bwt, OccurrenceArray[] occ, uint[] c)
        {
            var buffer = File.ReadAllBytes(fileName);
            uint[] compressedSufArray = new uint[buffer.Length/4];
            for (int i = 0; i < compressedSufArray.Length; i++)
            {
                compressedSufArray[i] = BitConverter.ToUInt32(buffer, i*4);
            }

            CompressedSuffixArray csa = new CompressedSuffixArray(compressedSufArray, bwt, occ, c);
            return csa;
        }
Esempio n. 3
0
 public Sequencer(uint[] c, OccurrenceArray[] occurrences, OccurrenceArray[] occurrencesRev,
                   CompressedSuffixArray suffixArray, CompressedSuffixArray suffixArrayRev)
     : this(c, occurrences, occurrencesRev,
            suffixArray, suffixArrayRev, Environment.ProcessorCount + 2)
 {
 }