guide.Rmd
The following analyses should run within a couple of minutes, depending on internet speed and the traffic that the IEU GWAS database servers are experiencing.
Begin by choosing an exposure-outcome hypothesis to explore. e.g. LDL cholesterol on coronary heart disease. These data can be extracted from the IEU GWAS database using the TwoSampleMR package:
If necessary install TwoSampleMR:
devtools::install_github("mrcieu/TwoSampleMR@ieugwasr")
Create a dataset for SBP and CHD
library(TwoSampleMR) a <- extract_instruments("ukb-b-20175") #> API: public: http://gwas-api.mrcieu.ac.uk/ #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Systolic blood pressure, automated reading || id:ukb-b-20175. Just keeping the first instance: #> rs17811915 b <- extract_outcome_data(a$SNP, "ieu-a-7", access_token=NULL) #> Extracting data for 244 SNP(s) from 1 GWAS(s) #> Finding proxies for 4 SNPs in outcome ieu-a-7 #> Extracting data for 4 SNP(s) from 1 GWAS(s) dat <- harmonise_data(a,b) #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Coronary heart disease || id:ieu-a-7 (ieu-a-7) #> Removing the following SNPs for incompatible alleles: #> rs17811915 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs11592442, rs12779675, rs1290790, rs2246832, rs28470858, rs28667801
We can now perform the analysis:
This will do the following:
dat
object we already createdlibrary(tryx) x <- Tryx$new(dat) x$mrtryx() #> Using RadialMR package to detect outliers #> #> Radial IVW #> #> Estimate Std.Error t value Pr(>|t|) #> Effect (Mod.2nd) 0.5991043 0.07718481 7.761945 8.363657e-15 #> Iterative 0.5991043 0.07718481 7.761945 8.363657e-15 #> Exact (FE) 0.6420699 0.04024276 15.954916 2.633294e-57 #> Exact (RE) 0.6101965 0.08857214 6.889260 5.227019e-11 #> #> #> Residual standard error: 1.92 on 232 degrees of freedom #> #> F-statistic: 60.25 on 1 and 232 DF, p-value: 2.66e-13 #> Q-Statistic for heterogeneity: 855.6769 on 232 DF , p-value: 2.874833e-72 #> #> Outliers detected #> Number of iterations = 2 #> Warning in if (radial$outliers[1] == "No significant outliers") {: the condition #> has length > 1 and only the first element will be used #> Identified 11 outliers #> Using default list of 6467 traits #> Extracting data for 11 SNP(s) from 6467 GWAS(s) #> Found 139 candidate traits associated with outliers at p < 5e-08 #> Finding instruments for candidate traits #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype '3mm strong meridian (left) || id:ukb-b-14664. Just keeping the first instance: #> rs8047844 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype '3mm strong meridian (right) || id:ukb-b-6852. Just keeping the first instance: #> rs2242398 #> rs8047844 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype '3mm weak meridian (left) || id:ukb-b-11113. Just keeping the first instance: #> rs8047844 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype '3mm weak meridian (right) || id:ukb-b-13506. Just keeping the first instance: #> rs8047844 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype '6mm strong meridian (right) || id:ukb-b-11452. Just keeping the first instance: #> rs8047844 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype '6mm weak meridian (left) || id:ukb-b-13538. Just keeping the first instance: #> rs8047844 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype '6mm weak meridian (right) || id:ukb-b-13416. Just keeping the first instance: #> rs8047844 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Alcohol intake frequency. || id:ukb-b-5779. Just keeping the first instance: #> rs9958320 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Ankle spacing width || id:ukb-b-4080. Just keeping the first instance: #> rs3732360 #> rs1294438 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Arm fat percentage (left) || id:ukb-b-20188. Just keeping the first instance: #> rs2731238 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Arm fat-free mass (right) || id:ukb-b-19520. Just keeping the first instance: #> rs3740591 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Basal metabolic rate || id:ukb-b-16446. Just keeping the first instance: #> rs3129962 #> rs3740591 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Birth weight || id:ukb-b-13378. Just keeping the first instance: #> rs2140240 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Blood clot, DVT, bronchitis, emphysema, asthma, rhinitis, eczema, allergy diagnosed by doctor: Asthma || id:ukb-b-20296. Just keeping the first instance: #> rs35320232 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Blood clot, DVT, bronchitis, emphysema, asthma, rhinitis, eczema, allergy diagnosed by doctor: Hayfever, allergic rhinitis or eczema || id:ukb-b-17241. Just keeping the first instance: #> rs35320232 #> rs2075973 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Blood clot, DVT, bronchitis, emphysema, asthma, rhinitis, eczema, allergy diagnosed by doctor: None of the above || id:ukb-b-18200. Just keeping the first instance: #> rs35320232 #> rs2097431 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Body fat percentage || id:ukb-b-8909. Just keeping the first instance: #> rs2731238 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Diastolic blood pressure, automated reading || id:ukb-b-7992. Just keeping the first instance: #> rs28752924 #> rs17304212 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Duration to first press of snap-button in each round || id:ukb-b-19373. Just keeping the first instance: #> rs9304167 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Hip circumference || id:ukb-b-15590. Just keeping the first instance: #> rs1294438 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Impedance of arm (right) || id:ukb-b-7859. Just keeping the first instance: #> rs111650620 #> rs1382568 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Impedance of leg (left) || id:ukb-b-14068. Just keeping the first instance: #> rs776912 #> rs2952894 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Impedance of leg (right) || id:ukb-b-7376. Just keeping the first instance: #> rs776912 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Leg fat percentage (left) || id:ukb-b-18377. Just keeping the first instance: #> rs1428 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Leg fat percentage (right) || id:ukb-b-20531. Just keeping the first instance: #> rs7027096 #> rs2731238 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Leg fat-free mass (left) || id:ukb-b-16099. Just keeping the first instance: #> rs3129962 #> rs77760034 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Leg fat-free mass (right) || id:ukb-b-12828. Just keeping the first instance: #> rs77760034 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Leg predicted mass (left) || id:ukb-b-17271. Just keeping the first instance: #> rs3129962 #> rs77760034 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Leg predicted mass (right) || id:ukb-b-14310. Just keeping the first instance: #> rs77760034 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Medication for cholesterol, blood pressure or diabetes: None of the above || id:ukb-b-12014. Just keeping the first instance: #> rs2209042 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Medication for cholesterol, blood pressure, diabetes, or take exogenous hormones: None of the above || id:ukb-b-20379. Just keeping the first instance: #> rs13204736 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Medication for pain relief, constipation, heartburn: Paracetamol || id:ukb-b-17595. Just keeping the first instance: #> rs34555420 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Non-cancer illness code, self-reported: asthma || id:ukb-b-18113. Just keeping the first instance: #> rs17142799 #> rs35320232 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Non-cancer illness code, self-reported: hypertension || id:ukb-b-14057. Just keeping the first instance: #> rs4783581 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Number of self-reported non-cancer illnesses || id:ukb-b-4063. Just keeping the first instance: #> rs13204736 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Pain type(s) experienced in last month: Headache || id:ukb-b-12181. Just keeping the first instance: #> rs34555420 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Peak expiratory flow (PEF) || id:ukb-b-12019. Just keeping the first instance: #> rs2666547 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Sitting height || id:ukb-b-16881. Just keeping the first instance: #> rs4651157 #> rs872937 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Standing height || id:ukb-b-10787. Just keeping the first instance: #> rs11252860 #> rs34773647 #> rs664317 #> rs7978217 #> rs11051456 #> rs1019075 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Treatment/medication code: amlodipine || id:ukb-b-9207. Just keeping the first instance: #> rs2077111 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Trunk fat mass || id:ukb-b-20044. Just keeping the first instance: #> rs2731238 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Trunk fat percentage || id:ukb-b-16407. Just keeping the first instance: #> rs2731238 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Trunk fat-free mass || id:ukb-b-17409. Just keeping the first instance: #> rs3735352 #> rs3740591 #> rs1040457 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Trunk predicted mass || id:ukb-b-9685. Just keeping the first instance: #> rs77760034 #> rs3735352 #> rs7978217 #> rs1040457 #> rs3740591 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Vascular/heart problems diagnosed by doctor: High blood pressure || id:ukb-b-14177. Just keeping the first instance: #> rs4783581 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Vascular/heart problems diagnosed by doctor: None of the above || id:ukb-b-13352. Just keeping the first instance: #> rs4783581 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Whole body fat-free mass || id:ukb-b-13354. Just keeping the first instance: #> rs434072 #> rs3740591 #> rs1040457 #> rs77760034 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Whole body water mass || id:ukb-b-14540. Just keeping the first instance: #> rs1040457 #> rs3740591 #> rs77760034 #> Warning in format_data(d, type = "exposure", snps = NULL, phenotype_col = #> "phenotype", : eaf column is not numeric. Coercing... #> Removing outlier SNPs from candidate trait instrument lists #> 139 traits with at least one instrument #> Looking up candidate trait instruments for Coronary heart disease || id:ieu-a-7 #> Extracting data for 10546 SNP(s) from 1 GWAS(s) #> 1 of 1 outcomes #> [>] 1 of 2 chunks #> [>] 2 of 2 chunks #> 10339 instruments extracted for Coronary heart disease || id:ieu-a-7 #> Looking up candidate trait instruments for Systolic blood pressure, automated reading || id:ukb-b-20175 #> Extracting data for 10546 SNP(s) from 1 GWAS(s) #> 1 of 1 outcomes #> [>] 1 of 2 chunks #> [>] 2 of 2 chunks #> instruments extracted for Systolic blood pressure, automated reading || id:ukb-b-20175 #> Looking up exposure instruments for 139 candidate traits #> Extracting data for 233 SNP(s) from 139 GWAS(s) #> 30833 instruments extracted #> Removing outlier SNPs from candidate trait outcome lists #> Removed 212 outlier SNPs #> Performing MR of 139 candidate traits against Coronary heart disease || id:ieu-a-7 #> Performing MR of 139 candidate traits against Systolic blood pressure, automated reading || id:ukb-b-20175 #> Performing MR of Systolic blood pressure, automated reading || id:ukb-b-20175 against 139 candidate traits
The analysis performed by mrtryx()
can be broken down into multiple steps, running the following commands:
# Find outlier SNPs in the exposure-outcome analysis x$get_outliers() # Find traits in the MR-Base database that those outliers associate with. These traits are known as 'candidate traits' x$set_candidate_traits() x$scan()
Note that you can browse available traits here: https://gwas.mrcieu.ac.uk/ and get a complete list using:
traits <- TwoSampleMR::available_outcomes()
# Extract instruments for those 'candidate traits' x$extractions() #which includes the following functions: x$candidate_instruments() x$outcome_instruments() x$exposure_instruments() x$exposure_candidate_instruments() # Make datasets for MR analysis x$harmonise() #which includes the following functions: x$candidate_outcome_dat() x$candidate_exposure_dat() x$exposure_candidate_dat() # Perform MR of each of those 'candidate traits' against the exposure and the outcomes x$mr()
See the ?Tryx
for options on the parameters for this analysis. e.g. You can specify your own set of outliers, for example SNPs that have extreme p-values in the outcome GWAS
a <- as.character(subset(dat, pval.outcome < 5e-8)$SNP) x <- Tryx$new(dat) x$mrtryx(outliers=a)
The next steps are to determine which of the candidate traits are of interest (e.g. using p-value thresholds), visualise the results, and adjust the exposure-outcome estimates based on knowledge of the ‘candidate trait’ associations.
One can determine which of the putative associations might be ‘interesting’ in different ways.  See ?Tryx
for more options.
Finally, to adjust the SNP effects on the exposure and outcome traits given their influences on the candidate traits, we can run:
x$analyse() #> p->y: rs9349379 - Diagnoses - secondary ICD10: I20.9 Angina pectoris, unspecified || id:ukb-b-15686 #> x<-p->y: rs10774625 - Birth weight || id:ukb-b-13378 #> p->y: rs6430078 - Illnesses of father: Heart disease || id:ukb-b-18408 #> x<-p->y: rs10774625 - Long-standing illness, disability or infirmity || id:ukb-b-13764 #> x<-p->y: rs10774625 - Medication for cholesterol, blood pressure, diabetes, or take exogenous hormones: Blood pressure medication || id:ukb-b-18009 #> x<-p->y: rs2681492 - Medication for cholesterol, blood pressure, diabetes, or take exogenous hormones: Blood pressure medication || id:ukb-b-18009 #> x<-p->y: rs10774625 - Treatment/medication code: aspirin || id:ukb-b-8755 #> x<-p->y: rs10774625 - Treatment/medication code: atenolol || id:ukb-b-11632 #> x<-p->y: rs10774625 - Illnesses of siblings: High blood pressure || id:ukb-b-8746 #> p->y: rs9349379 - Illnesses of siblings: Heart disease || id:ukb-b-14371 #> x<-p->y: rs2681492 - Treatment/medication code: bendroflumethiazide || id:ukb-b-18799 #> x<-p->y: rs57866767 - Treatment/medication code: amlodipine || id:ukb-b-9207 #> p->y: rs9349379 - Operation code: coronary angioplasty (ptca) +/- stent || id:ukb-b-7869 #> p->y: rs10774625 - Treatment speciality of consultant (recoded): Cardiology || id:ukb-b-20300 #> x<-p->y: rs57866767 - Impedance of arm (left) || id:ukb-b-19379 #> x<-p->y: rs35114617 - Sitting height || id:ukb-b-16881 #> x<-p->y: rs8027450 - Non-cancer illness code, self-reported: hypertension || id:ukb-b-14057 #> p->y: rs9349379 - Illnesses of mother: Heart disease || id:ukb-b-12477 #> p->y: rs10774625 - Vascular/heart problems diagnosed by doctor: Heart attack || id:ukb-b-11590 #> x<-p->y: rs2681492 - Medication for cholesterol, blood pressure or diabetes: Blood pressure medication || id:ukb-b-14395 #> p->y: rs9349379 - Diagnoses - secondary ICD10: Z95.5 Presence of coronary angioplasty implant and graft || id:ukb-b-15748 #> x<-p->y: rs57866767 - 3mm weak meridian (right) || id:ukb-b-13506 #> p->y: rs10774625 - Hip circumference || id:ukb-b-15590 #> p->y: rs10774625 - Illnesses of father: None of the above (group 1) || id:ukb-b-15169 #> p->y: rs8027450 - Illnesses of father: None of the above (group 1) || id:ukb-b-15169 #> x<-p->y: rs57866767 - Impedance of whole body || id:ukb-b-19921 #> x<-p->y: rs57866767 - Arm fat percentage (left) || id:ukb-b-20188 #> x<-p->y: rs57866767 - Birth weight || id:ukb-b-13378 #> p->y: rs9349379 - Diagnoses - secondary ICD10: I25.1 Atherosclerotic heart disease || id:ukb-b-7436 #> x<-p->y: rs10774625 - Medication for cholesterol, blood pressure, diabetes, or take exogenous hormones: None of the above || id:ukb-b-20379 #> p->y: rs10774625 - Diagnoses - secondary ICD10: E03.9 Hypothyroidism, unspecified || id:ukb-b-4226 #> x<-p->y: rs10774625 - Standing height || id:ukb-b-10787 #> p->y: rs9349379 - Operative procedures - secondary OPCS: Y02.2 Insertion of prosthesis into organ NOC || id:ukb-b-1744 #> x<-p->y: rs57866767 - Leg fat percentage (left) || id:ukb-b-18377 #> x<-p->y: rs57866767 - Body fat percentage || id:ukb-b-8909 #> x<-p->y: rs10774625 - Age high blood pressure diagnosed || id:ukb-b-1061 #> x<-p->y: rs8027450 - Illnesses of mother: High blood pressure || id:ukb-b-18167 #> p->y: rs10774625 - Medication for pain relief, constipation, heartburn: Aspirin || id:ukb-b-7137 #> p->y: rs9349379 - Non-cancer illness code, self-reported: heart attack/myocardial infarction || id:ukb-b-15829 #> p->y: rs9349379 - Diagnoses - secondary ICD10: I25.8 Other forms of chronic ischaemic heart disease || id:ukb-b-16606 #> x<-p->y: rs10774625 - Illnesses of siblings: None of the above (group 1) || id:ukb-b-17360 #> x<-p->y: rs57866767 - Leg fat percentage (right) || id:ukb-b-20531 #> x<-p->y: rs57866767 - Non-cancer illness code, self-reported: hypertension || id:ukb-b-14057 #> x<-p->y: rs10774625 - Medication for cholesterol, blood pressure or diabetes: None of the above || id:ukb-b-12014 #> x<-p->y: rs2681492 - Medication for cholesterol, blood pressure or diabetes: None of the above || id:ukb-b-12014 #> x<-p->y: rs57866767 - Medication for cholesterol, blood pressure or diabetes: Blood pressure medication || id:ukb-b-14395 #> p->y: rs10774625 - Diagnoses - secondary ICD10: Z95.5 Presence of coronary angioplasty implant and graft || id:ukb-b-15748 #> p->y: rs10774625 - Weight || id:ukb-b-11842 #> x<-p->y: rs8027450 - Vascular/heart problems diagnosed by doctor: High blood pressure || id:ukb-b-14177 #> x<-p->y: rs57866767 - Diastolic blood pressure, automated reading || id:ukb-b-7992 #> x<-p->y: rs2681492 - Diastolic blood pressure, automated reading || id:ukb-b-7992 #> p->y: rs10774625 - Diagnoses - secondary ICD10: I25.1 Atherosclerotic heart disease || id:ukb-b-7436 #> p->y: rs9349379 - Diagnoses - secondary ICD10: Z95.1 Presence of aortocoronary bypass graft || id:ukb-b-11064 #> x<-p->y: rs35114617 - Standing height || id:ukb-b-10787 #> p->y: rs10774625 - Non-cancer illness code, self-reported: hypothyroidism/myxoedema || id:ukb-b-19732 #> p->y: rs10774625 - Treatment/medication code: levothyroxine sodium || id:ukb-b-17918 #> x<-p->y: rs10774625 - Treatment/medication code: ramipril || id:ukb-b-11895 #> p->y: rs8027450 - Illnesses of father: Heart disease || id:ukb-b-18408 #> x<-p->y: rs8027450 - Illnesses of siblings: High blood pressure || id:ukb-b-8746 #> x<-p->y: rs57866767 - Arm fat percentage (right) || id:ukb-b-12854 #> x<-p->y: rs10774625 - Trunk fat-free mass || id:ukb-b-17409 #> p->y: rs9349379 - Operative procedures - main OPCS: K45.3 Anastomosis of mammary artery to left anterior descending coronary artery || id:ukb-b-15491 #> x<-p->y: rs8027450 - Birth weight of first child || id:ukb-b-3357 #> p->y: rs9349379 - Main speciality of consultant (recoded): Cardiology || id:ukb-b-16376 #> x<-p->y: rs8027450 - Vascular/heart problems diagnosed by doctor: None of the above || id:ukb-b-13352 #> x<-p->y: rs2681492 - Vascular/heart problems diagnosed by doctor: None of the above || id:ukb-b-13352 #> x<-p->y: rs57866767 - Impedance of arm (right) || id:ukb-b-7859 #> x<-p->y: rs10774625 - 3mm weak meridian (right) || id:ukb-b-13506 #> x<-p->y: rs57866767 - Vascular/heart problems diagnosed by doctor: High blood pressure || id:ukb-b-14177 #> x<-p->y: rs10774625 - Impedance of whole body || id:ukb-b-19921 #> x<-p->y: rs6430078 - Diastolic blood pressure, automated reading || id:ukb-b-7992 #> x<-p->y: rs8027450 - Medication for cholesterol, blood pressure, diabetes, or take exogenous hormones: Blood pressure medication || id:ukb-b-18009 #> x<-p->y: rs57866767 - Medication for cholesterol, blood pressure, diabetes, or take exogenous hormones: Blood pressure medication || id:ukb-b-18009 #> x<-p->y: rs10774625 - Diagnoses - secondary ICD10: I10 Essential (primary) hypertension || id:ukb-b-12493 #> x<-p->y: rs8027450 - Diagnoses - secondary ICD10: I10 Essential (primary) hypertension || id:ukb-b-12493 #> x<-p->y: rs57866767 - Diagnoses - secondary ICD10: I10 Essential (primary) hypertension || id:ukb-b-12493 #> p->y: rs10774625 - Treatment speciality of consultant (recoded): General medicine || id:ukb-b-12646 #> x<-p->y: rs8027450 - Treatment/medication code: atenolol || id:ukb-b-11632 #> x<-p->y: rs10774625 - Number of treatments/medications taken || id:ukb-b-3656 #> x<-p->y: rs9349379 - Treatment/medication code: ibuprofen || id:ukb-b-16866 #> x<-p->y: rs57866767 - Trunk fat-free mass || id:ukb-b-17409 #> x<-p->y: rs10774625 - Birth weight of first child || id:ukb-b-3357 #> x<-p->y: rs10774625 - Vascular/heart problems diagnosed by doctor: None of the above || id:ukb-b-13352 #> x<-p->y: rs57866767 - Vascular/heart problems diagnosed by doctor: None of the above || id:ukb-b-13352 #> x<-p->y: rs2681492 - Non-cancer illness code, self-reported: hypertension || id:ukb-b-14057 #> x<-p->y: rs10774625 - Non-cancer illness code, self-reported: hypertension || id:ukb-b-14057 #> x<-p->y: rs10774625 - Impedance of arm (right) || id:ukb-b-7859 #> p->y: rs9349379 - Operative procedures - main OPCS: K49.1 Percutaneous transluminal balloon angioplasty of one coronary artery || id:ukb-b-18018 #> x<-p->y: rs8027450 - Medication for cholesterol, blood pressure or diabetes: None of the above || id:ukb-b-12014 #> p->y: rs10774625 - Father's age at death || id:ukb-b-11303 #> x<-p->y: rs2681492 - Vascular/heart problems diagnosed by doctor: High blood pressure || id:ukb-b-14177 #> x<-p->y: rs10774625 - Vascular/heart problems diagnosed by doctor: High blood pressure || id:ukb-b-14177 #> x<-p->y: rs10774625 - Diastolic blood pressure, automated reading || id:ukb-b-7992 #> x<-p->y: rs8027450 - Diastolic blood pressure, automated reading || id:ukb-b-7992 #> x<-p->y: rs8027450 - Birth weight || id:ukb-b-13378 #> x<-p->y: rs57866767 - Trunk fat percentage || id:ukb-b-16407 #> p->y: rs10774625 - Illnesses of father: Heart disease || id:ukb-b-18408 #> p->y: rs9349379 - Illnesses of father: Heart disease || id:ukb-b-18408 #> x<-p->y: rs8027450 - Treatment/medication code: ramipril || id:ukb-b-11895 #> x<-p->y: rs9349379 - Vascular/heart problems diagnosed by doctor: Angina || id:ukb-b-8468 #> p->y: rs9349379 - Operation code: coronary artery bypass grafts (cabg) || id:ukb-b-12465 #> x<-p->y: rs2971603 - Pain type(s) experienced in last month: Headache || id:ukb-b-12181 #> x<-p->y: rs9349379 - Pain type(s) experienced in last month: Headache || id:ukb-b-12181 #> p->y: rs10774625 - Taking other prescription medications || id:ukb-b-20292 #> x<-p->y: rs8027450 - Age high blood pressure diagnosed || id:ukb-b-1061 #> x<-p->y: rs9349379 - Non-cancer illness code, self-reported: angina || id:ukb-b-8650 #> x<-p->y: rs10774625 - Treatment/medication code: bendroflumethiazide || id:ukb-b-18799 #> x<-p->y: rs8027450 - Medication for cholesterol, blood pressure or diabetes: Cholesterol lowering medication || id:ukb-b-11740 #> p->y: rs10774625 - Non-cancer illness code, self-reported: heart attack/myocardial infarction || id:ukb-b-15829 #> p->y: rs9349379 - Treatment speciality of consultant (recoded): Cardiology || id:ukb-b-20300 #> x<-p->y: rs10774625 - Impedance of arm (left) || id:ukb-b-19379 #> x<-p->y: rs10774625 - Number of self-reported non-cancer illnesses || id:ukb-b-4063 #> p->y: rs9349379 - Diagnoses - main ICD10: I25.1 Atherosclerotic heart disease || id:ukb-b-1668 #> p->y: rs10774625 - Diagnoses - main ICD10: I25.1 Atherosclerotic heart disease || id:ukb-b-1668 #> p->y: rs7798197 - Diagnoses - main ICD10: I25.1 Atherosclerotic heart disease || id:ukb-b-1668 #> x<-p->y: rs57866767 - Trunk fat mass || id:ukb-b-20044 #> p->y: rs9349379 - Vascular/heart problems diagnosed by doctor: Heart attack || id:ukb-b-11590 #> x<-p->y: rs10774625 - Medication for cholesterol, blood pressure or diabetes: Blood pressure medication || id:ukb-b-14395 #> x<-p->y: rs8027450 - Medication for cholesterol, blood pressure or diabetes: Blood pressure medication || id:ukb-b-14395 #> x<-p->y: rs8027450 - Illnesses of mother: None of the above (group 1) || id:ukb-b-10454 #> x<-p->y: rs35114617 - Glutaminyl-peptide cyclotransferase-like protein || id:prot-a-2466 #> x<-p->y: rs10774625 - Interleukin-2 receptor subunit beta || id:prot-a-1519 #> p->y: rs9349379 - Myocardial infarction || id:ieu-a-798 #> p->y: rs10774625 - Myocardial infarction || id:ieu-a-798 #> p->y: rs10774625 - HDL cholesterol || id:ieu-a-299 #> x<-p->y: rs7798197 - Large vessel disease || id:ieu-a-1110 #> p->y: rs10774625 - Total cholesterol || id:ieu-a-301 #> p->y: rs2681492 - Myocardial infarction || id:ieu-a-798 #> p->y: rs10774625 - LDL cholesterol || id:ieu-a-300
This will estimate the outlier effect that is due to the candidate pathways, adjust the outlier-outcome estimate, and re-perform MR of exposure on outcome with the adjusted outliers.
By default, this adjusts for the trait that has the largest impact for a particular SNP.
There is also a multivariable adjustment method here, where for each outlier, all candidate trait effects are estimated jointly:
x$analyse.mv()
NOTE: it’s a good idea to check that there are no traits amongst the candidates that are identical or equivalent to the outcome:
id_remove = c("ieu-a-1110", "ieu-a-798", "ukb-b-1061", "ukb-b-10454", "ukb-b-1061", "ukb-b-11064", "ukb-b-11590", "ukb-b-11632", "ukb-b-11895", "ukb-b-11971", "ukb-b-12014", "ukb-b-12019", "ukb-b-12465", "ukb-b-12493", "ukb-b-13352", "ukb-b-13506", "ukb-b-12477", "ukb-b-12493", "ukb-b-12646", "ukb-b-13352", "ukb-b-13506", "ukb-b-14057", "ukb-b-14177", "ukb-b-14371", "ukb-b-14395", "ukb-b-15169", "ukb-b-15491", "ukb-b-15686", "ukb-b-15748", "ukb-b-15829", "ukb-b-16376", "ukb-b-16606", "ukb-b-1668", "ukb-b-17360", "ukb-b-18009", "ukb-b-18018", "ukb-b-18167", "ukb-b-18408", "ukb-b-18799", "ukb-b-20300", "ukb-b-20379", "ukb-b-3656", "ukb-b-4063", "ukb-b-7137", "ukb-b-7436", "ukb-b-7869", "ukb-b-7992", "ukb-b-8468", "ukb-b-8650", "ukb-b-8746", "ukb-b-9207", "ieu-a-1110", "ukb-b-1061", "ukb-b-11971", "ukb-b-12014", "ukb-b-12019", "ukb-b-19456", "ukb-b-8778", "ukb-b-10454", "ukb-b-11632", "ukb-b-11895") x$analyse.mv(id_remove = id_remove) #> Estimating joint effects of the following trait(s) associated with rs10774625 #> Birth weight || id:ukb-b-13378 #> Long-standing illness, disability or infirmity || id:ukb-b-13764 #> Treatment/medication code: aspirin || id:ukb-b-8755 #> Hip circumference || id:ukb-b-15590 #> Diagnoses - secondary ICD10: E03.9 Hypothyroidism, unspecified || id:ukb-b-4226 #> Standing height || id:ukb-b-10787 #> Weight || id:ukb-b-11842 #> Non-cancer illness code, self-reported: hypothyroidism/myxoedema || id:ukb-b-19732 #> Treatment/medication code: levothyroxine sodium || id:ukb-b-17918 #> Trunk fat-free mass || id:ukb-b-17409 #> Impedance of whole body || id:ukb-b-19921 #> Birth weight of first child || id:ukb-b-3357 #> Impedance of arm (right) || id:ukb-b-7859 #> Father's age at death || id:ukb-b-11303 #> Taking other prescription medications || id:ukb-b-20292 #> Impedance of arm (left) || id:ukb-b-19379 #> Interleukin-2 receptor subunit beta || id:prot-a-1519 #> HDL cholesterol || id:ieu-a-299 #> Total cholesterol || id:ieu-a-301 #> LDL cholesterol || id:ieu-a-300 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Birth weight || id:ukb-b-13378. Just keeping the first instance: #> rs2140240 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Hip circumference || id:ukb-b-15590. Just keeping the first instance: #> rs1294438 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Impedance of arm (right) || id:ukb-b-7859. Just keeping the first instance: #> rs111650620 #> rs1382568 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Standing height || id:ukb-b-10787. Just keeping the first instance: #> rs11252860 #> rs34773647 #> rs664317 #> rs7978217 #> rs11051456 #> rs1019075 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Systolic blood pressure, automated reading || id:ukb-b-20175. Just keeping the first instance: #> rs17811915 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Trunk fat-free mass || id:ukb-b-17409. Just keeping the first instance: #> rs3735352 #> rs3740591 #> rs1040457 #> Warning in format_data(d, type = "exposure", snps = NULL, phenotype_col = #> "phenotype", : eaf column is not numeric. Coercing... #> Warning: 'clump_data' is deprecated. #> Use 'ieugwasr::ld_clump()' instead. #> See help("Deprecated") #> Clumping 1, 4776 variants #> Removing 3745 of 4776 variants due to LD with other variants or absence from LD reference panel #> Extracting data for 765 SNP(s) from 21 GWAS(s) #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Systolic blood pressure, automated reading || id:ukb-b-20175. Just keeping the first instance: #> rs664317 #> rs11252860 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and HDL cholesterol || id:ieu-a-299 (ieu-a-299) #> Removing the following SNPs for incompatible alleles: #> rs664317 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10228350, rs10498672, rs10499659, rs10505073, rs11122824, rs11664336, rs11756783, rs12258967, rs12572775, rs1290790, rs1420150, rs1467847, rs1556516, rs16905189, rs17010961, rs1867780, rs1875969, rs2138628, rs219162, rs2270894, rs2410728, rs2422054, rs2663335, rs2952615, rs3771382, rs3790086, rs3812163, rs4865956, rs519384, rs578475, rs6824592, rs7619139, rs7652177, rs7917801, rs7961994, rs832806, rs9352895, rs964184, rs968821 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and LDL cholesterol || id:ieu-a-300 (ieu-a-300) #> Removing the following SNPs for incompatible alleles: #> rs664317 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10228350, rs10498672, rs10499659, rs10505073, rs11122824, rs11664336, rs11756783, rs12258967, rs12572775, rs1290790, rs1420150, rs1467847, rs1556516, rs16905189, rs17010961, rs1867780, rs1875969, rs2138628, rs219162, rs2270894, rs2410728, rs2422054, rs2663335, rs2952615, rs3771382, rs3790086, rs3812163, rs4865956, rs519384, rs578475, rs6824592, rs7619139, rs7652177, rs7917801, rs7961994, rs832806, rs9352895, rs964184, rs968821 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Total cholesterol || id:ieu-a-301 (ieu-a-301) #> Removing the following SNPs for incompatible alleles: #> rs664317 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10228350, rs10498672, rs10499659, rs10505073, rs11122824, rs11664336, rs11756783, rs12258967, rs12572775, rs1290790, rs1420150, rs1467847, rs1556516, rs16905189, rs17010961, rs1867780, rs1875969, rs2138628, rs219162, rs2270894, rs2410728, rs2422054, rs2663335, rs2952615, rs3771382, rs3790086, rs3812163, rs4865956, rs519384, rs578475, rs6824592, rs7619139, rs7652177, rs7917801, rs7961994, rs832806, rs9352895, rs964184, rs968821 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Interleukin-2 receptor subunit beta || id:prot-a-1519 (prot-a-1519) #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10228350, rs11664336, rs11756783, rs12572775, rs1290790, rs13264909, rs1467847, rs1556516, rs1580100, rs165656, rs3771382, rs3790086, rs3812163, rs418280, rs4243765, rs4302014, rs5759006, rs62134416, rs7652177, rs7754251, rs7917801, rs832806, rs9352895, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Standing height || id:ukb-b-10787 (ukb-b-10787) #> Removing the following SNPs for incompatible alleles: #> rs11252860, rs11252860, rs664317, rs664317 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10228350, rs11664336, rs11756783, rs12572775, rs1290790, rs13264909, rs1467847, rs1556516, rs1580100, rs165656, rs3771382, rs3790086, rs3812163, rs418280, rs4243765, rs4302014, rs5759006, rs62134416, rs7652177, rs7754251, rs7917801, rs832806, rs9352895, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Father's age at death || id:ukb-b-11303 (ukb-b-11303) #> Removing the following SNPs for incompatible alleles: #> rs11252860, rs11252860, rs664317, rs664317 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10228350, rs11664336, rs11756783, rs12572775, rs1290790, rs13264909, rs1467847, rs1556516, rs1580100, rs165656, rs3771382, rs3790086, rs3812163, rs418280, rs4243765, rs4302014, rs5759006, rs62134416, rs7652177, rs7754251, rs7917801, rs832806, rs9352895, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Weight || id:ukb-b-11842 (ukb-b-11842) #> Removing the following SNPs for incompatible alleles: #> rs11252860, rs11252860, rs664317, rs664317 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10228350, rs11664336, rs11756783, rs12572775, rs1290790, rs13264909, rs1467847, rs1556516, rs1580100, rs165656, rs3771382, rs3790086, rs3812163, rs418280, rs4243765, rs4302014, rs5759006, rs62134416, rs7652177, rs7754251, rs7917801, rs832806, rs9352895, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Birth weight || id:ukb-b-13378 (ukb-b-13378) #> Removing the following SNPs for incompatible alleles: #> rs11252860, rs11252860, rs664317, rs664317 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10228350, rs11664336, rs11756783, rs12572775, rs1290790, rs13264909, rs1467847, rs1556516, rs1580100, rs165656, rs3771382, rs3790086, rs3812163, rs418280, rs4243765, rs4302014, rs5759006, rs62134416, rs7652177, rs7754251, rs7917801, rs832806, rs9352895, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Long-standing illness, disability or infirmity || id:ukb-b-13764 (ukb-b-13764) #> Removing the following SNPs for incompatible alleles: #> rs664317, rs664317 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10228350, rs11664336, rs11756783, rs12572775, rs1290790, rs13264909, rs1467847, rs1556516, rs1580100, rs165656, rs3771382, rs3790086, rs3812163, rs418280, rs4243765, rs4302014, rs5759006, rs62134416, rs7652177, rs7754251, rs7917801, rs832806, rs9352895, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Hip circumference || id:ukb-b-15590 (ukb-b-15590) #> Removing the following SNPs for incompatible alleles: #> rs11252860, rs11252860, rs664317, rs664317 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10228350, rs11664336, rs11756783, rs12572775, rs1290790, rs13264909, rs1467847, rs1556516, rs1580100, rs165656, rs3771382, rs3790086, rs3812163, rs418280, rs4243765, rs4302014, rs5759006, rs62134416, rs7652177, rs7754251, rs7917801, rs832806, rs9352895, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Trunk fat-free mass || id:ukb-b-17409 (ukb-b-17409) #> Removing the following SNPs for incompatible alleles: #> rs11252860, rs11252860, rs664317, rs664317 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10228350, rs11664336, rs11756783, rs12572775, rs1290790, rs13264909, rs1467847, rs1556516, rs1580100, rs165656, rs3771382, rs3790086, rs3812163, rs418280, rs4243765, rs4302014, rs5759006, rs62134416, rs7652177, rs7754251, rs7917801, rs832806, rs9352895, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Treatment/medication code: levothyroxine sodium || id:ukb-b-17918 (ukb-b-17918) #> Removing the following SNPs for incompatible alleles: #> rs664317, rs664317 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10228350, rs11664336, rs11756783, rs12572775, rs1290790, rs13264909, rs1467847, rs1556516, rs1580100, rs165656, rs3771382, rs3790086, rs3812163, rs418280, rs4243765, rs4302014, rs5759006, rs62134416, rs7652177, rs7754251, rs7917801, rs832806, rs9352895, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Impedance of arm (left) || id:ukb-b-19379 (ukb-b-19379) #> Removing the following SNPs for incompatible alleles: #> rs11252860, rs11252860, rs664317, rs664317 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10228350, rs11664336, rs11756783, rs12572775, rs1290790, rs13264909, rs1467847, rs1556516, rs1580100, rs165656, rs3771382, rs3790086, rs3812163, rs418280, rs4243765, rs4302014, rs5759006, rs62134416, rs7652177, rs7754251, rs7917801, rs832806, rs9352895, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Non-cancer illness code, self-reported: hypothyroidism/myxoedema || id:ukb-b-19732 (ukb-b-19732) #> Removing the following SNPs for incompatible alleles: #> rs664317, rs664317 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10228350, rs11664336, rs11756783, rs12572775, rs1290790, rs13264909, rs1467847, rs1556516, rs1580100, rs165656, rs3771382, rs3790086, rs3812163, rs418280, rs4243765, rs4302014, rs5759006, rs62134416, rs7652177, rs7754251, rs7917801, rs832806, rs9352895, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Impedance of whole body || id:ukb-b-19921 (ukb-b-19921) #> Removing the following SNPs for incompatible alleles: #> rs11252860, rs11252860, rs664317, rs664317 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10228350, rs11664336, rs11756783, rs12572775, rs1290790, rs13264909, rs1467847, rs1556516, rs1580100, rs165656, rs3771382, rs3790086, rs3812163, rs418280, rs4243765, rs4302014, rs5759006, rs62134416, rs7652177, rs7754251, rs7917801, rs832806, rs9352895, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Taking other prescription medications || id:ukb-b-20292 (ukb-b-20292) #> Removing the following SNPs for incompatible alleles: #> rs664317, rs664317 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10228350, rs11664336, rs11756783, rs12572775, rs1290790, rs13264909, rs1467847, rs1556516, rs1580100, rs165656, rs3771382, rs3790086, rs3812163, rs418280, rs4243765, rs4302014, rs5759006, rs62134416, rs7652177, rs7754251, rs7917801, rs832806, rs9352895, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Birth weight of first child || id:ukb-b-3357 (ukb-b-3357) #> Removing the following SNPs for incompatible alleles: #> rs664317, rs664317 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10228350, rs11664336, rs11756783, rs12572775, rs1290790, rs13264909, rs1467847, rs1556516, rs1580100, rs165656, rs3771382, rs3790086, rs3812163, rs418280, rs4243765, rs4302014, rs5759006, rs62134416, rs7652177, rs7754251, rs7917801, rs832806, rs9352895, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Diagnoses - secondary ICD10: E03.9 Hypothyroidism, unspecified || id:ukb-b-4226 (ukb-b-4226) #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10228350, rs11664336, rs11756783, rs12572775, rs1290790, rs13264909, rs1467847, rs1556516, rs1580100, rs165656, rs3771382, rs3790086, rs3812163, rs418280, rs4243765, rs4302014, rs5759006, rs62134416, rs7652177, rs7754251, rs7917801, rs832806, rs9352895, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Impedance of arm (right) || id:ukb-b-7859 (ukb-b-7859) #> Removing the following SNPs for incompatible alleles: #> rs11252860, rs11252860, rs664317, rs664317 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10228350, rs11664336, rs11756783, rs12572775, rs1290790, rs13264909, rs1467847, rs1556516, rs1580100, rs165656, rs3771382, rs3790086, rs3812163, rs418280, rs4243765, rs4302014, rs5759006, rs62134416, rs7652177, rs7754251, rs7917801, rs832806, rs9352895, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Treatment/medication code: aspirin || id:ukb-b-8755 (ukb-b-8755) #> Removing the following SNPs for incompatible alleles: #> rs664317, rs664317 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10228350, rs11664336, rs11756783, rs12572775, rs1290790, rs13264909, rs1467847, rs1556516, rs1580100, rs165656, rs3771382, rs3790086, rs3812163, rs418280, rs4243765, rs4302014, rs5759006, rs62134416, rs7652177, rs7754251, rs7917801, rs832806, rs9352895, rs9976812 #> Performing shrinkage #> After shrinkage keeping: #> ieu-a-299 #> ieu-a-300 #> prot-a-1519 #> ukb-b-10787 #> ukb-b-11303 #> ukb-b-11842 #> ukb-b-13378 #> ukb-b-13764 #> ukb-b-17918 #> ukb-b-19379 #> ukb-b-20175 #> ukb-b-20292 #> ukb-b-3357 #> ukb-b-4226 #> ukb-b-8755 #> Estimating joint effects of the following trait(s) associated with rs57866767 #> Impedance of arm (left) || id:ukb-b-19379 #> Impedance of whole body || id:ukb-b-19921 #> Arm fat percentage (left) || id:ukb-b-20188 #> Birth weight || id:ukb-b-13378 #> Leg fat percentage (left) || id:ukb-b-18377 #> Body fat percentage || id:ukb-b-8909 #> Leg fat percentage (right) || id:ukb-b-20531 #> Arm fat percentage (right) || id:ukb-b-12854 #> Impedance of arm (right) || id:ukb-b-7859 #> Trunk fat-free mass || id:ukb-b-17409 #> Trunk fat percentage || id:ukb-b-16407 #> Trunk fat mass || id:ukb-b-20044 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Arm fat percentage (left) || id:ukb-b-20188. Just keeping the first instance: #> rs2731238 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Birth weight || id:ukb-b-13378. Just keeping the first instance: #> rs2140240 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Body fat percentage || id:ukb-b-8909. Just keeping the first instance: #> rs2731238 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Impedance of arm (right) || id:ukb-b-7859. Just keeping the first instance: #> rs111650620 #> rs1382568 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Leg fat percentage (left) || id:ukb-b-18377. Just keeping the first instance: #> rs1428 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Leg fat percentage (right) || id:ukb-b-20531. Just keeping the first instance: #> rs7027096 #> rs2731238 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Systolic blood pressure, automated reading || id:ukb-b-20175. Just keeping the first instance: #> rs17811915 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Trunk fat mass || id:ukb-b-20044. Just keeping the first instance: #> rs2731238 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Trunk fat percentage || id:ukb-b-16407. Just keeping the first instance: #> rs2731238 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Trunk fat-free mass || id:ukb-b-17409. Just keeping the first instance: #> rs3735352 #> rs3740591 #> rs1040457 #> Warning: 'clump_data' is deprecated. #> Use 'ieugwasr::ld_clump()' instead. #> See help("Deprecated") #> Clumping 1, 5198 variants #> Removing 4002 of 5198 variants due to LD with other variants or absence from LD reference panel #> Extracting data for 668 SNP(s) from 13 GWAS(s) #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Systolic blood pressure, automated reading || id:ukb-b-20175. Just keeping the first instance: #> rs2731238 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Arm fat percentage (right) || id:ukb-b-12854 (ukb-b-12854) #> Removing the following SNPs for incompatible alleles: #> rs2731238, rs2731238 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs1080347, rs10887578, rs11208779, rs12722976, rs13264909, rs1443641, rs1905095, rs2592828, rs28721380, rs2968669, rs3771382, rs3773851, rs445077, rs4714935, rs59086897, rs62134416, rs6540497, rs7491529, rs7788672, rs7917801, rs7971536, rs9882731, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Birth weight || id:ukb-b-13378 (ukb-b-13378) #> Removing the following SNPs for incompatible alleles: #> rs2731238, rs2731238 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs1080347, rs10887578, rs11208779, rs12722976, rs13264909, rs1443641, rs1905095, rs2592828, rs28721380, rs2968669, rs3771382, rs3773851, rs445077, rs4714935, rs59086897, rs62134416, rs6540497, rs7491529, rs7788672, rs7917801, rs7971536, rs9882731, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Trunk fat percentage || id:ukb-b-16407 (ukb-b-16407) #> Removing the following SNPs for incompatible alleles: #> rs2731238, rs2731238 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs1080347, rs10887578, rs11208779, rs12722976, rs13264909, rs1443641, rs1905095, rs2592828, rs28721380, rs2968669, rs3771382, rs3773851, rs445077, rs4714935, rs59086897, rs62134416, rs6540497, rs7491529, rs7788672, rs7917801, rs7971536, rs9882731, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Trunk fat-free mass || id:ukb-b-17409 (ukb-b-17409) #> Removing the following SNPs for incompatible alleles: #> rs2731238, rs2731238 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs1080347, rs10887578, rs11208779, rs12722976, rs13264909, rs1443641, rs1905095, rs2592828, rs28721380, rs2968669, rs3771382, rs3773851, rs445077, rs4714935, rs59086897, rs62134416, rs6540497, rs7491529, rs7788672, rs7917801, rs7971536, rs9882731, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Leg fat percentage (left) || id:ukb-b-18377 (ukb-b-18377) #> Removing the following SNPs for incompatible alleles: #> rs2731238, rs2731238 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs1080347, rs10887578, rs11208779, rs12722976, rs13264909, rs1443641, rs1905095, rs2592828, rs28721380, rs2968669, rs3771382, rs3773851, rs445077, rs4714935, rs59086897, rs62134416, rs6540497, rs7491529, rs7788672, rs7917801, rs7971536, rs9882731, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Impedance of arm (left) || id:ukb-b-19379 (ukb-b-19379) #> Removing the following SNPs for incompatible alleles: #> rs2731238, rs2731238 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs1080347, rs10887578, rs11208779, rs12722976, rs13264909, rs1443641, rs1905095, rs2592828, rs28721380, rs2968669, rs3771382, rs3773851, rs445077, rs4714935, rs59086897, rs62134416, rs6540497, rs7491529, rs7788672, rs7917801, rs7971536, rs9882731, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Impedance of whole body || id:ukb-b-19921 (ukb-b-19921) #> Removing the following SNPs for incompatible alleles: #> rs2731238, rs2731238 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs1080347, rs10887578, rs11208779, rs12722976, rs13264909, rs1443641, rs1905095, rs2592828, rs28721380, rs2968669, rs3771382, rs3773851, rs445077, rs4714935, rs59086897, rs62134416, rs6540497, rs7491529, rs7788672, rs7917801, rs7971536, rs9882731, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Trunk fat mass || id:ukb-b-20044 (ukb-b-20044) #> Removing the following SNPs for incompatible alleles: #> rs2731238, rs2731238 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs1080347, rs10887578, rs11208779, rs12722976, rs13264909, rs1443641, rs1905095, rs2592828, rs28721380, rs2968669, rs3771382, rs3773851, rs445077, rs4714935, rs59086897, rs62134416, rs6540497, rs7491529, rs7788672, rs7917801, rs7971536, rs9882731, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Arm fat percentage (left) || id:ukb-b-20188 (ukb-b-20188) #> Removing the following SNPs for incompatible alleles: #> rs2731238, rs2731238 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs1080347, rs10887578, rs11208779, rs12722976, rs13264909, rs1443641, rs1905095, rs2592828, rs28721380, rs2968669, rs3771382, rs3773851, rs445077, rs4714935, rs59086897, rs62134416, rs6540497, rs7491529, rs7788672, rs7917801, rs7971536, rs9882731, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Leg fat percentage (right) || id:ukb-b-20531 (ukb-b-20531) #> Removing the following SNPs for incompatible alleles: #> rs2731238, rs2731238 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs1080347, rs10887578, rs11208779, rs12722976, rs13264909, rs1443641, rs1905095, rs2592828, rs28721380, rs2968669, rs3771382, rs3773851, rs445077, rs4714935, rs59086897, rs62134416, rs6540497, rs7491529, rs7788672, rs7917801, rs7971536, rs9882731, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Impedance of arm (right) || id:ukb-b-7859 (ukb-b-7859) #> Removing the following SNPs for incompatible alleles: #> rs2731238, rs2731238 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs1080347, rs10887578, rs11208779, rs12722976, rs13264909, rs1443641, rs1905095, rs2592828, rs28721380, rs2968669, rs3771382, rs3773851, rs445077, rs4714935, rs59086897, rs62134416, rs6540497, rs7491529, rs7788672, rs7917801, rs7971536, rs9882731, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Body fat percentage || id:ukb-b-8909 (ukb-b-8909) #> Removing the following SNPs for incompatible alleles: #> rs2731238, rs2731238 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs1080347, rs10887578, rs11208779, rs12722976, rs13264909, rs1443641, rs1905095, rs2592828, rs28721380, rs2968669, rs3771382, rs3773851, rs445077, rs4714935, rs59086897, rs62134416, rs6540497, rs7491529, rs7788672, rs7917801, rs7971536, rs9882731, rs9976812 #> Performing shrinkage #> After shrinkage keeping: #> ukb-b-12854 #> ukb-b-13378 #> ukb-b-17409 #> ukb-b-20175 #> ukb-b-20188 #> ukb-b-20531 #> ukb-b-7859 #> Estimating joint effects of the following trait(s) associated with rs35114617 #> Sitting height || id:ukb-b-16881 #> Standing height || id:ukb-b-10787 #> Glutaminyl-peptide cyclotransferase-like protein || id:prot-a-2466 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Sitting height || id:ukb-b-16881. Just keeping the first instance: #> rs4651157 #> rs872937 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Standing height || id:ukb-b-10787. Just keeping the first instance: #> rs11252860 #> rs34773647 #> rs664317 #> rs7978217 #> rs11051456 #> rs1019075 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Systolic blood pressure, automated reading || id:ukb-b-20175. Just keeping the first instance: #> rs17811915 #> Warning: 'clump_data' is deprecated. #> Use 'ieugwasr::ld_clump()' instead. #> See help("Deprecated") #> Clumping 1, 1620 variants #> Removing 796 of 1620 variants due to LD with other variants or absence from LD reference panel #> Extracting data for 738 SNP(s) from 4 GWAS(s) #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Systolic blood pressure, automated reading || id:ukb-b-20175. Just keeping the first instance: #> rs11252860 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Glutaminyl-peptide cyclotransferase-like protein || id:prot-a-2466 (prot-a-2466) #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10811092, rs12572775, rs12722976, rs1290790, rs1467847, rs153661, rs3771382, rs3790086, rs3812163, rs418280, rs4302014, rs6947915, rs7652177, rs7847059, rs832806, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Standing height || id:ukb-b-10787 (ukb-b-10787) #> Removing the following SNPs for incompatible alleles: #> rs11252860, rs11252860 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10811092, rs12572775, rs12722976, rs1290790, rs1467847, rs153661, rs3771382, rs3790086, rs3812163, rs418280, rs4302014, rs6947915, rs7652177, rs7847059, rs832806, rs9976812 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Sitting height || id:ukb-b-16881 (ukb-b-16881) #> Removing the following SNPs for incompatible alleles: #> rs11252860, rs11252860 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs10811092, rs12572775, rs12722976, rs1290790, rs1467847, rs153661, rs3771382, rs3790086, rs3812163, rs418280, rs4302014, rs6947915, rs7652177, rs7847059, rs832806, rs9976812 #> Performing shrinkage #> After shrinkage keeping: #> ukb-b-10787 #> ukb-b-20175 #> Estimating joint effects of the following trait(s) associated with rs8027450 #> Birth weight of first child || id:ukb-b-3357 #> Birth weight || id:ukb-b-13378 #> Medication for cholesterol, blood pressure or diabetes: Cholesterol lowering medication || id:ukb-b-11740 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Birth weight || id:ukb-b-13378. Just keeping the first instance: #> rs2140240 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Systolic blood pressure, automated reading || id:ukb-b-20175. Just keeping the first instance: #> rs17811915 #> Warning: 'clump_data' is deprecated. #> Use 'ieugwasr::ld_clump()' instead. #> See help("Deprecated") #> Clumping 1, 507 variants #> Removing 183 of 507 variants due to LD with other variants or absence from LD reference panel #> Extracting data for 318 SNP(s) from 4 GWAS(s) #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Medication for cholesterol, blood pressure or diabetes: Cholesterol lowering medication || id:ukb-b-11740 (ukb-b-11740) #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs11592442, rs12779675, rs1290790, rs1344672, rs2246832 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Birth weight || id:ukb-b-13378 (ukb-b-13378) #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs11592442, rs12779675, rs1290790, rs1344672, rs2246832 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Birth weight of first child || id:ukb-b-3357 (ukb-b-3357) #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs11592442, rs12779675, rs1290790, rs1344672, rs2246832 #> Performing shrinkage #> After shrinkage keeping: #> ukb-b-11740 #> ukb-b-13378 #> ukb-b-20175 #> ukb-b-3357 #> Estimating joint effects of the following trait(s) associated with rs9349379 #> Operative procedures - secondary OPCS: Y02.2 Insertion of prosthesis into organ NOC || id:ukb-b-1744 #> Treatment/medication code: ibuprofen || id:ukb-b-16866 #> Pain type(s) experienced in last month: Headache || id:ukb-b-12181 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Pain type(s) experienced in last month: Headache || id:ukb-b-12181. Just keeping the first instance: #> rs34555420 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Systolic blood pressure, automated reading || id:ukb-b-20175. Just keeping the first instance: #> rs17811915 #> Warning: 'clump_data' is deprecated. #> Use 'ieugwasr::ld_clump()' instead. #> See help("Deprecated") #> Clumping 1, 298 variants #> Removing 36 of 298 variants due to LD with other variants or absence from LD reference panel #> Extracting data for 259 SNP(s) from 4 GWAS(s) #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Systolic blood pressure, automated reading || id:ukb-b-20175. Just keeping the first instance: #> rs17811915 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Pain type(s) experienced in last month: Headache || id:ukb-b-12181 (ukb-b-12181) #> Removing the following SNPs for incompatible alleles: #> rs17811915, rs17811915 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs11592442, rs12779675, rs1290790, rs2246832 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Treatment/medication code: ibuprofen || id:ukb-b-16866 (ukb-b-16866) #> Removing the following SNPs for incompatible alleles: #> rs17811915, rs17811915 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs11592442, rs12779675, rs1290790, rs2246832 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Operative procedures - secondary OPCS: Y02.2 Insertion of prosthesis into organ NOC || id:ukb-b-1744 (ukb-b-1744) #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs11592442, rs12779675, rs1290790, rs2246832 #> Performing shrinkage #> After shrinkage keeping: #> ukb-b-12181 #> ukb-b-1744 #> ukb-b-20175 #> Estimating joint effects of the following trait(s) associated with rs2971603 #> Pain type(s) experienced in last month: Headache || id:ukb-b-12181 #> Only one candidate trait for SNP rs2971603 so performing standard MVMR instead of LASSO #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Pain type(s) experienced in last month: Headache || id:ukb-b-12181. Just keeping the first instance: #> rs34555420 #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Systolic blood pressure, automated reading || id:ukb-b-20175. Just keeping the first instance: #> rs17811915 #> Warning: 'clump_data' is deprecated. #> Use 'ieugwasr::ld_clump()' instead. #> See help("Deprecated") #> Clumping 1, 292 variants #> Removing 34 of 292 variants due to LD with other variants or absence from LD reference panel #> Extracting data for 257 SNP(s) from 2 GWAS(s) #> Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Systolic blood pressure, automated reading || id:ukb-b-20175. Just keeping the first instance: #> rs17811915 #> Harmonising Systolic blood pressure, automated reading || id:ukb-b-20175 (ukb-b-20175) and Pain type(s) experienced in last month: Headache || id:ukb-b-12181 (ukb-b-12181) #> Removing the following SNPs for incompatible alleles: #> rs17811915, rs17811915 #> Removing the following SNPs for being palindromic with intermediate allele frequencies: #> rs11592442, rs12779675, rs1290790, rs2246832
The adjusted effect estimates:
x$output$analyse.mv$estimates #> est b se pval nsnp Q #> 1 Raw 0.5991067 0.07717696 2.642311e-13<PHONE_NUMBER> #> 2 Outliers removed (all) 0.6437695 0.06349886 3.767303e-20<PHONE_NUMBER> #> 3 Outliers removed (candidates) 0.7095277 0.05475819 6.135623e-29<PHONE_NUMBER> #> 4 Outliers adjusted 0.6192846 0.06555078 3.930161e-18<PHONE_NUMBER> #> int Isq #> 1 0 0.7312930 #> 2 0 0.4328507 #> 3 0 0.5879640 #> 4 0 0.6201480
A plot is generated showing how SNP effects have changed due to candidate trait adjustments in:
x$output$analyse.mv$plot
To produce a basic diagram of the connectivity of SNPs, candidate traits, exposure and outcome:
tryx.network(x$output)
This shows that some candidate traits influence the exposure only, the outcome only, or both the exposure and the outcome.
You can also create a volcano plot of the candidate-exposure and/or candidate-outcome associations. e.g. to show exposures and outcomes
volcano_plot( rbind(x$output$candidate_exposure_mr, x$output$candidate_outcome_mr) )
or e.g. just exposures
volcano_plot(x$output$candidate_exposure_mr)


