Locus¶
-
class
hail.representation.
Locus
(contig, position)[source]¶ An object that represents a location in the genome.
Parameters: - contig (str or int) – chromosome identifier
- position (int) – chromosomal position (1-indexed)
Attributes
contig
Chromosome identifier. position
Chromosomal position (1-based). Methods
__init__
x.__init__(…) initializes x; see help(type(x)) for signature parse
Parses a locus object from a CHR:POS string. -
contig
¶ Chromosome identifier. :rtype: str
-
static
parse
(string)[source]¶ Parses a locus object from a CHR:POS string.
Examples
>>> l1 = Locus.parse('1:101230') >>> l2 = Locus.parse('X:4201230')
Return type: Locus
-
position
¶ Chromosomal position (1-based). :rtype: int