class_docstr: Python interface class for in-memory SAM/BAM/CRAM reader.
  
  Attributes:
    reads: list[nucleus.genomics.v1.Read]. The list of in-memory reads.
    is_sorted: bool, True if reads are sorted.
class_docstr_tok: ["Python","interface","class","for","in-memory","SAM\/BAM\/CRAM","reader",".","Attributes",":","reads",":","list","[","nucleus.genomics.v1.Read","]",".","The","list","of","in-memory","reads",".","is_sorted",":","bool",",","True","if","reads","are","sorted","."]
code: def __init__(self, reads, is_sorted=False):
      self.replace_reads(reads, is_sorted=is_sorted)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from third_party.nucleus.io import genomics_reader
  from third_party.nucleus.io import genomics_writer
  from third_party.nucleus.io.python import sam_reader
  from third_party.nucleus.io.python import sam_writer
  from third_party.nucleus.protos import reads_pb2
  from third_party.nucleus.util import ranges
  from third_party.nucleus.util import utils
label_desc: Use image node_id 1 to create a new InMemorySamReader object from inherited base classes: object with example: obj = InMemorySamReader(reads, is_sorted)