Locus
- class hail.genetics.Locus[source]
An object that represents a location in the genome.
- Parameters:
contig (
str
) – Chromosome identifier.position (
int
) – Chromosomal position (1-indexed).reference_genome (
str
orReferenceGenome
) – Reference genome to use.
Note
This object refers to the Python value returned by taking or collecting Hail expressions, e.g.
mt.locus.take(5)
. This is rare; it is much more common to manipulate theLocusExpression
object, which is constructed using the following functions:Attributes
Chromosome identifier.
Chromosomal position (1-based).
Reference genome.
Methods
Parses a locus object from a CHR:POS string.
- property 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:
- property position
Chromosomal position (1-based). :rtype: int
- property reference_genome
Reference genome.
- Returns: