Filtering some traits
Abnormal blistering of the skin -> blister
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(`DISEASE/TRAIT` == "Blister (PheCode 911)",
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("abnormal blistering of the skin"),
"blister"
),
collected_all_disease_terms
)
)
Abnormality of the digestive system
gwas_study_info |>
filter(grepl(vec_to_grep_pattern("abnormality of the digestive system"),
collected_all_disease_terms,
perl = T)) |>
pull(`DISEASE/TRAIT`) |>
unique()
[1] "Other abdominal problem"
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
str_remove_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern("abnormality of the digestive system")))
Abnormality of skin pigmentation
gwas_study_info |>
filter(grepl("abnormality of skin pigmentation", collected_all_disease_terms)) |>
pull(`DISEASE/TRAIT`) |>
unique()
[1] "Skin colour saturation"
[2] "Perceived skin darkness"
[3] "Skin pigmentation"
[4] "Non-melanoma skin cancer"
[5] "Skin luminance"
[6] "Skin red/green component"
[7] "Skin yellow/blue component"
[8] "25-hydroxyvitamin D levels x skin colour (very fair vs. fair) interaction"
[9] "25-hydroxyvitamin D levels x skin colour (very fair vs. light olive) interaction"
[10] "Skin colour - Brown (UKB data field 1717)"
[11] "Skin colour - Dark olive (UKB data field 1717)"
[12] "Skin colour - Fair (UKB data field 1717)"
[13] "Skin colour - Light olive (UKB data field 1717)"
[14] "Skin colour - Very fair (UKB data field 1717)"
[15] "Skin colour - Dark olive (UKB data field 1717) (Gene-based burden)"
[16] "Skin colour - Brown (UKB data field 1717) (Gene-based burden)"
[17] "Skin colour - Fair (UKB data field 1717) (Gene-based burden)"
[18] "Skin colour - Light olive (UKB data field 1717) (Gene-based burden)"
[19] "Skin colour - Very fair (UKB data field 1717) (Gene-based burden)"
[20] "Skin pigmentation traits"
[21] "Tatto pigmentation"
# as can see, most of these traits are not about true skin pigmentation abnormalities
# just about skin pigmentation in general
# if `DISEASE/TRAIT` contains "UKB data field 1717" (which is just a skin colour measurment field)
# then remove "abnormality of skin pigmentation" from collected_all_disease_terms
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("UKB data field 1717",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_remove_all(collected_all_disease_terms,
pattern = "abnormality of skin pigmentation"
),
collected_all_disease_terms
)
)
# also remove if `DISEASE/TRAIT` contains "Tattoo pigmentation"
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("tattoo pigmentation|tatto pigmentation",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_remove_all(collected_all_disease_terms,
pattern = "abnormality of skin pigmentation"
),
collected_all_disease_terms
)
)
# also remove if `DISEASE/TRAIT` is any of the following:
# - Perceived skin darkness
# - Skin red/green component
# - Skin yellow/blue component
# - Skin pigmentation traits
# - Skin pigmentation
# - Skin luminance
remove_terms <- c("Perceived skin darkness",
"Skin red/green component",
"Skin yellow/blue component",
"Skin pigmentation traits",
"Skin pigmentation",
"Skin luminance",
"Skin colour saturation"
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(`DISEASE/TRAIT` %in% remove_terms,
stringr::str_remove_all(collected_all_disease_terms,
pattern = "abnormality of skin pigmentation"
),
collected_all_disease_terms
)
)
# this leaves PUBMED_ID 23548203, which according to suplementary table 1
# is `Number of non-melanoma skin cancer (5+)`
# so change to "non-melanoma skin cancer"
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(PUBMED_ID == "23548203",
stringr::str_replace_all(collected_all_disease_terms,
pattern = "abnormality of skin pigmentation",
replacement = "non-melanoma skin cancer"
),
collected_all_disease_terms
)
)
Abnormal thrombosis
# interesting things going on with abnormal thrombosis
gwas_study_info |>
filter(grepl(vec_to_grep_pattern("abnormal thrombosis"),
collected_all_disease_terms, perl = T)) |>
select(`DISEASE/TRAIT`, collected_all_disease_terms, PUBMED_ID)
DISEASE/TRAIT
<char>
1: Thrombosis
2: Blood clot, DVT, bronchitis, emphysema, asthma, rhinitis, eczema, allergy diagnosed by doctor: PHESANT recoding (UKB data field 6152_100)
3: Blood clot, DVT, bronchitis, emphysema, asthma, rhinitis, eczema, allergy diagnosed by doctor: Blood clot in the lung (UKB data field 6152_7)
4: Blood clot in the lung (UKB data field 6152) (Gene-based burden)
5: Blood clot in the lung (UKB data field 6152)
collected_all_disease_terms PUBMED_ID
<char> <int>
1: abnormal thrombosis 26908601
2: abnormal thrombosis 34737426
3: abnormal thrombosis 34737426
4: abnormal thrombosis 34662886
5: abnormal thrombosis 34662886
# if DISEASE/TRAIT contains Blood clot in the lung \\(UKB data field 6152\\)
# replace abnormal thrombosis in collected_all_disease_terms with pulmonary embolism
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Blood clot in the lung \\(UKB data field 6152\\)",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("abnormal thrombosis"),
"pulmonary embolism"
),
collected_all_disease_terms
)
)
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Blood clot in the lung \\(UKB data field 6152_7\\)",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("abnormal thrombosis"),
"pulmonary embolism"
),
collected_all_disease_terms
)
)
## PHESANT recoding (UKB data field 6152_100)
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("PHESANT recoding \\(UKB data field 6152_100\\)",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("abnormal thrombosis, allergic disease, respiratory system disease"),
"pulmonary embolism, deep vein thrombosis, chronic bronchitis, emphysema, asthma, rhinitis, eczema"
),
collected_all_disease_terms
)
)
# for pubmed id: 26908601
# remove abnormal thrombosis
# because this is included in the other provided terms
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(PUBMED_ID == "26908601",
stringr::str_remove_all(collected_all_disease_terms,
vec_to_grep_pattern("abnormal thrombosis")
),
collected_all_disease_terms
)
)
Acute coronary syndrome
# for pubmed id 28753643
# acute coronary syndrome (ACS)
# comes from the SOLID-TIMI 52 cohort: experienced acute coronary syndrome (ACS; unstable angina, non–ST-elevation or ST-elevation MI)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(PUBMED_ID == "28753643",
stringr::str_replace_all(collected_all_disease_terms,
pattern = "acute coronary syndrome",
replacement = "unstable angina, acute subendocardial myocardial infarction, acute transmural myocardial infarction of unspecified site"
),
collected_all_disease_terms
)
)
# define similarly in pubmed id: 24952865, 25583994, 25935875
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(PUBMED_ID %in% c("28753643","24952865", "28753645", "25583994", "25935875", "34158603"),
stringr::str_replace_all(collected_all_disease_terms,
pattern = "acute coronary syndrome",
replacement = "unstable angina, acute subendocardial myocardial infarction, acute transmural myocardial infarction of unspecified site"
),
collected_all_disease_terms
)
)
# for pubmed id 35356681, acute coronary syndrome (ACS) - is actually non-ST elevation acute coronary syndrome
gwas_study_info |>
filter(grepl(vec_to_grep_pattern("acute coronary syndrome"),
collected_all_disease_terms,
perl = T)) |>
filter(PUBMED_ID == "35356681") |>
pull(`DISEASE/TRAIT`) |>
unique()
[1] "Bisoprolol clearance in non-ST elevation acute coronary syndrome"
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(PUBMED_ID == "35356681",
stringr::str_replace_all(collected_all_disease_terms,
pattern = "acute coronary syndrome",
replacement = "acute subendocardial myocardial infarction"
),
collected_all_disease_terms
)
)
Attached earlobe
gwas_study_info |>
filter(grepl("attached earlobe", collected_all_disease_terms)) |>
pull(`DISEASE/TRAIT`) |>
unique()
[1] "Common traits (Other)" "Earlobe attachment"
# remove attached earlobe
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_remove_all(collected_all_disease_terms,
pattern = "attached earlobe"
))
Chronic disease
gwas_study_info |>
filter(grepl(vec_to_grep_pattern("chronic disease"),
collected_all_disease_terms,
perl = T)) |>
pull(`DISEASE/TRAIT`) |>
unique()
[1] "Long standing illness disability or infirmity (UKB data field 2188)"
[2] "Long standing illness disability or infirmity (UKB data field 2188) (Gene-based burden)"
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
str_remove_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern("chronic disease")))
Facial wrinkling
gwas_study_info |>
filter(grepl("facial wrinkling", collected_all_disease_terms)) |>
pull(`DISEASE/TRAIT`) |>
unique()
[1] "Facial wrinkles"
[2] "Facial wrinkles (forehead)"
[3] "Facial wrinkles (frown lines)"
[4] "Facial wrinkles (crow's feet)"
[5] "Facial wrinkles (principal components analysis)"
[6] "Facial wrinkles (under eye)"
# remove facial wrinkling
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_remove_all(collected_all_disease_terms,
pattern = "facial wrinkling"
))
Fibrosis
gwas_study_info |>
filter(grepl(vec_to_grep_pattern("fibrosis"),
collected_all_disease_terms,
perl = T)) |>
pull(`DISEASE/TRAIT`) |>
unique()
[1] "Fibrosis"
[2] "Fibrosis (moderate to severe) in head and neck cancer treated with radiotherapy"
[3] "Fibrosis (severe) in head and neck cancer treated with radiotherapy"
[4] "Fibrosis or atrophy (moderate to severe) in head and neck cancer treated with radiotherapy"
[5] "Fibrosis or atrophy (severe) in head and neck cancer treated with radiotherapy"
[6] "Standardised Total Average Toxicity (late dysphagia, xerostomia, fibrosis or atrophy) in head and neck cancer treated with radiotherapy"
[7] "Standardised Total Average Toxicity (acute dysphagia, mucositis, late dysphagia, xerostomia, fibrosis or atrophy) in head and neck cancer treated with radiotherapy"
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern("fibrosis, head and neck cancer"),
replacement = "head and neck cancer"
)
)
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(PUBMED_ID == "38601445",
str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern("fibrosis"),
replacement = "lung cancer"
),
collected_all_disease_terms
)
)
Gender identity disorder
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("childhood gender nonconformity"),
"gender identity disorder"
))
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_remove_all(collected_all_disease_terms,
pattern = "gender identity disorder"
))
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_remove_all(collected_all_disease_terms,
pattern = "sexual and gender identity disorders"
))
Handedness
gwas_study_info |>
filter(grepl("handedness", collected_all_disease_terms)) |>
pull(`DISEASE/TRAIT`) |>
unique()
[1] "Handedness (non-right-handed vs right-handed)"
[2] "Handedness (Left-handed vs. non-left-handed)"
[3] "Handedness (left-handed vs. right-handed)"
[4] "Relative hand skill in reading disability"
[5] "Relative hand skill"
[6] "Handedness in dyslexia"
[7] "Handedness"
[8] "Handedness (chirality/laterality): Right-handed (UKB data field 1707_1)"
[9] "Handedness (Right-handed vs. non-right-handed)"
[10] "Ambidextrousness"
[11] "Ambidextrousness (ambidextrous vs right-handed)"
[12] "Left-handedness"
[13] "Handedness (confirmatory factor analysis Factor 36)"
# remove handedness
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_remove_all(collected_all_disease_terms,
pattern = "handedness"
))
# also remove functional laterality if Handedness chirality laterality is in DISEASE/TRAIT
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Handedness",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_remove_all(collected_all_disease_terms,
pattern = "functional laterality"
),
collected_all_disease_terms
)
)
# also remove functional laterality if Usual side of head for mobile phone use is in DISEASE/TRAIT
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Usual side of head for mobile phone use",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_remove_all(collected_all_disease_terms,
pattern = "functional laterality"
),
collected_all_disease_terms
)
)
# also remove functional laterality if PUBMED_ID=20585627
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(PUBMED_ID == "20585627",
stringr::str_remove_all(collected_all_disease_terms,
pattern = "functional laterality"
),
collected_all_disease_terms
)
)
Hyperplasia
gwas_study_info |>
filter(grepl(vec_to_grep_pattern("hyperplasia"),
collected_all_disease_terms,
perl = T)) |>
pull(`DISEASE/TRAIT`) |>
unique()
[1] "Bilateral adrenal hyperplasia"
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Bilateral adrenal hyperplasia",
`DISEASE/TRAIT`,
ignore.case = TRUE),
str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern("hyperplasia"),
replacement = "bilateral adrenal hyperplasia"
),
collected_all_disease_terms
)
)
Hypersensitivity reaction disease
gwas_study_info |>
filter(grepl(vec_to_grep_pattern("hypersensitivity reaction disease"),
collected_all_disease_terms,
perl = T)) |>
pull(`DISEASE/TRAIT`) |>
unique()
[1] "Nevirapine-induced hypersensitivity in HIV"
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
str_remove_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern("hypersensitivity reaction disease")))
Inflammatory skin disease
gwas_study_info |>
filter(grepl(vec_to_grep_pattern("inflammatory skin disease"),
collected_all_disease_terms,
perl = T)) |>
pull(`DISEASE/TRAIT`) |>
unique()
[1] "Inflammatory skin disease"
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern("inflammatory skin disease"),
replacement = "atopic dermatitis, psoriasis"
)
)
Sneezing in response to bright light (autosomal dominant compelling
helio-ophthalmic outburst syndrome)
gwas_study_info |>
filter(grepl("autosomal dominant compelling helio-ophthalmic outburst syndrome", collected_all_disease_terms)) |>
pull(`DISEASE/TRAIT`) |>
unique()
[1] "Photic sneeze reflex"
# remove autosomal dominant compelling helio-ophthalmic outburst syndrome
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_remove_all(collected_all_disease_terms,
pattern = "autosomal dominant compelling helio-ophthalmic outburst syndrome"
))
Skin sensitivity to sun
gwas_study_info |>
filter(grepl("skin sensitivity to sun", collected_all_disease_terms)) |>
pull(`DISEASE/TRAIT`) |>
unique()
[1] "Skin sensitivity to sun"
[2] "Ease of sunburn"
[3] "Ease of skin tanning"
[4] "Ease of skin tanning - Get mildly or occasionally tanned (UKB data field 1727)"
[5] "Ease of skin tanning - Get moderately tanned (UKB data field 1727)"
[6] "Ease of skin tanning - Get very tanned (UKB data field 1727)"
[7] "Ease of skin tanning - Never tan only burn (UKB data field 1727)"
[8] "Ease of skin tanning - Get mildly or occasionally tanned (UKB data field 1727) (Gene-based burden)"
[9] "Ease of skin tanning - Get moderately tanned (UKB data field 1727) (Gene-based burden)"
[10] "Ease of skin tanning - Never tan only burn (UKB data field 1727) (Gene-based burden)"
[11] "Ease of skin tanning - Get very tanned (UKB data field 1727) (Gene-based burden)"
# remove skin sensitivity to sun
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_remove_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern("skin sensitivity to sun")
))
# also remove suntan
gwas_study_info |>
filter(grepl("suntan", collected_all_disease_terms)) |>
pull(`DISEASE/TRAIT`) |>
unique()
[1] "Tanning" "Low tan response"
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_remove_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern("suntan"
)
))
Group some non-cancer diseases together
Abnormal brain morphology
# if DISEASE/TRAIT contains Unidentified bright object on brain MRI,
# then replace abnormal brain morphology with Other abnormal findings on diagnostic imaging of central nervous system
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Unidentified bright object on brain MRI",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("abnormal brain morphology"),
"other abnormal findings on diagnostic imaging of central nervous system"
),
collected_all_disease_terms
)
)
Abnormal ecg
# if abnormal ecg in disease/trait, then change abnormal ekg to abnormal ecg
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("abnormal ecg",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("abnormal ekg"),
"abnormal ecg"
),
collected_all_disease_terms
)
)
Abnormality of gait
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"gait imbalance",
"decreased walking ability",
"postural instability")
),
"abnormality of gait"
))
Abnormality of the nervous system, abnormality of the musculature,
abnormality of the skeletal system
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"abnormality of the musculature, abnormality of the nervous system, abnormality of the skeletal system")
),
"other symptoms and signs involving the nervous and musculoskeletal systems"
))
Other demyelinating diseases of central nervous system
# if DISEASE/TRAIT contains PheCode 341
# replace abnormality of the nervous system, with other demyelinating diseases of central nervous system
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("PheCode 341",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("abnormality of the nervous system"),
"other demyelinating diseases of central nervous system"
),
collected_all_disease_terms
)
)
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("PheCode 345",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("abnormality of the nervous system"),
"epilepsy"
),
collected_all_disease_terms
)
)
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Neurological involvement in Behcet's disease",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_remove_all(collected_all_disease_terms,
vec_to_grep_pattern("abnormality of the nervous system")
),
collected_all_disease_terms
)
)
Abdominal abscess
gwas_study_info |>
filter(grepl(vec_to_grep_pattern("abdominal abscess"),
collected_all_disease_terms, perl = T))
DISEASE/TRAIT PUBMED_ID YEAR
<char> <int> <int>
1: Abdominal infection 35173190 2022
STUDY
<char>
1: A genome-wide association study in a large community-based cohort identifies multiple loci associated with susceptibility to bacterial and viral infections.
STUDY_ACCESSION MAPPED_TRAIT MAPPED_TRAIT_URI
<char> <char> <char>
1: GCST90103953 abdominal abscess http://www.ebi.ac.uk/efo/EFO_1001753
MAPPED_BACKGROUND_TRAIT MAPPED_BACKGROUND_TRAIT_URI all_disease_terms
<char> <char> <char>
1: abdominal abscess
disease_terms MAPPED_TRAIT_CATEGORY background_disease_terms
<char> <char> <char>
1: abdominal abscess Disease/Disorder
BACKGROUND_TRAIT_CATEGORY DISEASE_STUDY collected_all_disease_terms
<char> <lgcl> <char>
1: Other TRUE abdominal abscess
# just one study - 35173190, has abdominal abscess
# they define unusually as: D73.3, K35-37, K57, K61, K63.0, K65, K75.0, K81, K83.0
# 'Abdominal infections'
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(PUBMED_ID == "35173190",
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("abdominal abscess"),
"abdominal infections code"
),
collected_all_disease_terms
)
)
Abnormal mammogram
# if DISEASE/TRAIT contains Abnormal mammogram, then change Abnormality of the breast to abnormal mammogram
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Abnormal findings on mammogram or breast exam",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("abnormality of the breast"),
"abnormal mammogram"
),
collected_all_disease_terms
)
)
Achalasia of cardia
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("achalasia"),
"achalasia of cardia"
))
Acute pancreatitis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("asparaginase-induced acute pancreatitis"),
"acute pancreatitis"
))
Amebiasis
# If `DISEASE/TRAIT` contains Diarrhoea-associated Entamoeba histolytica infection
# then replace amebiasis with amoeboma of intestine
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Diarrhoea-associated Entamoeba histolytica infection",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("amebiasis"),
"amoeboma of intestine"
),
collected_all_disease_terms
)
)
Altitude sickness
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("chronic mountain sickness"),
"altitude sickness"
))
Alopecia
alopecia_terms <- c("frontal fibrosing alopecia"
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(alopecia_terms),
"alopecia"
)
)
drug_induced_alopecia_terms <- c(
"chemotherapy-induced alopecia"
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(drug_induced_alopecia_terms),
"drug-induced androgenic alopecia"
)
)
Alcohol and nicotine codependence
# alcohol and nicotine codependence -> alcohol dependence, nicotine dependence
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("alcohol and nicotine codependence"),
"alcohol dependence, nicotine dependence"
))
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("alcohol dependence"),
"alcohol-related disorders"
))
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("nicotine dependence"),
"tobacco use disorder"
))
Amyloidosis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("al amyloidosis"),
"amyloidosis"
))
Anxiety disorder
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("anxiety"),
"anxiety disorder"
))
Aplastic anemia
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern("severe aplastic anemia"),
"aplastic anemia"
))
Androgenic alopecia
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern("androgenetic alopecia"),
"androgenic alopecia"
))
Angioedema -> Angioneurotic oedema
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("angioedema"),
"angioneurotic oedema"
))
Astigmatism
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("corneal astigmatism"),
"astigmatism"
))
Asthma
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("atopic asthma", "chronic obstructive asthma")),
"asthma"
)) |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("childhood onset asthma",
"adult onset asthma",
"aspirin-induced asthma"
)
),
"asthma"
))
Atrial fibrillation and flutter
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("atrial flutter"),
"atrial fibrillation and flutter"
))
Atopic dermatitis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("recalcitrant atopic dermatitis"),
"atopic dermatitis"
))
Background retinopathy and retinal vascular changes
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("macular telangiectasia type 2"
)
),
"background retinopathy and retinal vascular changes"
))
Bacterial infection
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"bacterial infection"
)
),
"bacterial infection nos"
))
Benign mammary dysplasia
# if `DISEASE/TRAIT contains Benign mammary dysplasia`, then change abnormality of the breast to benign mammary dysplasia
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Benign mammary dysplasia",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("abnormality of the breast"),
"benign mammary dysplasia"
),
collected_all_disease_terms
)
)
Bipolar disorder
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(
c("bipolar ii disorder",
"bipolar i disorder"
)
),
"bipolar disorder"
))
Bronchopneumonia and lung abscess
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"bronchopneumonia, lung abscess"
)
),
"bronchopneumonia and lung abscess"
))
Blindness and low vision
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"blindness",
"progressive visual loss",
"visual loss"
)
),
"blindness and low vision"
))
# Disorders of optic nerve and visual pathways
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"visual pathway disorder",
"optic nerve disorder"
)
),
"disorders of optic nerve and visual pathways"
))
# visuospatial impairment
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"visuospatial impairment"
)
),
"other and unspecified symptoms and signs involving cognitive functions and awareness"
))
Cafe-au-lait spot
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("cafe-au-lait spot"),
"café au lait spots"
))
Cancer of eye
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"ocular melanoma")
),
"cancer of eye"
))
Candidiasis of vulva and vagina
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"vaginal yeast infection")
),
"candidiasis of vulva and vagina"
))
Carbuncle and furuncle
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"carbuncle", "furuncle")
),
"carbuncle and furuncle"
))
Cardiac arrhythmia
arrhythmia_terms <-
c("ventricular arrhythmia",
"torsades de pointes"
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(arrhythmia_terms),
"cardiac arrhythmia"
))
Cardiomyopathy
cardiomyopathy_terms <- c("nonischemic cardiomyopathy")
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(cardiomyopathy_terms),
"cardiomyopathy"
)
)
Celiac disease
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern("refractory celiac disease"),
"celiac disease"
)
)
Central and perpheral ertigo
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("central nervous system origin vertigo"),
"central origin vertigo"
))
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("peripheral vertigo"),
"peripheral or central vertigo"
))
Cerebral atherosclerosis
# if Brain vascular atherosclerosis in DISEASE/TRAIT, then change vascular brain injury to cerebral atherosclerosis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Brain vascular atherosclerosis",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("vascular brain injury"),
"cerebral atherosclerosis"
),
collected_all_disease_terms
)
)
Cerebrovascular disease
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Vascular brain injury",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"vascular brain injury"
)
),
"cerebrovascular disease"
),
collected_all_disease_terms)
)
Congenital anomalies of intestine
# anorectal malformation to congenital anomalies of intestine
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("anorectal malformation"),
"congenital anomalies of intestine"
)
)
Cerebral infarction
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Ischemic stroke \\(cardioembolic\\)",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"cardiac embolism"
)),
"cardioembolic stroke"
),
collected_all_disease_terms
)
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"mri defined brain infarct",
"cardioembolic stroke")
),
"cerebral infarction"
))
Cervical cancer, dysplasia -> cervical cancer, cervical
dysplasia
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("cervical cancer, dysplasia"),
"cervical cancer, cervical dysplasia"
))
Chromosomal anomalies
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"22q11.2 deletion syndrome",
"abnormality of chromosome segregation",
"fragile x syndrome")
),
"chromosomal anomalies"
))
Cholangitis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("sclerosing cholangitis"),
"cholangitis"
))
Chronic kidney disease
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("stage 5 chronic kidney disease"),
"chronic kidney disease"
))
Chronic non-alcoholic pancreatitis
# if Non-alcoholic chronic pancreatitis in `DISEASE/TRAIT`,
# then non-alcoholic pancreatitis to chronic pancreatitis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Non-alcoholic chronic pancreatitis",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("non-alcoholic pancreatitis"),
"chronic pancreatitis"
),
collected_all_disease_terms
)
)
Chronic pain
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"chronic widespread pain",
"multisite chronic pain",
"chronic musculoskeletal pain",
"chronic pain syndrome")
),
"chronic pain"
))
Chronic pharyngitis, nasopharyngitis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("chronic pharyngitis, nasopharyngitis")
),
"chronic pharyngitis, chronic nasopharyngitis"
))
Chronic rhinosinusitis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("chronic rhinosinusitis with nasal polyps"),
"chronic rhinosinusitis"
))
Chronic sinusitis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("chronic sinus infection"),
"chronic sinusitis"
))
Crohn’s Disease
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("perianal crohns disease"),
"crohns disease"
))
Cluster headache syndrome
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("cluster headache"),
"cluster headache syndrome"
))
Circumscribed brain atrophy
brain_atropy <- c("frontotemporal dementia",
"grn-related frontotemporal lobar degeneration with tdp43 inclusions",
"pick disease")
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(brain_atropy),
"circumscribed brain atrophy"
))
Congenital heart disease/s
congenital_heart_disease_terms <- c(
"heart septal defect",
"atrial heart septal defect",
"congenital left-sided heart lesions",
"congenital right-sided heart lesions",
"congenital anomaly of the great arteries", # equiv = "Congenital malformation of great arteries, unspecified"
# malformation of cardiac septum,
"abnormal cardiac septum morphology",
"atrioventricular canal defect",
"ventricular outflow obstruction"
)
url <- "http://www.ebi.ac.uk/ols4/api/ontologies/efo/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0005207/descendants"
congenital_heart_disease_terms <- c(congenital_heart_disease_terms,
get_descendants(url)
) |>
unique()
[1] "Number of terms collected:"
[1] 0
[1] "\n Some example terms"
[1] NA NA NA NA NA
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(congenital_heart_disease_terms),
"congenital heart disease"
)
)
# if DISEASE/TRAIT contains Congenital heart disease
# then replace abnormal cardiovascular system morphology with congenital heart disease
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Congenital heart disease",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("abnormal cardiovascular system morphology"),
"congenital heart disease"
),
collected_all_disease_terms
)
)
url <- "http://www.ebi.ac.uk/ols4/api/ontologies/mondo/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FMONDO_0024239/descendants"
more_congenital_heart_disease_terms <- get_descendants(url)
[1] "Number of terms collected:"
[1] 232
[1] "\n Some example terms"
[1] "double outlet right ventricle with subaortic or doubly committed ventricular septal defect with pulmonary stenosis"
[2] "double outlet right ventricle with atrioventricular septal defect, pulmonary stenosis, heterotaxy"
[3] "gata6-related congenital heart disease with or without pancreatic agenesis or neonatal diabetes"
[4] "double outlet right ventricle with subaortic or doubly committed ventricular septal defect"
[5] "pulmonary valve agenesis-ventricular septal defect-persistent ductus arteriosus syndrome"
congenital_heart_disease_terms <- c(congenital_heart_disease_terms,
more_congenital_heart_disease_terms
) |>
unique() |>
str_length_sort()
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(congenital_heart_disease_terms),
"congenital anomaly of cardiovascular system"
)
)
Cardiac congenital anomalies
cardiac_congenital_anomalies_terms <- c(
"bicuspid aortic valve"
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(cardiac_congenital_anomalies_terms),
"cardiac congenital anomalies"
)
)
Congenital hypertrophic pyloric stenosis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("infantile hypertrophic pyloric stenosis"),
"congenital hypertrophic pyloric stenosis"
))
Congenital hypothyroidism
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("congenital hypothyroidism due to developmental anomaly"),
"congenital hypothyroidism"
))
Congestive heart failure (CHF) NOS
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"diastolic heart failure",
"systolic heart failure")
),
"congestive heart failure \\(chf\\) nos"
))
Coronary artery aneurysm and dissection
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"coronary aneurysm",
"coronary artery dissection")
),
"coronary artery aneurysm and dissection"
))
# Aortic aneurysm
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"thoracic aortic aneurysm")
),
"aortic aneurysm"
))
Creutzfeldt jacob disease
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(
c("sporadic creutzfeld jacob disease",
"creutzfeldt jacob disease",
"creutzfeldt-jacob disease")
),
"creutzfeldt-jakob disease"
))
Cryoglobulinemia
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("cryoglobulinemia"),
"cryoglobulinaemia"
))
Cystic fibrosis with intestinal manifestations
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("cystic fibrosis associated meconium ileus"),
"cystic fibrosis with intestinal manifestations"
))
Degeneration of macula and posterior pole
macular <- c("macular degeneration",
"atrophic macular degeneration",
"retinal drusen"
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(macular),
"degeneration of macula and posterior pole"
))
Dermatomyositis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("clinically amyopathic dermatomyositis"),
"dermatomyositis"
))
Dental caries
dental_caries_terms <- c("pit and fissure surface dental caries",
"smooth surface dental caries",
"primary dental caries",
"enamel caries",
"permanent dental caries"
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(dental_caries_terms),
"dental caries"
)
)
Depressive episode
depress_epi <- c("depressive",
"depression",
"depressive disorder"
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(depress_epi),
"depressive episode"
))
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(depress_epi),
"depressive episode"
))
Dilated cardiomyopathy
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("idiopathic dilated cardiomyopathy"),
"dilated cardiomyopathy"
))
Disturbances of sensation of smell and taste
terms <- c("ageusia",
"abnormality of the sense of smell")
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(terms),
"disturbances of sensation of smell and taste"
)
)
Disorders of tooth development
tooth_dev_terms <- c("dental enamel hypoplasia",
"tooth agenesis",
"molar-incisor hypomineralization"
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(tooth_dev_terms),
"disorders of tooth development"
)
)
Disorders of refraction and accommodation
refractive_terms <- c("hyperopia",
"refractive error"
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(refractive_terms),
"disorders of refraction and accommodation"
)
)
Diseases of white blood cells
wbc_terms <- c("leukopenia")
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(wbc_terms),
"diseases of white blood cells"
)
)
Drug allergy
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("beta-lactam allergy"),
"drug allergy"
))
Eczema
# if DISEASE/STUDY contains eczema, change eczematoid dermatitis to eczema
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("eczema",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("eczematoid dermatitis"),
"eczema"
),
collected_all_disease_terms
)
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("hand eczema"),
"eczema"
)
)
Essential hypertension
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(
c(
"early onset hypertension",
"treatment-resistant hypertension")),
"essential hypertension"
))
Exstrophy of urinary bladder
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("bladder exstrophy"),
"exstrophy of urinary bladder"
))
Febrile seizures
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"mmr-related febrile seizures",
"febrile seizure")
),
"febrile convulsions"
))
Food allergy
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(
c("peanut allergy",
"milk allergy",
"egg allergy",
"wheat allergic reaction"
)),
"food allergy"
))
Fuchs endothelial corneal dystrophy
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("fuchs endothelial dystrophy"),
"fuchs endothelial corneal dystrophy"
))
Gingival and periodontal diseases
ginival_and_periodontal_terms <- c("periodontal pocket",
"periodontal disorder",
"gingival disease",
"gingival bleeding"
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(ginival_and_periodontal_terms),
"gingival and periodontal diseases"
)
)
Glaucoma
url <- "http://www.ebi.ac.uk/ols4/api/ontologies/efo/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FMONDO_0005041/descendants"
glaucoma_terms <- get_descendants(url)
[1] "Number of terms collected:"
[1] 19
[1] "\n Some example terms"
[1] "cyp1b1-related glaucoma with or without anterior segment dysgenesis"
[2] "glaucoma secondary to spherophakia/ectopia lentis and megalocornea"
[3] "hereditary glaucoma, primary closed-angle"
[4] "primary angle-closure glaucoma"
[5] "secondary dysgenetic glaucoma"
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(glaucoma_terms),
"glaucoma"
))
Graft vs host disease
graft_vs_host_terms <- c("chronic graft versus host disease",
"chronic graft vs. host disease",
"acute graft versus host disease",
"acute graft vs. host disease"
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(graft_vs_host_terms),
"graft versus host disease"
))
Hearing loss
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("age-related hearing impairment"),
"presbycusis"
))
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"deafness",
"noise-induced hearing loss")
),
"hearing loss"
))
Hemiplegia
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("hemiparesis")),
"hemiplegia"
))
Hepatic steatosis
# if DISEASE/TRAIT contains hepatic steatosis in non-alcoholic fatty liver disease
# replace hepatic steatosis with nonalcoholic steatohepatitis
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("hepatic steatosis in non-alcoholic fatty liver disease",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("hepatic steatosis"),
"nonalcoholic steatohepatitis"
),
collected_all_disease_terms
)
)
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("non-alcoholic steatohepatitis"),
"nonalcoholic steatohepatitis"
)
)
Hereditary hemochromatosis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("hereditary hemochromatosis type 1"),
"hereditary hemochromatosis"
))
Hordeolum and other deep inflammation of eyelid
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("hordeolum"),
"hordeolum and other deep inflammation of eyelid"
))
Hypercholesterolemia
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"familial hypercholesterolemia"
)),
"hypercholesterolemia"
))
Hyperlipidemia
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"familial hyperlipidemia"
)),
"hyperlipidemia"
))
HIV disease resulting in encephalopathy
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c(
"aids dementia",
"hiv-associated neurocognitive disorder")
),
"hiv disease resulting in encephalopathy"
))
Intracranial artery stenosis
# "arterial stenosis" -> "Intracranial artery stenosis"
# where DISEASE/TRAIT contains "Intracranial artery stenosis"
# replace "arterial stenosis" with "intracranial artery stenosis"
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Intracranial artery stenosis",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
pattern = "arterial stenosis",
replacement = "intracranial artery stenosis"
),
collected_all_disease_terms
)
)
Inherited retinal dystrophy
url <- "http://www.ebi.ac.uk/ols4/api/ontologies/mondo/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FMONDO_0019118/descendants"
inherited_retinal_dystrophy_terms <- get_descendants(url)
[1] "Number of terms collected:"
[1] 350
[1] "\n Some example terms"
[1] "spondyloepiphyseal dysplasia, sensorineural hearing loss, impaired intellectual development, and leber congenital amaurosis"
[2] "x-linked intellectual disability-limb spasticity-retinal dystrophy-diabetes insipidus syndrome"
[3] "microcephaly with or without chorioretinopathy, lymphedema, or intellectual disability"
[4] "retinal vasculopathy with cerebral leukoencephalopathy and systemic manifestations"
[5] "retinal dystrophy with inner retinal dysfunction and ganglion cell anomalies"
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(inherited_retinal_dystrophy_terms),
"hereditary retinal dystrophy"
))
Intentional self-harm by unspecified means
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("self-injurious behavior",
"self-injurious ideation")),
"intentional self-harm by unspecified means"
))
Infertility (male)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(
c("azoospermia",
"sertoli cell-only syndrome")
),
"male infertility"
) )
Induratio penis plastica
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(
c("peyronie disease")
),
"induratio penis plastica"
) )
Intracerebral hemorrhage
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(
c("non-lobar intracerebral hemorrhage",
"lobar intracerebral hemorrhage")
),
"intracerebral hemorrhage"
) )
Idiopathic generalized epilepsy
url <- "http://www.ebi.ac.uk/ols4/api/ontologies/snomed/terms/http%253A%252F%252Fsnomed.info%252Fid%252F36803009/descendants"
idiopathic_generalized_epilepsy_terms <- get_descendants(url)
[1] "Number of terms collected:"
[1] 4
[1] "\n Some example terms"
[1] "epilepsy with generalized tonic-clonic seizures alone (disorder)"
[2] "juvenile myoclonic epilepsy"
[3] "childhood absence epilepsy"
[4] "juvenile absence epilepsy"
[5] NA
idiopathic_generalized_epilepsy_terms = stringr::str_remove_all(
idiopathic_generalized_epilepsy_terms,
" \\(disorder\\)$"
)
idiopathic_generalized_epilepsy_terms = c("epilepsy with generalized tonic-clonic seizures",
idiopathic_generalized_epilepsy_terms
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(idiopathic_generalized_epilepsy_terms),
"generalized idiopathic epilepsy and epileptic syndromes"
))
Idiopathic thrombocytopenic purpura
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("autoimmune thrombocytopenic purpura"),
"idiopathic thrombocytopenic purpura"
))
Juvenile idiopathic arthritis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("rheumatoid factor-negative juvenile idiopathic arthritis"),
"juvenile idiopathic arthritis"
))
Keratoconjunctivitis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("keratoconjunctivitis sicca"),
"keratoconjunctivitis"
))
Learning disorder
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("dyslexia",
"mathematics disorder",
"disorder of written expression"
)
),
"learning disorder"
))
Lewy body dementia
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("lewy body attribute"),
"lewy body dementia"
))
Migraine
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(
c("migraine with aura",
"migraine without aura",
"migraine disorder"
)
),
"migraine"
))
Multiple sclerosis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("relapsing-remitting multiple sclerosis"),
"multiple sclerosis"
))
Myasthenia gravis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("late-onset myasthenia gravis"),
"myasthenia gravis"
))
Narcolepsy-cataplexy syndrome -> Narcolepsy and cataplexy
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("narcolepsy-cataplexy syndrome"),
"narcolepsy and cataplexy"
))
Nephrolithiasis
nephro_terms <- c("uric acid nephrolithiasis",
"calcium phosphate nephrolithiasis",
"calcium oxalate nephrolithiasis",
"struvite nephrolithiasis")
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(nephro_terms),
"nephrolithiasis"
)
)
Nephritis and nephropathy with pathological lesion
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("acute tubulointerstitial nephritis",
"iga glomerulonephritis",
"membranous glomerulonephritis",
"lupus nephritis")
),
"nephritis and nephropathy with pathological lesion"
))
Neurofibromatosis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(
c("neurofibromatosis type 1",
"neurofibromatosis type 2")
),
"neurofibromatosis"
))
Neuromyelitis optica
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(
c("aquaporin-4 antibody positive neuromyelitis optica",
"aquaporin-4 antibody negative neuromyelitis optica",
"aqp4-igg-positive neuromyelitis optica",
"aqp4-igg-negative neuromyelitis optica"
)
),
"neuromyelitis optica"
))
Noninflammatory disorders of vagina
non_inflam_terms <- c("abnormal vaginal discharge itching",
"abnormal vaginal discharge smell",
"vaginal discharge")
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern =
vec_to_grep_pattern(
non_inflam_terms
),
"noninflammatory disorders of vagina"
)
)
Obesity
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern =
vec_to_grep_pattern(
c("morbid obesity",
"metabolically healthy obesity"
)
),
"obesity"
)
)
Obsessive-compulsive disorder
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c
("obsessive-compulsive trait",
"obsessive-compulsive")
),
"obsessive-compulsive disorder"
))
Occlusion of cerebral arteries
# if Brain vascular stenosis in DISEASE/TRAIT, then change vascular brain injury to occlusion of cerebral arteries
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Brain vascular stenosis",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("vascular brain injury"),
"occlusion of cerebral arteries"
),
collected_all_disease_terms
)
)
Opiod dependence
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("heroin dependence",
"opioid use disorder")),
"opioid dependence"
))
Osteonecrosis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("idiopathic osteonecrosis of the femoral head"),
"osteonecrosis"
))
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("osteoradionecrosis"),
"osteonecrosis"
))
Other epilepsy
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(
c("mesial temporal lobe epilepsy with hippocampal sclerosis",
"rolandic epilepsy")
),
"epilepsy"
))
Other and unspecified cirrhosis of liver
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("hepatitis c induced liver cirrhosis",
"biliary liver cirrhosis")
),
"other and unspecified cirrhosis of liver"
))
Other cardiac conduction disorders
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("familial long qt syndrome")
),
"other cardiac conduction disorders"
))
Other cerebral degenerations
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("brain atrophy",
"hippocampal atrophy"
)
),
"other cerebral degenerations"
))
Other chronic nonalcoholic liver disease
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("non-alcoholic fatty liver disease"
)),
"other chronic nonalcoholic liver disease"
))
Other disorders of bone and cartilage
other_bone_cartilage_terms <- c("tietze syndrome"
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(other_bone_cartilage_terms),
"other disorders of bone and cartilage"
)
)
Other disorders of eyelids
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("dermatochalasis",
"filarial elephantiasis"
)
),
"other disorders of eyelids"
))
Other disorders of iris and ciliary body
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("iris disorder"
)
),
"other disorders of iris and ciliary body"
))
Other eating disorders
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("binge eating")
),
"other eating disorders"
))
Other haemoglobinopathies
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("hemoglobin e disease"),
"other haemoglobinopathies"
))
Other paralytic syndromes
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(
c("paraplegia",
"quadriplegia")
),
"other paralytic syndromes"
))
Other specified degenerative diseases of nervous system
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("corticobasal degeneration disorder"
)
),
"other specified degenerative diseases of nervous system"
))
# progressive supranuclear palsy -> Dementia with cerebral degenerations
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("progressive supranuclear palsy"),
"dementia with cerebral degenerations"
))
Other specified inflammatory liver diseases
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("primary biliary cholangitis",
"primary sclerosing cholangitis"
)
),
"non-alcoholic steatohepatitis"
))
Other specified retinal disorders
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("retinal edema"
)),
"other specified retinal disorders"
))
Parkinsons disease
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("young adult-onset parkinsonism"),
"parkinsons disease"
))
Perinatal jaundice
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("neonatal jaundice"),
"perinatal jaundice"
))
Periodontitis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("aggressive periodontitis"),
"periodontitis"
))
Phlebitis and thrombophlebitis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("thrombophlebitis")),
"phlebitis and thrombophlebitis"
))
Phobias
# social anxiety disorder -> social phobias
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("social anxiety disorder"),
"social phobias"
))
# specific phobia -> Specific \\(isolated\\) phobias
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("specific phobia"),
"specific \\(isolated\\) phobias"
))
Pigmentary iris degeneration
# where Pigmentary iris degeneration in DISEASE/TRAIT & pubmed id 39024449
# replace abnormality of the eye with pigmentary iris degeneration
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Pigmentary iris degeneration",
`DISEASE/TRAIT`,
ignore.case = TRUE) & PUBMED_ID == "39024449",
stringr::str_replace_all(collected_all_disease_terms,
pattern = "abnormality of the eye",
replacement = "pigmentary iris degeneration"
),
collected_all_disease_terms
)
)
Precocious puberty
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("central precocious puberty"),
"precocious puberty"
))
Premature menopause and other ovarian failure
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("premature menopause"),
"premature menopause and other ovarian failure"
))
Primary hyperaldosteronism
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("primary aldosteronism"),
"primary hyperaldosteronism"
))
Primary ovarian failure
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("primary ovarian insufficiency"),
"primary ovarian failure"
))
Primary thrombophilia
# if DISEASE/TRAIT contains PheCode 286.8
# then replce thrombophilia with primary thrombophilia
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("PheCode 286.8",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("thrombophilia"),
"primary thrombophilia"
),
collected_all_disease_terms
)
)
Proteinuria
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("albuminuria",
"moderate albuminuria")
),
"proteinuria"
))
Prurigo
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("prurigo"),
"other prurigo"
))
Psoriasis
psoriasis_terms <- c("cutaneous psoriasis")
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(psoriasis_terms),
"psoriasis")
)
Psychosis (pyschotic, pyschotic symptoms)
psychosis_terms <- c("psychotic",
"psychotic symptoms"
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(psychosis_terms),
"psychosis")
)
Pulmonary fibrosis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("idiopathic pulmonary fibrosis"),
"pulmonary fibrosis"
))
Rash, Petechiae
# for pubmed id: 37469131
# and DISEASE/TRAIT contains 'rush' (a tyop of rash)
# replace purpura with rash, petechiae
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(PUBMED_ID == 37469131 & grepl("rush", `DISEASE/TRAIT`, ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("purpura"),
"rash, petechiae"
),
collected_all_disease_terms
)
)
Rash and other nonspecific skin eruption
rash_terms <- c(
"maculopapular eruption"
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(rash_terms),
"rash and other nonspecific skin eruption"
)
)
Retinoschisis and retinoschisis and retinal cysts
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("retinoschisis"),
"retinoschisis and retinal cysts"
))
Rheumatoid arthritis
ra_terms <- c("acpa-positive rheumatoid arthritis",
"acpa-negative rheumatoid arthritis",
"adult-onset stills disease")
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(ra_terms),
"rheumatoid arthritis"
)
)
Rhinitis
rhinitis_terms <- c("non-allergic rhinitis")
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(rhinitis_terms),
"rhinitis"
)
)
Sciatica
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("ldh-related sciatica")
),
"sciatica"
))
Schizoaffective disorder
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("schizoaffective disorder-bipolar type"),
"schizoaffective disorder")
)
Schizophrenia
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("treatment refractory schizophrenia"),
"schizophrenia")
)
Scoliosis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("adolescent idiopathic scoliosis"),
"scoliosis")
)
Separation of retinal layers
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("central serous retinopathy",
"chronic central serous retinopathy")
),
"separation of retinal layers"
))
Sleep apnea
sleep_apnea_terms <- c("sleep apnea during non-rem sleep",
"sleep apnea during rem sleep",
"obstructive sleep apnea")
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(sleep_apnea_terms),
"sleep apnea")
)
Sleep disorders
sleep_disorder_terms <- c("sleepiness",
"somnambulism",
"rem sleep behavior disorder",
"periodic limb movement disorder",
"bruxism"
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(sleep_disorder_terms),
"sleep disorders"
)
)
Speech and language disorder
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("specific language impairment",
"language impairment",
"social communication impairment"
)
),
"speech and language disorder"
))
# if DISEASE/TRAIT contains Developmental stuttering
# then replace stuttering with speech and language disorder
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Developmental stuttering",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("stuttering"),
"speech and language disorder"
),
collected_all_disease_terms
)
)
Staphylococcus infections
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(
c("staphylococcus aureus infection",
"skin and soft tissue staphylococcus aureus infection",
"methicillin-resistant staphylococcus aureus infection")),
"staphylococcus infections"
))
Strabismus
url <- "http://www.ebi.ac.uk/ols4/api/ontologies/doid/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FDOID_540/descendants"
strabismus_terms <- get_descendants(url)
[1] "Number of terms collected:"
[1] 26
[1] "\n Some example terms"
[1] "abnormal retinal correspondence" "brown's tendon sheath syndrome"
[3] "internuclear ophthalmoplegia" "duane retraction syndrome 3"
[5] "duane retraction syndrome 2"
strabismus_terms = c("non-accomodative esotropia",
strabismus_terms)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(strabismus_terms),
"strabismus"
))
Stroke
other_nonspec_stroke <- c("large artery stroke",
"small vessel stroke",
"stroke outcome",
"stroke disorder"
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(other_nonspec_stroke),
"stroke"
))
Stuttering, tics -> Tics and stuttering
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("PheCode 313.2",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("stuttering, tics")),
"tics and stuttering"
),
collected_all_disease_terms
)
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("PheCode 333.3",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(c("stuttering, tics")),
"tics and choreas"
),
collected_all_disease_terms
))
Systemic sclerosis
terms <- c("diffuse scleroderma",
"limited scleroderma",
"anti-centromere-antibody-positive systemic scleroderma",
"anti-topoisomerase-i-antibody-positive systemic scleroderma")
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(terms),
"systemic sclerosis"
))
Tinea
# if DISEASE/TRAIT contains Ringworm, replace tinea with tinea corporis
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Ringworm",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("tinea"),
"tinea corporis"
),
collected_all_disease_terms
)
)
Thyrotoxicosis with or without goiter
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("hyperthyroidism"),
"thyrotoxicosis with or without goiter"
))
Treatment resistant (etc.)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_remove_all(collected_all_disease_terms,
"^treatment-resistant |^treatment resistant |^treatment-resistant "
))
Treatment resistant depression
# if DISEASE/TRAIT contains Treatment resistant depression
# then replace depression with treatment resistant depression
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Treatment resistant depression",
`DISEASE/TRAIT`,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("depression"),
"treatment resistant depression"
),
collected_all_disease_terms
)
)
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("treatment resistant depression",
MAPPED_BACKGROUND_TRAIT,
ignore.case = TRUE),
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("depression"),
"treatment resistant depression"
),
collected_all_disease_terms
)
)
Type 1 diabetes
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("latent autoimmune diabetes in adults"),
"type 1 diabetes mellitus"
))
Type 2 diabetes with a ophthalmic manifestations
type_2_eye_terms <- c("diabetes mellitus type 2 associated cataract",
"diabetic maculopathy, type 2 diabetes mellitus",
"diabetic macular edema, type 2 diabetes mellitus",
"proliferative diabetic retinopathy, type 2 diabetes mellitus",
"macrovascular complications of diabetes, type 2 diabetes mellitus"
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(type_2_eye_terms),
"type 2 diabetes with ophthalmic manifestations"
))
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern(type_2_eye_terms),
"type 2 diabetes with ophthalmic manifestations"
))
# for 30487263, all discovery samples are type 2 diabetes - so
# replace proliferative diabetic retinopathy with type 2 diabetes with ophthalmic manifestations
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(PUBMED_ID == 30487263,
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("proliferative diabetic retinopathy"),
"type 2 diabetes with ophthalmic manifestations"
),
collected_all_disease_terms
)
)
# for pubmed id: 31482010
# all samples are type 2 diabetes
# so replace diabetic retinopathy with type 2 diabetes with ophthalmic manifestations
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(PUBMED_ID == 31482010,
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("proliferative diabetic retinopathy"),
"type 2 diabetes with ophthalmic manifestations"
),
collected_all_disease_terms
)
)
# neuropathic pain, type 2 diabetes mellitus
# change to type 2 diabetes with diabetic neuropathy
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("neuropathic pain, type 2 diabetes mellitus"),
"type 2 diabetes with ophthalmic manifestations"
)
)
Unspecified condition associated with female genital organs and
menstrual cycle
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
ifelse(grepl("Menstruation",
`DISEASE/TRAIT`,
ignore.case = TRUE),
str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern("decreased attention"),
"unspecified condition associated with female genital organs and menstrual cycle"),
collected_all_disease_terms
)
)
Uveitis
uveitis_terms <- c("anterior uveitis",
"iritis",
"vogt-koyanagi-harada disease",
"birdshot chorioretinopathy",
"multifocal choroiditis"
)
gwas_study_info = gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
pattern = vec_to_grep_pattern(uveitis_terms),
"uveitis"
))
Vasculitis
gwas_study_info =
gwas_study_info |>
mutate(collected_all_disease_terms =
stringr::str_replace_all(collected_all_disease_terms,
vec_to_grep_pattern("anti-neutrophil antibody associated vasculitis"),
"vasculitis"
)
)