Fivepseq User Guide¶
Fivepseq is a software package for analysis of 5’ endpoint distribution in RNA sequencing datasets. This is particularly useful for techniques that capture 5’ monophosphorylated RNAs, such as 5PSeq, PARE-seq or GMUC. It may also be useful for ribosome profiling datasets and alike.
The main workflow of fivepseq is intended for downstream analysis of alignment files to describe the distribution of 5’ endpoints of reads relative to translation start and stop sites, as well as relative to amino acids or codons. It also computes frame preference of 5’ endpoint distribution and captures periodicity patterns.
The output of fivepseq is in the form of html report files, as well as text files and image files in portable network graphic and vector graphics formats.
Homepage¶
For more information, demo cases and citation, visit Fivepseq homepage
- Installation
- Preparing the data
- Running fivepseq
- Interpreting the output
- Demo data
- Entry point: fivepseq_plots/RUNNAME.html
- General notes on interacting with html report files
- Main report: fivepseq_plots/main/RUNNAME_main.html
- Combined report: fivepseq_plots/main/RUNNAME_combined.html
- Supplement: fivepseq_plots/supplement/RUNNAME_amino_acid_linecharts.html
- Supplement: fivepseq_plots/supplement/RUNNAME_codon_linecharts.html
- Supplement: fivepseq_plots/supplement/RUNNAME_codon_heatmaps.html
- Supplement: fivepseq_plots/supplement/RUNNAME_dicodon_linecharts.html
- Supplement: fivepseq_plots/supplement/RUNNAME_dipeptide_linecharts.html
- Supplement: fivepseq_plots/supplement/RUNNAME_tricodon_linecharts.html
- Supplement: fivepseq_plots/supplement/RUNNAME_tripeptide_linecharts.html
- Genesets: fivepseq_plots/genesets/RUNNAME_genesets_per_sample.html
- Genesets: fivepseq_plots/genesets/RUNNAME_samples_per_geneset.html
- Text output
- Count files


