fix num_het and homalt from 30.1 release
also add gnomad_popmax_AF
see
MODIFY
docs/content/database_schema.rst
docs/content/database_schema.rst
@@ -184,6 +184,7 @@ aaf_gnomad_sas FLOAT Allele frequency (SAS population) of the
aaf_gnomad_non_neuro FLOAT Allele frequency in non_neuro samples
aaf_gnomad_controls FLOAT Allele frequency in control samples
aaf_gnomad_non_cancer FLOAT Allele frequency in non-cancer samples
+gnomad_popmax_AF FLOAT popmax_AF field from gnomad
gnomad_num_het INTEGER Number of het genotypes observed in gnomad
gnomad_num_hom_alt INTEGER Number of hom_alt genotypes observed in gnomad

MODIFY
gemini/annotations.py
gemini/annotations.py
@@ -179,12 +179,13 @@ GnomadInfo = collections.namedtuple('GnomadInfo',
aaf_non_neuro \
aaf_controls \
aaf_non_cancer \
+ popmax_AF \
num_het \
num_hom_alt \
num_chroms")
GNOMAD_EMPTY = GnomadInfo(-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1)
+ -1, -1, -1, -1, -1, -1, -1, -1)
def load_annos(args):
"""
@@ -795,11 +796,10 @@ def get_gnomad_info(var, empty=GNOMAD_EMPTY):
afs[grp] = float(ac) / float(an)
if ac is None or an is None: continue
- nhm = sum(map(int, info_map.get('GC_Male', '').split(",")[1:-1]))
- nhf = sum(map(int, info_map.get('GC_Female', '').split(",")[1:-1]))
-
- num_hets = nhm + nhf
- num_homs = int(info_map.get("Hom", -1))
+ num_homs = int(info_map.get("nhomalt", -1))
+ num_hets = int(info_map.get("AC", -1))
+ if num_hets != -1:
+ num_hets -= 2 * num_homs
called_chroms = int(info_map.get('AN', -1))
@@ -811,6 +811,7 @@ def get_gnomad_info(var, empty=GNOMAD_EMPTY):
info_map.get('non_neuro_AF', -1.0),
info_map.get('controls_AF', -1.0),
info_map.get('non_cancer_AF', -1.0),
+ info_map.get("popmax_AF", -1.0),
num_hets, num_homs,
called_chroms)

MODIFY
gemini/database.py
gemini/database.py
@@ -273,6 +273,7 @@ def create_tables(path, effect_fields=None, pls=True):
aaf_gnomad_non_neuro decimal(2,7),
aaf_gnomad_controls decimal(2,7),
aaf_gnomad_non_cancer decimal(2,7),
+ gnomad_popmax_AF decimal(2,7),
gnomad_num_het int,
gnomad_num_hom_alt int,

MODIFY
gemini/gemini_load_chunk.py
gemini/gemini_load_chunk.py
@@ -689,7 +689,7 @@ class GeminiLoader(object):
aaf_gnomad_non_neuro=gnomad.aaf_non_neuro,
aaf_gnomad_controls=gnomad.aaf_controls,
aaf_gnomad_non_cancer=gnomad.aaf_non_cancer,
-
+ gnomad_popmax_AF=gnomad.popmax_AF,
gnomad_num_het=gnomad.num_het,
gnomad_num_hom_alt=gnomad.num_hom_alt,

MODIFY
gemini/version.py
gemini/version.py
-__version__ = "0.30.1"
+__version__ = "0.30.2"

fix num_het and homalt from 30.1 release

also add gnomad_popmax_AF

see #895