-- DBMS: snowflake
create or replace TABLE DISEASE_VARIANT_GENE (
	"study_id" VARCHAR(16777216),
	"source" VARCHAR(16777216),
	"pmid" VARCHAR(16777216),
	"pub_date" VARCHAR(16777216),
	"pub_journal" VARCHAR(16777216),
	"pub_title" VARCHAR(16777216),
	"pub_author" VARCHAR(16777216),
	"has_sumstats" BOOLEAN,
	"trait_reported" VARCHAR(16777216),
	"trait_efos" VARIANT,
	"ancestry_initial" VARIANT,
	"ancestry_replication" VARIANT,
	"n_initial" NUMBER(38,0),
	"n_replication" NUMBER(38,0),
	"n_cases" NUMBER(38,0),
	"trait_category" VARCHAR(16777216),
	"num_assoc_loci" NUMBER(38,0),
	"lead_chrom" VARCHAR(16777216),
	"lead_pos" NUMBER(38,0),
	"lead_ref" VARCHAR(16777216),
	"lead_alt" VARCHAR(16777216),
	"tag_chrom" VARCHAR(16777216),
	"tag_pos" NUMBER(38,0),
	"tag_ref" VARCHAR(16777216),
	"tag_alt" VARCHAR(16777216),
	"overall_r2" FLOAT,
	"AFR_1000G_prop" FLOAT,
	"AMR_1000G_prop" FLOAT,
	"EAS_1000G_prop" FLOAT,
	"EUR_1000G_prop" FLOAT,
	"SAS_1000G_prop" FLOAT,
	"log10_ABF" FLOAT,
	"posterior_prob" FLOAT,
	"odds_ratio" FLOAT,
	"oddsr_ci_lower" FLOAT,
	"oddsr_ci_upper" FLOAT,
	"direction" VARCHAR(16777216),
	"beta" FLOAT,
	"beta_ci_lower" FLOAT,
	"beta_ci_upper" FLOAT,
	"pval_mantissa" FLOAT,
	"pval_exponent" NUMBER(38,0),
	"pval" FLOAT,
	"gene_id" VARCHAR(16777216),
	"feature" VARCHAR(16777216),
	"type_id" VARCHAR(16777216),
	"source_id" VARCHAR(16777216),
	"fpred_labels" VARIANT,
	"fpred_scores" VARIANT,
	"fpred_max_label" VARCHAR(16777216),
	"fpred_max_score" FLOAT,
	"qtl_beta" FLOAT,
	"qtl_se" FLOAT,
	"qtl_pval" FLOAT,
	"qtl_score" FLOAT,
	"interval_score" FLOAT,
	"qtl_score_q" FLOAT,
	"interval_score_q" FLOAT,
	"d" NUMBER(38,0),
	"distance_score" FLOAT,
	"distance_score_q" FLOAT
);

