Locus¶
-
class
hail.genetics.
Locus
(contig, position, reference_genome='default')[source]¶ An object that represents a location in the genome.
Parameters: - contig (str or int) – chromosome identifier
- position (int) – chromosomal position (1-indexed)
- reference_genome (
str
orReferenceGenome
) – Reference genome to use.
Attributes
contig
Chromosome identifier. position
Chromosomal position (1-based). reference_genome
Reference genome. Methods
__init__
Initialize self. parse
Parses a locus object from a CHR:POS string. -
contig
¶ Chromosome identifier. :rtype: str
-
classmethod
parse
(string, reference_genome='default')[source]¶ Parses a locus object from a CHR:POS string.
Examples
>>> l1 = hl.Locus.parse('1:101230') >>> l2 = hl.Locus.parse('X:4201230')
Parameters: - string (str) – String to parse.
- reference_genome (
str
orReferenceGenome
) – Reference genome to use. Default isdefault_reference()
.
Return type:
-
position
¶ Chromosomal position (1-based). :rtype: int
-
reference_genome
¶ Reference genome.
Returns: ReferenceGenome