The following Features/Scenarios are included as part of the test suite
As a geek I want to be automated so I can be l33t
Scenario: Example Blueprint
Given I am a blueprint
And I set greeting to hello
And I set audience to world
When I build example as .
Then target folder . should exist
And target file index.html should contain hello blueprint
And target file hello.html should contain hello world
Build as-built developer documentation
Scenario: Build Feature Docs
Given I am Example Features
And I find .feature in folder ../ as files
And I delete docs folder examples
And I build test-plan as ../docs/examples
Then docs file examples/index.html should exist
@example=true
Scenario: Trivial Example
Given I am an example
When debug example works
And log example works
And error example works
Then I succeed
@skip=true
Scenario: Skip Broken Story
Given I am broken
Then I fail
@bug=skip unless debugging
Scenario: Skip Debug Story
Given I am a bug
Then I fail
Scenario: hello_world file is readable
Given I am testing existing files
And I load test from hello_world.json
Then file hello_world.json exists
And variable test should exist
And $.hello in test should match world
Scenario: bye_bye_world file does not exist
Given I am testing missing files
Then file bye_bye_world.json does not exist
Scenario: create bye_bye_world file
Given I am testing creating files
And I load test from hello_world.json
And variable test should exist
And I set test.hello to earth
And $.hello in test should match earth
When I write test to bye_bye_world.json
Then file bye_bye_world.json exists
Scenario: remove bye_bye_world file
Given I am testing deleting files
And file bye_bye_world.json exists
And I load test from bye_bye_world.json
And variable test should exist
And $.hello in test should match earth
When I delete file bye_bye_world.json
Then file bye_bye_world.json does not exist
Scenario: Inline Javascript
Given I am testing javascript
When I execute return this.targets.google.hostname=="google.com";
Scenario: Multi-line Javascript
Given I am testing more javascript
When I execute
return this.targets.google.protocol=="https";
Scenario: Always successful
Given I am testing 'pass'
Then I pass
Scenario: Wait for 1 second
Given I am testing 'wait'
And I wait 1 second
Then I succeed
@skip=true
Scenario: I break things
Given I am silently ignored
Then I fail
@bug=JIRA_SAMPLE_ID
Scenario: I have a bug
Given I am misbehaving
Then I fail
@todo=STORY_SAMPLE_ID
Scenario: I do nothing
Given I am a work-in-progress
Then I fail
Scenario: Global Var
Given I am configured
Then bonjour should exist
And bonjour equals monde
Scenario: Config Test
Given I am configured
And I set x = ok
Then I assert this.targets.default
Scenario: Scoped Variable
Given I am scoped
Then I assert this.vars.x=="ok"
Scenario: Clear Variables
Given I am forgetful
And I clear variables
Then I assert this.vars.x!="ok"
Scenario: Test Variable Assignment
Given I am testing dialect
And I set test to hello
Then variable test should match hello
Scenario: Test CSV sample
Given I am testing CSV parsing
And some CSV as test:
what, who
hello, world
greetings, earthling
Then $.[0].what in test should match hello
And $.[0].who in test should match world
And $.[1].what in test should match greetings
And $.[1].who in test should match earthling
Scenario: Test set body JSON sample - indirect via variable
Given I am testing JSON
And I set test to JSON:
{ "hello": "world", "earth": { "moon": "cheese" } }
Then hello in test should match world
And earth.moon in test should match cheese
Then I assert this.vars.test.hello=="world"
And I assert this.vars.test.earth.moon=="cheese"
@target=google
Scenario: Google - with redirects
Given I am googling
Given I enable redirects
When I GET /
Then response code should be 200
@skip=true
@target=google
Scenario: Google - no redirect
Given I am googling
Given I disable redirects
When I GET /
Then response code should be 3xx
@skip=true
@target=example
Scenario: Example.com
Given I am googling
Given I am browsing example.com
When I GET /
Then response body should contain Example Domain
Scenario: 404
Given I enable redirects
When I GET http://localhost/404/not/found
Then response code should be 404
@dialect=webapp
Scenario: Google on Firefox
Given I use firefox browser
When I visit /
When I type apigeek-architect into q
When I click btnG
When I wait until page is apigeek-architect - Google Search
Then I stop using browser
Then dump
Scenario: Create a zip file
Given I am zipping-folders
And I delete target file example.zip
And I zip target ./ to ./example.zip
Then target file ./example.zip exists
Scenario: Inspect a zip file
Given I am a unzip-test
And target file example.zip exists
And I read target zip example.zip
Then variable zip.entries exists
And any $..entryName in zip.entries should match index.html
And any $..name in zip.entries should match index.html


