class_docstr: Class for reading from FASTA files containing a reference genome.
docstr: Initializes an IndexedFastaReader.
  
  Args:
    input_path: string. A path to a resource containing FASTA records.
    keep_true_case: bool. If False, casts all bases to uppercase before
      returning them.
    cache_size: integer. Number of bases to cache from previous queries.
      Defaults to 64K.  The cache can be disabled using cache_size=0.
docstr_tok: ["Initializes","an","IndexedFastaReader",".","Args",":","input_path",":","string",".","A","path","to","a","resource","containing","FASTA","records",".","keep_true_case",":","bool",".","If","False",",","casts","all","bases","to","uppercase","before","returning","them",".","cache_size",":","integer",".","Number","of","bases","to","cache","from","previous","queries",".","Defaults","to","64K",".","The","cache","can","be","disabled","using","cache_size=0","."]
code: def __init__(self, input_path, keep_true_case=False, cache_size=None):
      """Initializes an IndexedFastaReader.
  
      Args:
        input_path: string. A path to a resource containing FASTA records.
        keep_true_case: bool. If False, casts all bases to uppercase before
          returning them.
        cache_size: integer. Number of bases to cache from previous queries.
          Defaults to 64K.  The cache can be disabled using cache_size=0.
      """
      super(IndexedFastaReader, self).__init__()
  
      options = fasta_pb2.FastaReaderOptions(
          keep_true_case=keep_true_case
      )
  
      fasta_path = input_path
      fai_path = fasta_path + ".fai"
      if cache_size is None:
          # Use the C++-defined default cache size.
          self._reader = reference.IndexedFastaReader.from_file(
              fasta_path, fai_path, options
          )
      else:
          self._reader = reference.IndexedFastaReader.from_file(
              fasta_path, fai_path, options, cache_size
          )
  
      # TODO: Define a RefFastaHeader proto, and use it instead of this.
      self.header = RefFastaHeader(contigs=self._reader.contigs)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import six
  from etils import epath
  from third_party.nucleus.io import genomics_reader
  from third_party.nucleus.io.python import reference
  from third_party.nucleus.protos import fasta_pb2
  from third_party.nucleus.protos import reference_pb2
  from third_party.nucleus.util import ranges
label_desc: Use image node_id 1 to create a new IndexedFastaReader object from inherited base classes: genomics_reader with example: obj = IndexedFastaReader(input_path, keep_true_case, cache_size)