Skip to content

Commit

Permalink
Fixing chrMT import for dbsnp.
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Oct 20, 2021
1 parent 62ce102 commit a8930a8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions importer/management/commands/import_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ def _handle_import(self, import_info, options):
TABLES[import_info["build"]][table_group],
force=options["force"],
truncate=options["truncate"],
release=import_info["build"],
)
# Special import routine for gene intervals
elif table_group in ("ensembl_genes", "refseq_genes"):
Expand Down Expand Up @@ -640,9 +641,10 @@ def _replace_pk_in_kegg_and_import(self, mapping, path, release_info, table, for
def _import_gnomad(self, path, tables, force, truncate):
self._import_chromosome_wise(path, tables, force, truncate, list(range(1, 23)) + ["X"])

def _import_dbsnp(self, path, tables, force, truncate):
def _import_dbsnp(self, path, tables, force, truncate, release):
chr_mt = ["MT"] if release == "GRCh37" else ["M"]
self._import_chromosome_wise(
path, tables, force, truncate, list(range(1, 23)) + ["X", "Y", "MT"]
path, tables, force, truncate, list(range(1, 23)) + ["X", "Y"] + chr_mt
)

def _import_chromosome_wise(self, path, tables, force, truncate, chroms):
Expand Down

0 comments on commit a8930a8

Please sign in to comment.