Figure flowers transgenic repressors lines chimeric generated torenia promoters changes constructs flower Plant line phenotypic CpTCPB-RD observed AtSEP-RD TCP {border-style Arabidopsis Supplementary gene promoter px;} using #ffffff;} color lobes non-transgenic purple cyclamen different effects genes petals serrations Biotechnol CpCHSp- Table plants CpDFRp- Sp- Torenia cell expression repressor sequences AtTCP-RD CpAPBp- GUS leaves modify petal phenotypes PCR Sasaki analysis caused flowers. similar staining transcription additional b). floral isolated light lobe modified vascular Aida CpSEP-RD DNA Kasajima adaxial coloration driving examined expressed harboring introduced leaf px; repression serrated used {font-family CPG Cell CpPIp CpTCPB-RD, CpTCPB-RD. Cyclamen S). Sci Shikata Tanaka Yamaguchi a). associated blue bluish cells construct factors font-size fournieri genetic primers reflectance respectively. surface white bp CpOMTp Koyama MADS-box Ohme-Takagi RGB blotch bulk containing cultivar data density did double; exhibited hue known light-colored persicum petals. phenotypes. plant transformation vector (C) (for AtSEP-RD, Click CpAPBp CpSEP, CpSEPp LINK Matsui Mitsuda Ohtsubo Thus, activity amplified anthocyanin border-color border-width c). causes colorimetric combinations conical consistent corresponding degree development digital file. flowers, limbs line. media open ornamental performed produce regulation representative round solid; study, target torenia. transformed trumpet-shaped vectors yellow {font-style {font-weight °C CUC CpDFRp CpSEP-RD. DFR However, L-type Narumi Oshima Physiol Research SEP-RD abaxial acid active addition analyzed appeared basal based blotchless bold branching breeding brightness categories cause colors comparison complicated concentrations construct. courier; domain effect em; endoreduplication expressing future greater growth images including individual line, lines. linked longer microscope model novel obtained petals, phenomenon phenotype pigmentation prepared previous previously proliferation pt;} rate red result saturation secondary showed traits transformants values violet wavelengths ‘Crown


