class_docstr: An object that represents a `reference genome <https://en.wikipedia.org/wiki/Reference_genome>`__.
  
  Examples
  --------
  
  >>> contigs = ["1", "X", "Y", "MT"]
  >>> lengths = {"1": 249250621, "X": 155270560, "Y": 59373566, "MT": 16569}
  >>> par = [("X", 60001, 2699521)]
  >>> my_ref = hl.ReferenceGenome("my_ref", contigs, lengths, "X", "Y", "MT", par)
  
  Notes
  -----
  Hail comes with predefined reference genomes (case sensitive!):
  
   - GRCh37, Genome Reference Consortium Human Build 37
   - GRCh38, Genome Reference Consortium Human Build 38
   - GRCm38, Genome Reference Consortium Mouse Build 38
   - CanFam3, Canis lupus familiaris (dog)
  
  You can access these reference genome objects using :func:`~hail.get_reference`:
  
  >>> rg = hl.get_reference('GRCh37')
  >>> rg = hl.get_reference('GRCh38')
  >>> rg = hl.get_reference('GRCm38')
  >>> rg = hl.get_reference('CanFam3')
  
  Note that constructing a new reference genome, either by using the class
  constructor or by using `read` will add the reference genome to the list of
  known references; it is possible to access the reference genome using
  :func:`~hail.get_reference` anytime afterwards.
  
  Note
  ----
  Reference genome names must be unique. It is not possible to overwrite the
  built-in reference genomes.
  
  Note
  ----
  Hail allows setting a default reference so that the ``reference_genome``
  argument of :func:`~hail.methods.import_vcf` does not need to be used
  constantly. It is a current limitation of Hail that a custom reference
  genome cannot be used as the ``default_reference`` argument of
  :func:`~hail.init`. In order to set a custom reference genome as default,
  pass the reference as an argument to :func:`~hail.default_reference` after
  initializing Hail.
  
  Parameters
  ----------
  name : :class:`str`
      Name of reference. Must be unique and NOT one of Hail's
      predefined references: ``'GRCh37'``, ``'GRCh38'``, ``'GRCm38'``,
      ``'CanFam3'`` and ``'default'``.
  contigs : :obj:`list` of :class:`str`
      Contig names.
  lengths : :obj:`dict` of :class:`str` to :obj:`int`
      Dict of contig names to contig lengths.
  x_contigs : :class:`str` or :obj:`list` of :obj:`str`
      Contigs to be treated as X chromosomes.
  y_contigs : :class:`str` or :obj:`list` of :obj:`str`
      Contigs to be treated as Y chromosomes.
  mt_contigs : :class:`str` or :obj:`list` of :obj:`str`
      Contigs to be treated as mitochondrial DNA.
  par : :obj:`list` of :obj:`tuple` of (str, int, int)
      List of tuples with (contig, start, end)
class_docstr_tok: ["An","object","that","represents","a","`","reference","genome","<","https",":","\/\/en.wikipedia.org\/wiki\/Reference_genome",">","`","__",".","Examples","--","--","--","--",">",">",">","contigs","=","[","``","1","''",",","``","X","''",",","``","Y","''",",","``","MT","''","]",">",">",">","lengths","=","{","``","1","''",":","249250621",",","``","X","''",":","155270560",",","``","Y","''",":","59373566",",","``","MT","''",":","16569","}",">",">",">","par","=","[","(","``","X","''",",","60001",",","2699521",")","]",">",">",">","my_ref","=","hl.ReferenceGenome","(","``","my_ref","''",",","contigs",",","lengths",",","``","X","''",",","``","Y","''",",","``","MT","''",",","par",")","Notes","--","--","-","Hail","comes","with","predefined","reference","genomes","(","case","sensitive","!",")",":","-","GRCh37",",","Genome","Reference","Consortium","Human","Build","37","-","GRCh38",",","Genome","Reference","Consortium","Human","Build","38","-","GRCm38",",","Genome","Reference","Consortium","Mouse","Build","38","-","CanFam3",",","Canis","lupus","familiaris","(","dog",")","You","can","access","these","reference","genome","objects","using",":","func",":","`","~hail.get_reference","`",":",">",">",">","rg","=","hl.get_reference","(","'GRCh37","'",")",">",">",">","rg","=","hl.get_reference","(","'GRCh38","'",")",">",">",">","rg","=","hl.get_reference","(","'GRCm38","'",")",">",">",">","rg","=","hl.get_reference","(","'CanFam3","'",")","Note","that","constructing","a","new","reference","genome",",","either","by","using","the","class","constructor","or","by","using","`","read","`","will","add","the","reference","genome","to","the","list","of","known","references",";","it","is","possible","to","access","the","reference","genome","using",":","func",":","`","~hail.get_reference","`","anytime","afterwards",".","Note","--","--","Reference","genome","names","must","be","unique",".","It","is","not","possible","to","overwrite","the","built-in","reference","genomes",".","Note","--","--","Hail","allows","setting","a","default","reference","so","that","the","``","reference_genome","``","argument","of",":","func",":","`","~hail.methods.import_vcf","`","does","not","need","to","be","used","constantly",".","It","is","a","current","limitation","of","Hail","that","a","custom","reference","genome","can","not","be","used","as","the","``","default_reference","``","argument","of",":","func",":","`","~hail.init","`",".","In","order","to","set","a","custom","reference","genome","as","default",",","pass","the","reference","as","an","argument","to",":","func",":","`","~hail.default_reference","`","after","initializing","Hail",".","Parameters","--","--","--","--","--","name",":",":","class",":","`","str","`","Name","of","reference",".","Must","be","unique","and","NOT","one","of","Hail's","predefined","references",":","``","'GRCh37","'","``",",","``","'GRCh38","'","``",",","``","'GRCm38","'","``",",","``","'CanFam3","'","``","and","``","'default","'","``",".","contigs",":",":","obj",":","`","list","`","of",":","class",":","`","str","`","Contig","names",".","lengths",":",":","obj",":","`","dict","`","of",":","class",":","`","str","`","to",":","obj",":","`","int","`","Dict","of","contig","names","to","contig","lengths",".","x_contigs",":",":","class",":","`","str","`","or",":","obj",":","`","list","`","of",":","obj",":","`","str","`","Contigs","to","be","treated","as","X","chromosomes",".","y_contigs",":",":","class",":","`","str","`","or",":","obj",":","`","list","`","of",":","obj",":","`","str","`","Contigs","to","be","treated","as","Y","chromosomes",".","mt_contigs",":",":","class",":","`","str","`","or",":","obj",":","`","list","`","of",":","obj",":","`","str","`","Contigs","to","be","treated","as","mitochondrial","DNA",".","par",":",":","obj",":","`","list","`","of",":","obj",":","`","tuple","`","of","(","str",",","int",",","int",")","List","of","tuples","with","(","contig",",","start",",","end",")"]
code: def __hash__(self):
      return hash(self.name)
  
imports: from bisect import bisect_right
  import json
  import re
  from hail.typecheck import typecheck_method, sequenceof, dictof, oneof, sized_tupleof, nullable, transformed, lazy
  from hail.utils.misc import wrap_to_list
  from hail.utils.java import Env
  import hail
label_desc: Use image node_id 6 for calling the ReferenceGenome obj's underlying member method code with example usage: obj.__hash__() and returns: hash