INSERT INTO "OPEN_TARGETS_GENETICS_2"."OPEN_TARGETS_GENETICS"."DISEASE_VARIANT_GENE" (has_sumstats, d, AFR_1000G_prop, direction, distance_score_q, qtl_pval, qtl_se, trait_efos, pub_date, qtl_score, posterior_prob, pub_author, n_initial, odds_ratio, pval, beta_ci_lower, n_cases, source, study_id, type_id, interval_score, beta, EAS_1000G_prop, beta_ci_upper, fpred_labels, tag_chrom, qtl_score_q, EUR_1000G_prop, fpred_max_score, n_replication, trait_reported, feature, oddsr_ci_upper, ancestry_replication, AMR_1000G_prop, num_assoc_loci, pmid, pval_exponent, trait_category, qtl_beta, ancestry_initial, tag_pos, lead_alt, lead_ref, tag_ref, fpred_scores, interval_score_q, pub_journal, SAS_1000G_prop, pub_title, tag_alt, pval_mantissa, source_id, oddsr_ci_lower, overall_r2, lead_pos, fpred_max_label, log10_ABF, lead_chrom, gene_id, distance_score) VALUES (True, NULL, 0.0, '-', NULL, 7.90354e-22, 0.0244489, '{
  "list": [
    {
      "element": "EFO_0005091"
    }
  ]
}', '2020-09-01', 21.10217834439148, nan, 'Chen MH', 521594, NULL, 1.2900000000000001e-59, -0.0567646, NULL, 'GCST', 'GCST90002340', 'eqtl', NULL, -0.050669, 0.0, -0.0445734, '{
  "list": []
}', '6', 0.9, 1.0, NULL, NULL, 'Monocyte count', 'CEDAR-T-CELL_CD8', NULL, '{
  "list": []
}', 0.0, 1036, 'PMID:32888493', -59, 'measurement', -0.257172, '{
  "list": [
    {
      "element": "European=521594"
    }
  ]
}', 26378060, 'C', 'T', 'T', '{
  "list": []
}', NULL, 'Cell', 0.0, 'Trans-ethnic and Ancestry-Specific Blood-Cell Genetics in 746,667 Individuals from 5 Global Populations.', 'A', 1.29, 'eqtl', NULL, 0.522729, 26328125, NULL, nan, '6', 'ENSG00000111801', NULL), (True, NULL, 0.0, '+', NULL, 4.78854e-12, 0.0113161, '{
  "list": [
    {
      "element": "EFO_0005091"
    }
  ]
}', '2020-09-01', 11.319796880446816, nan, 'Chen MH', 521594, NULL, 1.46e-54, 0.0271668799999999, NULL, 'GCST', 'GCST90002340', 'eqtl', NULL, 0.0310809999999999, 0.0, 0.03499512, '{
  "list": []
}', '22', 0.6, 1.0, NULL, NULL, 'Monocyte count', 'ROSMAP-BRAIN_NAIVE', NULL, '{
  "list": []
}', 0.0, 1036, 'PMID:32888493', -54, 'measurement', 0.0799647, '{
  "list": [
    {
      "element": "European=521594"
    }
  ]
}', 43169437, 'T', 'C', 'C', '{
  "list": []
}', NULL, 'Cell', 0.0, 'Trans-ethnic and Ancestry-Specific Blood-Cell Genetics in 746,667 Individuals from 5 Global Populations.', 'T', 1.46, 'eqtl', NULL, 0.8490369306240001, 43164757, NULL, nan, '22', 'ENSG00000100304', NULL), (True, NULL, nan, '+', NULL, 2.78023e-06, 0.0402591, '{
  "list": [
    {
      "element": "EFO_0005091"
    }
  ]
}', '2020-09-01', 5.555919274729758, 0.001628938604659, 'Chen MH', 521594, NULL, 3.87e-08, 0.00833312, NULL, 'GCST', 'GCST90002340', 'eqtl', NULL, 0.012945, nan, 0.01755688, '{
  "list": []
}', '17', 0.1, nan, NULL, NULL, 'Monocyte count', 'GTEx-eQTL-ESOPHAGUS_MUSCULARIS', NULL, '{
  "list": []
}', nan, 1036, 'PMID:32888493', -8, 'measurement', 0.191121, '{
  "list": [
    {
      "element": "European=521594"
    }
  ]
}', 46118058, 'T', 'C', 'A', '{
  "list": []
}', NULL, 'Cell', nan, 'Trans-ethnic and Ancestry-Specific Blood-Cell Genetics in 746,667 Individuals from 5 Global Populations.', 'C', 3.87, 'eqtl', NULL, nan, 48011578, NULL, 19.918723504570625, '17', 'ENSG00000185829', NULL), (True, NULL, 0.0, '+', NULL, 8.20536e-07, 0.0140197, '{
  "list": [
    {
      "element": "EFO_0005091"
    }
  ]
}', '2020-09-01', 6.085902360060772, nan, 'Chen MH', 521594, NULL, 6.450000000000002e-32, 0.0184794, NULL, 'GCST', 'GCST90002340', 'eqtl', NULL, 0.022174, 0.0, 0.0258686, '{
  "list": []
}', '2', 0.2, 1.0, NULL, NULL, 'Monocyte count', 'Fairfax_2014-MONOCYTE_NAIVE', NULL, '{
  "list": []
}', 0.0, 1036, 'PMID:32888493', -32, 'measurement', -0.0702148, '{
  "list": [
    {
      "element": "European=521594"
    }
  ]
}', 218295047, 'T', 'C', 'G', '{
  "list": []
}', NULL, 'Cell', 0.0, 'Trans-ethnic and Ancestry-Specific Blood-Cell Genetics in 746,667 Individuals from 5 Global Populations.', 'A', 6.450000000000001, 'eqtl', NULL, 0.771704270089, 218250385, NULL, nan, '2', 'ENSG00000179921', NULL), (True, NULL, 0.0, '-', NULL, 1.97861e-07, 0.0160588, '{
  "list": [
    {
      "element": "EFO_0005091"
    }
  ]
}', '2020-09-01', 6.70363980030569, nan, 'Chen MH', 521594, NULL, 4.82e-09, -0.0147196799999999, NULL, 'GCST', 'GCST90002340', 'eqtl', NULL, -0.0110289999999999, 0.0, -0.0073383199999999, '{
  "list": []
}', '1', 0.4, 1.0, NULL, NULL, 'Monocyte count', 'Alasoo_2018-MACROPHAGE_IFNG', NULL, '{
  "list": []
}', 0.0, 1036, 'PMID:32888493', -9, 'measurement', -0.0926721, '{
  "list": [
    {
      "element": "European=521594"
    }
  ]
}', 20763288, 'G', 'A', 'T', '{
  "list": []
}', NULL, 'Cell', 0.0, 'Trans-ethnic and Ancestry-Specific Blood-Cell Genetics in 746,667 Individuals from 5 Global Populations.', 'C', 4.82, 'eqtl', NULL, 0.843956406241, 21190868, NULL, nan, '1', 'ENSG00000127483', NULL);