Skip to content

Commit

Permalink
rename species.reference_genome to assembly
Browse files Browse the repository at this point in the history
as per generally accepted terminology
#4 (comment)
  • Loading branch information
dhimmel committed Oct 14, 2021
1 parent ba92b3d commit 99201cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ensembl_genes/ensembl_genes.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self, species: Union[str, Species] = "human", release: str = "lates
self.species = get_species(species)
self.release = check_ensembl_release(release)
self.database = (
f"{self.species.name}_core_{self.release}_{self.species.reference_genome}"
f"{self.species.name}_core_{self.release}_{self.species.assembly}"
)

@property
Expand Down
8 changes: 4 additions & 4 deletions ensembl_genes/species.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class Species:
name: str
common_name: str
reference_genome: str
assembly: str
ensembl_gene_pattern: str
enable_mhc: bool
mhc_chromosome: str
Expand Down Expand Up @@ -45,7 +45,7 @@ def get_mhc_category(self, gene: GeneForMHC) -> Optional[str]:
name="homo_sapiens",
common_name="human",
# GRCh38
reference_genome="38",
assembly="38",
# Regex pattern that valid human ensembl gene IDs should match.
# https://bioinformatics.stackexchange.com/a/15044/9750
ensembl_gene_pattern=r"^ENSG[0-9]{11}$",
Expand All @@ -64,7 +64,7 @@ def get_mhc_category(self, gene: GeneForMHC) -> Optional[str]:
mouse = Species(
name="mus_musculus",
common_name="mouse",
reference_genome="39", # GRCm39
assembly="39", # GRCm39
ensembl_gene_pattern=r"^ENSMUSG[0-9]{11}$",
# FIXME: mhc coordinates (H2 complex)
# https://doi.org/10.1002/9780470015902.a0000921.pub4
Expand All @@ -80,7 +80,7 @@ def get_mhc_category(self, gene: GeneForMHC) -> Optional[str]:
name="rattus_norvegicus",
common_name="rat",
# Rnor_6.0
reference_genome="6",
assembly="6",
# https://github.com/related-sciences/ensembl-genes/issues/4#issuecomment-941556912
ensembl_gene_pattern=r"^ENSRNOG[0-9]{11}$",
# FIXME: mhc coordinates
Expand Down

0 comments on commit 99201cc

Please sign in to comment.