add gnomad non_cancer_AF
MODIFY
docs/content/database_schema.rst
docs/content/database_schema.rst
@@ -183,6 +183,7 @@ aaf_gnomad_oth FLOAT Allele frequency (OTH population) of the
aaf_gnomad_sas FLOAT Allele frequency (SAS population) of the variant in gnomad
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_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
@@ -182,12 +182,13 @@ GnomadInfo = collections.namedtuple('GnomadInfo',
aaf_SAS \
aaf_non_neuro \
aaf_controls \
+ aaf_non_cancer \
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)
def load_annos(args):
"""
@@ -801,8 +802,6 @@ def get_gnomad_info(var, empty=GNOMAD_EMPTY):
afs[grp] = float(ac) / float(an)
if ac is None or an is None: continue
- afs['non_neuro'] = info_map.get('non_neuro_AF', 0.0)
- afs['control'] = info_map.get('controls_AF', 0.0)
nhm = sum(map(int, info_map.get('GC_Male', '').split(",")[1:-1]))
nhf = sum(map(int, info_map.get('GC_Female', '').split(",")[1:-1]))
@@ -817,8 +816,9 @@ def get_gnomad_info(var, empty=GNOMAD_EMPTY):
float(afs['_eas']), float(afs['_fin']),
float(afs['_nfe']), float(afs['_oth']),
float(afs['_sas']),
- info_map.get('non_neuro_AF', 0.0),
- info_map.get('controls_AF', 0.0),
+ info_map.get('non_neuro_AF', -1.0),
+ info_map.get('controls_AF', -1.0),
+ info_map.get('non_cancer_AF', -1.0),
num_hets, num_homs,
called_chroms)

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

MODIFY
gemini/gemini_load_chunk.py
gemini/gemini_load_chunk.py
@@ -690,6 +690,7 @@ class GeminiLoader(object):
aaf_gnomad_sas=gnomad.aaf_SAS,
aaf_gnomad_non_neuro=gnomad.aaf_non_neuro,
aaf_gnomad_controls=gnomad.aaf_controls,
+ aaf_gnomad_non_cancer=gnomad.aaf_non_cancer,
gnomad_num_het=gnomad.num_het,

MODIFY
test/test-gnomad.sh
test/test-gnomad.sh
@@ -32,18 +32,19 @@ check obs.$$ exp.$$
rm obs.$$ exp.$$
echo " gnomad.t02...\n"
-gemini query --header -q "select chrom, start, end, ref, alt, aaf_gnomad_non_neuro, aaf_gnomad_controls from variants" test.exac.db > obs.$$
-echo "chrom start end ref alt aaf_gnomad_non_neuro aaf_gnomad_controls
-chr1 985954 985955 G C -1.0 -1.0
-chr1 1199488 1199489 G A -1.0 -1.0
-chr1 1959698 1959699 G A 0.0164560005069 0.0170828998089
-chr1 161276552 161276553 G T -1.0 -1.0
-chr1 247587092 247587093 C T -1.0 -1.0
-chr9 112185055 112185056 C G 9.61224031926e-06 0.0
-chr12 121432116 121432118 GC G 5.28017008037e-05 6.08346999798e-05
-chr14 105420589 105420590 C T 0.0016407299554 0.00138945004437" > exp.$$
+gemini query --header -q "select chrom, start, end, ref, alt, aaf_gnomad_non_neuro, aaf_gnomad_controls, aaf_gnomad_non_cancer from variants" test.exac.db > obs.$$
+echo "chrom start end ref alt aaf_gnomad_non_neuro aaf_gnomad_controls aaf_gnomad_non_cancer
+chr1 985954 985955 G C -1.0 -1.0 -1.0
+chr1 1199488 1199489 G A -1.0 -1.0 -1.0
+chr1 1959698 1959699 G A 0.0164560005069 0.0170828998089 0.0171958003193
+chr1 161276552 161276553 G T -1.0 -1.0 -1.0
+chr1 247587092 247587093 C T -1.0 -1.0 -1.0
+chr9 112185055 112185056 C G 9.61224031926e-06 0.0 4.22193988925e-06
+chr12 121432116 121432118 GC G 5.28017008037e-05 6.08346999798e-05 5.99675004196e-05
+chr14 105420589 105420590 C T 0.0016407299554 0.00138945004437 0.00172107003164" > exp.$$
check obs.$$ exp.$$
+rm obs.$$ exp.$$
#############################################

add gnomad non_cancer_AF