Report: Patriots Considering Bringing Antonio Brown Back
by Andrew McCartyEarlier this week, former star wide receiver Antonio Brown issued a public apology to New England Patriots owner Robert Kraft.
“Mr.Kraft I apologize sincerely to you and your organization! All I wanted to be was an asset to the organization; sorry for the bad media and the drama ! Thank you sincerely AB,” Brown said on Instagram.
Several Patriots players, including quarterback Tom Brady, liked the apology on social media.
Immediately after the apology came out, fans wondered if the Patriots would consider re-signing the star wide receiver. Given the team’s struggles on offense over the past few weeks, adding a legitimate star to the receiving corps would certainly help.
According to a report from former Patriots tight end and current New England analyst Christian Fauria, the Patriots have “kicked the tires” on adding Antonio Brown.
“I think they have kicked the tires…I know there have been discussions. That’s for sure,” Fauria said.
Brown played in one game for the Patriots earlier this season. He showed immediate chemistry with Brady, connecting for four receptions for 56 yards and a touchdown.
However, Brown found himself out of the job just a week later. Will the Patriots take him back?
Stay tuned for the latest.


© 2019 Team Interlaken – University of Applied Sciences and Arts Northwestern Switzerland FHNW. All rights reserved.


Belarus election results: An opposition-free parliament
by The Associated PressMINSK, Belarus — Full preliminary results from parliamentary elections in Belarus show the chamber will have no members of the opposition to challenge strongman President Alexander Lukashenko.
Results released by the national elections commission on Monday show all the parliament’s 110 seats won by former government functionaries, diplomats and members of pro-government parties.
The outgoing parliament in the former Soviet republic had two opposition deputies. But they and many other opposition candidates were blocked from running again.
The election came ahead of a presidential election next year, in which Lukashenko plans to run for another term. In office since 1994, the former collective farm manager has stifled dissent and independent news media and retained many aspects of a Soviet-style economy.
The Associated Press


