You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Example 2: Investigating polygenic risk scores for gestational diabetes
Step 1
frompandaspgsimport*
Step 2
traits=get_traits(term='gestational diabetes')traits.traits# id label description url# 0 EFO_0004593 gestational diabetes Carbohydrate intolerance first diagnosed durin... http://www.ebi.ac.uk/efo/EFO_0004593traits.traits['id'][0]# 'EFO_0004593'traits.traits['description'][0]# 'Carbohydrate intolerance first diagnosed during pregnancy. [NCIT: P378]'
Step 3
gd_pgs=get_scores(trait_id='EFO_0004593')gd_pgs.scores# id name ftp_scoring_file matches_publication trait_reported trait_additional method_name method_params variants_number variants_interactions variants_genomebuild weight_type date_release license publication.id publication.title publication.doi publication.PMID publication.journal publication.firstauthor publication.date_publication ftp_harmonized_scoring_files.GRCh38.positions ftp_harmonized_scoring_files.GRCh37.positions# 0 PGS002256 GRS4_GDM https://ftp.ebi.ac.uk/pub/databases/spot/pgs/s... True Gestational diabetes mellitus in early pregnancy None Genome-wide significant variants p < 0.05 4 0 NR log(OR) 2022-02-16 PGS obtained from the Catalog should be cited ... PGP000282 An early prediction model for gestational diab... 10.1186/s13098-022-00788-y 35073990 Diabetol Metab Syndr Wu Q 2022-01-24 https://ftp.ebi.ac.uk/pub/databases/spot/pgs/s... https://ftp.ebi.ac.uk/pub/databases/spot/pgs/s...gd_pgs.scores['id'][0]# PGS002256gd_pgs.scores['name'][0]# 'GRS4_GDM'gd_pgs.scores['matches_publication'][0]# Truegd_pgs.scores['trait_reported'][0]# 'Gestational diabetes mellitus in early pregnancy'gd_pgs.scores['variants_number'][0]# 4
Step 4
gd_pgs.scores['publication.id'][0]# PGP000282gd_pgs.scores['publication.PMID'][0]# 35073990gd_pgs.scores['publication.date_publication'][0]# '2022-01-24'gd_pgs.scores['publication.journal'][0]# 'Diabetol Metab Syndr'gd_pgs.scores['publication.title'][0]# 'An early prediction model for gestational diabetes mellitus based on genetic variants and clinical characteristics in China.'open_in_pubmed(gd_pgs.scores['publication.PMID'][0])
Step 5
gd_pgs.samples_variants# sample_number sample_cases sample_controls sample_percent_male sample_age phenotyping_free followup_time ancestry_broad ancestry_free ancestry_country ancestry_additional source_GWAS_catalog source_PMID source_DOI cohorts_additional id score_id followup_time.estimate_type followup_time.estimate followup_time.interval.type followup_time.interval.lower followup_time.interval.upper followup_time.variability_type followup_time.variability followup_time.unit# 0 671 332 339 0.0 None None None East Asian Chinese China None None None None None 0 PGS002256 NaN NaN NaN NaN NaN NaN NaN NaNgd_pgs.samples_variants['sample_number'][0]# 671gd_pgs.samples_variants['ancestry_broad'][0]# 'East Asian'
Step 6
gd_file=read_scoring_file('PGS002256')gd_file# rsID effect_allele other_allele effect_weight hm_source hm_rsID hm_chr hm_pos hm_inferOtherAllele# 0 rs10830963 G C 1.327 ENSEMBL rs10830963 11 92708710 NaN# 1 rs1436953 T C 1.292 ENSEMBL rs1436953 15 62414014 NaN# 2 rs7172432 G A 1.283 ENSEMBL rs7172432 15 62396389 NaN# 3 rs16955379 C T 1.220 ENSEMBL rs16955379 16 81489373 NaN