CanvasBin.CanvasBin.InitializeAlignmentArrays C# (CSharp) Метод

InitializeAlignmentArrays() статический приватный Метод

Sets up two Dictionaries holding BitArrays, one BitArray for each chromosome in a fasta file. One bit for each nucleotide.
static private InitializeAlignmentArrays ( string fastaFile, string chromosome, CanvasCoverageMode coverageMode, BitArray>.IDictionary possibleAlignments, HitArray>.IDictionary observedAlignments, Int16[]>.IDictionary fragmentLengths ) : void
fastaFile string Fasta file containing uniquemer-marked reference genome.
chromosome string
coverageMode CanvasCoverageMode
possibleAlignments BitArray>.IDictionary Stores which alignments are possible (perfect and unique).
observedAlignments HitArray>.IDictionary Stores observed alignments from a sample.
fragmentLengths Int16[]>.IDictionary Stores fragment length (Int16).
Результат void
        static void InitializeAlignmentArrays(string fastaFile, string chromosome, CanvasCoverageMode coverageMode, IDictionary<string, BitArray> possibleAlignments, IDictionary<string, HitArray> observedAlignments, IDictionary<string, Int16[]> fragmentLengths)
        {
            string referenceBases = FastaLoader.LoadFastaSequence(fastaFile, chromosome);

            BitArray possible = new BitArray(referenceBases.Length);
            possibleAlignments[chromosome] = possible;
            observedAlignments[chromosome] = new HitArray(referenceBases.Length);
            if (coverageMode == CanvasCoverageMode.GCContentWeighted)
                fragmentLengths[chromosome] = new Int16[referenceBases.Length];
            else
                fragmentLengths[chromosome] = new Int16[0];
            // Mark which k-mers in the fasta file are unique. These are indicated by upper-case letters.
            for (int i = 0; i < referenceBases.Length; i++)
            {
                if (char.IsUpper(referenceBases[i]))
                    possible[i] = true;
            }
        }