Class: RubyInstaller::Build::ErbCompiler
| Relationships & Source Files | |
| Namespace Children | |
|
Classes:
| |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Instance Chain:
self,
Utils
|
|
| Inherits: | Object |
| Defined in: | lib/ruby_installer/build/erb_compiler.rb |
Overview
This class processes a template file with ERB. The ERB template is either taken from the current directory or, if it doesn’t exist, from the gem root directory.
Constant Summary
Utils
- Included
Class Method Summary
-
.new(erb_file_rel, result_file_rel = nil) ⇒ ErbCompiler
constructor
Create a new ERB object to process a template.
Instance Attribute Summary
- #erb_filename readonly
- #erb_filename_abs readonly
Instance Method Summary
-
#result(task = nil)
Returns the ERB content as String with UTF-8 encoding.
- #result_filename
-
#write_result(task = nil, filename = nil)
Write the ERB result to a file in UTF-8 encoding.
Utils
- Included
| #eval_file, | |
| #file | Extend rake’s file task to be defined only once and to check the expected file is indeed generated. |
| #msys_sh, | |
| #ovl_expand_file | Returns the absolute path of |
| #ovl_glob | Scan the current and the gem root directory for files matching |
| #ovl_read_file | Read |
| #q_inno | Quote a string according to the rules of Inno-Setup. |
| #rubyinstaller_build_gem_files | Return the gem files of “rubyinstaller-build”. |
| #task | Extend rake’s task definition to be defined only once, even if called several times. |
| #with_env, #with_sandbox_ruby, #task_once |
Constructor Details
.new(erb_file_rel, result_file_rel = nil) ⇒ ErbCompiler
Create a new ERB object to process a template.
The ERB template erb_file_rel
should be a relative path. It is either taken from the current directory or, if it doesn’t exist, from the gem root directory.
# File 'lib/ruby_installer/build/erb_compiler.rb', line 43
def initialize(erb_file_rel, result_file_rel=nil) @erb_filename = erb_file_rel @erb_filename_abs = (erb_file_rel) @erb = ERB.new(File.read(@erb_filename_abs, encoding: "UTF-8")) @result_file_rel = result_file_rel || erb_file_rel.sub(/\.erb$/, "") @erb.filename = @result_file_rel end
Instance Attribute Details
#erb_filename (readonly)
[ GitHub ]# File 'lib/ruby_installer/build/erb_compiler.rb', line 36
attr_reader :erb_filename
#erb_filename_abs (readonly)
[ GitHub ]# File 'lib/ruby_installer/build/erb_compiler.rb', line 37
attr_reader :erb_filename_abs
Instance Method Details
#result(task = nil)
Returns the ERB content as String with UTF-8 encoding.
A Box instance is used as binding to process the ERB template. All method calls are redirected to the task
object.
#result_filename
[ GitHub ]# File 'lib/ruby_installer/build/erb_compiler.rb', line 51
def result_filename @result_file_rel end
#write_result(task = nil, filename = nil)
Write the ERB result to a file in UTF-8 encoding.
See #result
If no file name is given, it is derived from the template file name by cutting the .erb
extension. If the file path contains non-exising directories, they are created.
# File 'lib/ruby_installer/build/erb_compiler.rb', line 70
def write_result(task=nil, filename=nil) filename ||= result_filename FileUtils.mkdir_p File.dirname(filename) File.binwrite(filename, result(task)) filename end


