module: genome_integration.gene_regions¶
These functions are being used to prioritize genes in certain already associated regions.
-
class
genome_integration.gene_regions.StartEndRegion(*args, **kwargs)¶ Class that implements a genomic region, which is really a stretch of base pairs.
- chromosome: str
- string representing the chromosome
- start: int
- start base pair position of the genomic region.
- end: int
- end position of the genomic region.
- position_in_region(self, chr, position):
- returns a bool on if the single position is within the region.
- snp_in_region(chr, position)
- returns a bool on if the single position is within the region. synonym method of position in region.
- snp_object_in_region(snp_object)
- returns a bool on if the object of class SNP is within the region.
- region_overlaps(other_region)
- returns a bool if another of region of the same class overlaps.
-
position_in_region(chr, position)¶ return if the position is in the region.
Parameters: - chr – chromosome str or castable to str
- position – position int or castable to int
Returns: bool
-
snp_in_region(chr, position)¶ return if the position is in the region. synonym method of position_in_region method.
Parameters: - chr – chromosome str or castable to str
- position – position int or castable to int
Returns: bool
-
snp_object_in_region(snp_object)¶ Parameters: snp_object – object of type SNP (this package) Returns: True or false if snp in region
-
class
genome_integration.gene_regions.StartEndRegions(list_of_regions)¶ This class contains multiple start end regions
gene_regions: list of StartEndRegion objects
- in_gene_regions(self, chr, position)
- identifies if a position is in any of the regions.
- make_non_overlapping_regions(self)
- combines the regions into contiguous non-overlapping regions.
-
in_gene_regions(chr, position)¶ Identify if a snp is in any of the gene regions.
Parameters: - chr – chromosome castable to str
- position – position castable to int
Returns: boolean
-
make_non_overlapping_regions()¶ Combines all overlapping regions, and turns them into one big region.
Returns: new instance of StartEndRegions containing contiguous, non overlapping regions