This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
keller_and_evans_lab:gscan_db_ga_p [2017/01/05 18:29] hannah_young /* Jackson Heart Study */ |
keller_and_evans_lab:gscan_db_ga_p [2017/02/13 16:18] scott /* Phenotypes */ |
||
---|---|---|---|
Line 1021: | Line 1021: | ||
- | == BEAGESS == | ||
- | ===Phenotypes=== | + | ====== BEAGESS ====== |
+ | |||
+ | |||
+ | |||
+ | ===== Phenotypes ===== | ||
+ | |||
beagess_data <- read.table("/ | beagess_data <- read.table("/ | ||
Line 1177: | Line 1182: | ||
- | ===== File Paths ===== | + | ===== Phenotypes |
- | + | ||
- | + | ||
- | **HMB consent phenotypes** | + | |
- | + | ||
- | / | + | |
- | HS_CARe_Subject_Phenotypes.HMB-IRB.txt.gz | + | |
- | + | ||
- | **NPU consent phenotypes** | + | |
- | + | ||
- | / | + | |
- | c1.JHS_CARe_Subject_Phenotypes.HMB-IRB-NPU.txt.gz | + | |
- | + | ||
- | **HMB consent genotypes** | + | |
- | + | ||
- | / | + | |
- | ls-matrixfmt.c3.HMB-IRB/ | + | |
- | + | ||
- | **NPU consent genotypes** | + | |
- | / | ||
- | -calls-matrixfmt.c1.HMB-IRB-NPU/ | ||
- | |||
- | **Subject Sample Mapping File** | ||
- | |||
- | / | ||
- | ULTI/ | ||
- | |||
- | |||
- | ===== Phenotypes ===== | ||
Line 1232: | Line 1209: | ||
names(covariates) [2] <- " | names(covariates) [2] <- " | ||
names(covariates) [6] <- " | names(covariates) [6] <- " | ||
+ | |||
+ | ### | ||
+ | ### Smoking initiation ### | ||
+ | ### | ||
+ | ### | ||
+ | ### JHSCare variables are " | ||
+ | ### | ||
+ | ### | ||
+ | ### | ||
+ | ### Response options are | ||
+ | ### 0 - No | ||
+ | ### 1 - Yes | ||
+ | ### | ||
+ | ### table(si) | ||
+ | ### | ||
+ | ### 0 1 x | ||
+ | ### 1206 537 9 | ||
current.smoker <- subset(mapped_geno_pcs, | current.smoker <- subset(mapped_geno_pcs, | ||
Line 1239: | Line 1233: | ||
for(i in 1:N){ | for(i in 1:N){ | ||
if(is.na(current.smoker[i, | if(is.na(current.smoker[i, | ||
- | si[i] <- " | + | |
- | | + | } |
- | | + | else if (current.smoker[i, |
- | | + | si[i] <- " |
- | | + | } |
- | | + | else if (current.smoker[i, |
- | | + | si[i] <- 2 ### former smokers are coded as 2 |
- | | + | } |
- | else if (current.smoker[i, | + | else if (current.smoker[i, |
- | | + | si[i] <- 2 ### current smokers are coded as 2 |
- | | + | } |
} | } | ||
mapped_geno_pcs_phen <- cbind(si, mapped_geno_pcs) | mapped_geno_pcs_phen <- cbind(si, mapped_geno_pcs) | ||
+ | |||
+ | |||
+ | ### | ||
+ | ### Smoking Cessation ### | ||
+ | ### | ||
+ | ### | ||
+ | ### JHSCare variables are " | ||
+ | ### | ||
+ | ### | ||
+ | ### | ||
+ | ### Response options are | ||
+ | ### 0 - No | ||
+ | ### 1 - Yes | ||
+ | ### | ||
+ | ### table(sc) | ||
+ | ### | ||
+ | ### 0 1 x | ||
+ | ### 1206 537 9 | ||
+ | |||
current.smoker <- subset(mapped_geno_pcs, | current.smoker <- subset(mapped_geno_pcs, | ||
Line 1259: | Line 1272: | ||
for(i in 1:N){ | for(i in 1:N){ | ||
if(is.na(current.smoker[i, | if(is.na(current.smoker[i, | ||
- | sc[i] <- " | + | |
- | | + | } |
- | | + | else if (current.smoker[i, |
- | | + | sc[i] <- " |
- | | + | } |
- | | + | else if (current.smoker[i, |
- | | + | sc[i] <- 1 ### former smokers are coded as 1 |
- | | + | } |
- | else if (current.smoker[i, | + | else if (current.smoker[i, |
- | | + | sc[i] <- 2 ### current smokers are coded as 2 |
- | | + | } |
} | } | ||
phenotypes <- cbind(sc, mapped_geno_pcs_phen) | phenotypes <- cbind(sc, mapped_geno_pcs_phen) | ||
Line 1276: | Line 1289: | ||
names(phenotypes)[1] <- " | names(phenotypes)[1] <- " | ||
- | write.table(covariates, | + | write.table(covariates, |
- | write.table(phenotypes, | + | write.table(phenotypes, |