GreedTeam
About
Video
Blog
Tags
Archive
Search
GreedTeam
About Us
Hello World, We are iOS Hackers.
Recent Article
Another Sharepoint post
A blog is a Web site that enables you or...
Latest Article
Test Test post
A blog is a Web site that enables you or...
Linkin Section:
Posts
News


Enumerable MethodCycle Method2/8/15So in this blog I want to go over, and explain an enumerable method called the cycle method. But first I'd like to explain what an enumerable method is. The Enumerable module provides a set of methods to traverse, search, sort and manipulate collections.If you understand loops and arrays and hashes, there's nothing really new here. We can use the enumerables to iterate over, or go through each and every element of, a given collection class (i.e. an array or a hash) and tell it to run a block of code while they are at it. Enumerables can also sort them by size, alphabetically, lexicographically, randomly, etc. There are just so many different types of useful enumerables out there.
So more specifically what does the cycle method do? It repeates over and over an operation or a block of code, much like so:
As you call the cycle method on our variable it continuously prints out our array as a loop if none or nil is given. If a non-positive number is given or the collection is empty, it does nothing. Returns nil if the loop has finished without getting interrupted. However, there is a way to stop it from repeating or returning nothing. If you give it a set integer as an arguement like in the example where the arguement is '(2)' it will repeat your array the amount of times as you give in the arguement so in our case it's two times. |
|
Other Blog entries |


| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| ExpressionAndSyntacticContext
An ExpressionAndSyntacticContext encapsulates information about a sub-expression
and the context in which it appears.
|
| IndexExpressionsSet
Represents an immutable set of index expressions of an intensional set.
|
| IntensionalSet
An
Expression that represents an intensionally defined set. |
| Parser.ErrorListener |
| QuantifiedExpression
An
Expression that represents a quantified expression, that is, an expression introducing new variables,
such as universal and existential quantified expressions, intensional sets, and lambda expressions. |
| QuantifiedExpressionWithABody
An
ExpressionStepSolver of the form IDENTIFIER . |
| SubExpressionAddress
A SubExpressionAddress represents the relative position of a sub-expression within its parent expression.
|
| SyntacticFunctionApplication
An
Expression that represents a syntactic function application
(that is, something that takes expressions themselves, rather than their values, as arguments). |
| SyntaxTree
A Syntax tree (also known as syntactic tree).
|
| Tuple
An
Expression that represents a tuple of sub-expressions. |
| Type
Represents the type of expressions.
|
| Class and Description |
|---|
| CompoundSyntaxTree
A SyntaxTree with children.
|
| CountingFormula
An
Expression that represents a counting formula, for example: |
| ExistentiallyQuantifiedFormula
An
Expression that represents an existentially quantified formula. |
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| ExpressionAndSyntacticContext
An ExpressionAndSyntacticContext encapsulates information about a sub-expression
and the context in which it appears.
|
| ExtensionalSet
An
Expression that represents an extensionally defined set. |
| FunctionApplication
An
Expression that represents a function application. |
| IndexExpressionsSet
Represents an immutable set of index expressions of an intensional set.
|
| IntensionalSet
An
Expression that represents an intensionally defined set. |
| LambdaExpression
An
Expression that represents a lambda expression. |
| QuantifiedExpression
An
Expression that represents a quantified expression, that is, an expression introducing new variables,
such as universal and existential quantified expressions, intensional sets, and lambda expressions. |
| QuantifiedExpressionWithABody
An
ExpressionStepSolver of the form IDENTIFIER . |
| SubExpressionAddress
A SubExpressionAddress represents the relative position of a sub-expression within its parent expression.
|
| Symbol
An
Expression that represents a symbol. |
| SyntacticFunctionApplication
An
Expression that represents a syntactic function application
(that is, something that takes expressions themselves, rather than their values, as arguments). |
| SyntaxLeaf
A SyntaxTree with no children.
|
| SyntaxTree
A Syntax tree (also known as syntactic tree).
|
| Tuple
An
Expression that represents a tuple of sub-expressions. |
| UniversallyQuantifiedFormula
An
Expression that represents a universally quantified formula. |
| Class and Description |
|---|
| CompoundSyntaxTree
A SyntaxTree with children.
|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| ExpressionAndSyntacticContext
An ExpressionAndSyntacticContext encapsulates information about a sub-expression
and the context in which it appears.
|
| Parser.ErrorListener |
| Symbol
An
Expression that represents a symbol. |
| SyntaxLeaf
A SyntaxTree with no children.
|
| SyntaxTree
A Syntax tree (also known as syntactic tree).
|
| Tuple
An
Expression that represents a tuple of sub-expressions. |
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Type
Represents the type of expressions.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| IndexExpressionsSet
Represents an immutable set of index expressions of an intensional set.
|
| Type
Represents the type of expressions.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Type
Represents the type of expressions.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| ExpressionAndSyntacticContext
An ExpressionAndSyntacticContext encapsulates information about a sub-expression
and the context in which it appears.
|
| Type
Represents the type of expressions.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Type
Represents the type of expressions.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| IndexExpressionsSet
Represents an immutable set of index expressions of an intensional set.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| IndexExpressionsSet
Represents an immutable set of index expressions of an intensional set.
|
| Type
Represents the type of expressions.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| IndexExpressionsSet
Represents an immutable set of index expressions of an intensional set.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| ExtensionalSet
An
Expression that represents an extensionally defined set. |
| IndexExpressionsSet
Represents an immutable set of index expressions of an intensional set.
|
| IntensionalSet
An
Expression that represents an intensionally defined set. |
| QuantifiedExpression
An
Expression that represents a quantified expression, that is, an expression introducing new variables,
such as universal and existential quantified expressions, intensional sets, and lambda expressions. |
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| SubExpressionAddress
A SubExpressionAddress represents the relative position of a sub-expression within its parent expression.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| IndexExpressionsSet
Represents an immutable set of index expressions of an intensional set.
|
| SyntaxTree
A Syntax tree (also known as syntactic tree).
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| IndexExpressionsSet
Represents an immutable set of index expressions of an intensional set.
|
| SyntaxTree
A Syntax tree (also known as syntactic tree).
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| IntensionalSet
An
Expression that represents an intensionally defined set. |
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Parser
A parser maps strings to the corresponding
Expression s. |
| Parser.ErrorListener |
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Type
Represents the type of expressions.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Type
Represents the type of expressions.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Type
Represents the type of expressions.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Type
Represents the type of expressions.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Type
Represents the type of expressions.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Type
Represents the type of expressions.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Type
Represents the type of expressions.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Type
Represents the type of expressions.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Type
Represents the type of expressions.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Type
Represents the type of expressions.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Parser
A parser maps strings to the corresponding
Expression s. |
| Parser.ErrorListener |
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Type
Represents the type of expressions.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| Class and Description |
|---|
| Type
Represents the type of expressions.
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|
| IndexExpressionsSet
Represents an immutable set of index expressions of an intensional set.
|
| SyntaxTree
A Syntax tree (also known as syntactic tree).
|
| Class and Description |
|---|
| Expression
An Expression is an algebraic expression based on a syntax tree.
|


Berkeley Marriage Pact - Data Analysis
25 Feb 2020The Berkeley Marriage Pact
Dating apps, at least it seems to me, operate on perverse incentives. Take two Tinder users who are matched together. They go on a date together, sparks fly, and love blossoms. They start dating, get married, and never open Tinder again. Years pass and the app is eventually uninstalled. In their success lies Tinder’s loss.
The true optimal strategy for Tinder and other dating apps is to keep users swiping for as long as possible. Feed users matches who are almost compatible. Keep them crawling back to shoot their shot. Keep them pulling on the lever of the slot machine.
At least, this was the thesis on which the Berkeley Marriage Pact was built. The idea was simple. Write a survey, have Berkeley students take it, and match people based on survey responses. And unlike dating apps, we have no ulterior motive. Our sole goal was to maximize the number of relationships.
All in all, we had more than 3,000 responses, of which about 2500 confirmed their emails. In the end we made about 1300 matches. While the success of these matches is still not clear, we would like to present some interesting findings from the data.
TL;DR
If you’re too lazy to read everything, I’ve organized the parts of this post that absolutely scintillate into clickbait titles for your enjoyment:
- Only 30% of women, 26% of Hispanics, and 27% of Blacks think they are smarter than average. 60% of men think they are smarter than average.
- There seems to be a very depressed portion of Berkeley.
- The more extreme your political views, the more extreme your sex life.
- Choice of Alcohol.
- Fish people are the most confident.
- Sex.
- The part where we laugh at the Right.
- Dunning-Kruger.
Table of Contents
- The Data
- Loss of Innocence
- Sex, Sexuality, and Sexual Partners
- Political Affiliation
- Health and Lifestyle
- Are you smarter than the Average Bear?
The Data
We asked 43 questions, ranging from “religious affiliation” to “boba consumption.” All data revealed in this post will be in aggregate and no individual data should be recoverable. If you have any concerns please let us know through email.
This post mainly contains interesting correlations and trends in the data. You can see a presentation of just the aggregate responses here.
Loss of Innocence
“If a body meet a body coming through the rye”
– Rabbie Burns, “Comin thro’ the Rye”
It’s not entirely surprising that there is a loss of innocence as people go through college, although it’s mildly interesting that we are able to quantify and graph this loss of innocence.
 It’s probably as good a time as any to point out that the error bars capture a 95% confidence interval.
Substance Abuse
We can also take a look at various substances that people put in their bodies:
It’s interesting to note that vodka preference drops drastically with age.
I also like how “Wine” peaks in Junior year and “Beer” just keeps rising, as if people go from “I love vodka” to “I’m fancy as fuck” to “I just don’t care anymore”.
It’s interesting how boba consumption drops off as well, perhaps because seniors have finally come to terms with the fact that they can’t put just anything in to their bodies. In a similar vein, it seems that people actually live healthier lifestyles as they age:
As a side note, while these differences seem small you have to remember that it’s really the error bars that tell the story. While the increase in absolute days of exercise is small the error bars show that this increase is statistically significant.
Finally, perhaps the saddest graph in the section, we see Berkeley slowly crushing the intellectual curiosity and academic vitality out of her students. Or at least seniors just care about things a whole lot less:
Sex, Sexuality, and Sexual Partners
“He toss my salad like his name Romaine”
– Nicki Minaj, “Anaconda”
My lawyers advised me not to say too much in this section, so here are some box and whisker plots (with the outliers removed):
And the distributions for male and female:
More boxplots:
If we plot out “number of sexual partners” against “importance of academics” we get an interesting trend:
It’s sort of sad to see that there seems to be a rather depressed portion of Berkeley students that are not only apathetic towards academics, but can’t get any sex either. You would think the relationship should be the other way around (students that don’t care about academics should have boat-loads of sex), and this is true except for the students who just don’t care about academics at all.
This is probably one of my favorite plots:
Look at how beautiful this U-shape is. The underlying mechanism here is probably that politically extreme people are also extreme in other parts of their lives.
Political Affiliation
“the night wind hammering about their siren scream and their mighty metal thunder!”
– Ray Bradbury, “Fahrenheit 451”
This is the part of the post where we simultaneously marvel at how the Right basically writes our jokes for us and try not to be featured on “Fox and Friends.”
Health and Lifestyle
“But if snow is like skin: it pulls away, so easy, dragged from the body / What if all stripped wood is branches and all frozen lakes are water?”
– Jordaan Mason, “Avalanches”
Berkeley students are surprisingly healthy:
Are you Smarter than the Average Bear?
“I’m smarter than the av-er-age bear!”
– Yogi Bear
The last question we asked was “Are you smarter than the average (Cal) Bear?” 46.2% of people responded yes to this question, but things start to get interesting when you break down the results by other categories. For example, let’s start with gender. We plot the proportion of people that answered “yes” to the question:
60% of men say they are smarter, while only 30% of women think they are smarter than average. The difference is stark. The percentages are even worse if we look at race:
On a lighter note it seems that fish-people are for some strange reason very confident:
Finally, if we break the data down by “Perceived importance of academics” we get an interesting Dunning-Kruger-esque trend:


11.1.n encoding attribute of submission element
|
| open |
../../Chapt11/11.1/11.1.n.xhtml |
|
|
| waitForModelReady |
xpath=//xforms:model |
|
|
| click |
xpath=//xforms:submit[@submission='submitA']/xforms:label |
|
Clicks on submit button |
| waitForElementPresent |
xpath=//pre[1] |
|
|
| verifyText |
xpath=//pre[1] |
*xml version="1.0" encoding="UTF-8"* |
|
| open |
../../Chapt11/11.1/11.1.n.xhtml |
|
|
| waitForModelReady |
xpath=//xforms:model |
|
|
| click |
xpath=//xforms:submit[@submission='submitB']/xforms:label |
|
Clicks on submit button |
| waitForElementPresent |
xpath=//pre[1] |
|
|
| verifyText |
xpath=//pre[1] |
*xml version="1.0" encoding="ISO-8859-1"* |
|


Comments!
Post
{{ comment.comment }}
-
{{ comment.name }}
{{comment.upvotes}}
Upvotes
{{comment.downvotes}}
Downvotes