User Tools

Site Tools


keller_and_evans_lab:gscan_db_ga_p

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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("/work/KellerLab/GSCAN/dbGaP/Barretts/PhenoGenotypeFiles/RootStudyConsentSet_phs000869.BEAGESS.v1.p1.c1.GRU-MDS/PhenotypeFiles/phs000869.v1.pht004610.v1.p1.c1.BEAGESS_Subject_Phenotypes.GRU-MDS.txt.gz", header=TRUE, sep="\t", stringsAsFactors=F) beagess_data <- read.table("/work/KellerLab/GSCAN/dbGaP/Barretts/PhenoGenotypeFiles/RootStudyConsentSet_phs000869.BEAGESS.v1.p1.c1.GRU-MDS/PhenotypeFiles/phs000869.v1.pht004610.v1.p1.c1.BEAGESS_Subject_Phenotypes.GRU-MDS.txt.gz", header=TRUE, sep="\t", stringsAsFactors=F)
Line 1177: Line 1182:
  
  
-===== File Paths ===== +===== Phenotypes =====
- +
- +
-**HMB consent phenotypes** +
- +
-/work/KellerLab/GSCAN/dbGaP/JHS/PhenoGenotypeFiles/ChildStudyConsentSet_phs000499.JHS.v3.p1.c3.HMB-IRB/PhenotypeFiles/phs000499.v3.pht003209.v1.p1.c3.J +
-HS_CARe_Subject_Phenotypes.HMB-IRB.txt.gz +
- +
-**NPU consent phenotypes** +
- +
-/work/KellerLab/GSCAN/dbGaP/JHS/PhenoGenotypeFiles/ChildStudyConsentSet_phs000499.JHS.v3.p1.c1.HMB-IRB-NPU/PhenotypeFiles/phs000499.v3.pht003209.v1.p1. +
-c1.JHS_CARe_Subject_Phenotypes.HMB-IRB-NPU.txt.gz +
- +
-**HMB consent genotypes** +
- +
-/work/KellerLab/GSCAN/dbGaP/JHS/PhenoGenotypeFiles/ChildStudyConsentSet_phs000499.JHS.v3.p1.c3.HMB-IRB/GenotypeFiles/phg000103.v1.JHS.genotype-cal +
-ls-matrixfmt.c3.HMB-IRB/JHS_PLINK_illu_GRU.[bed/bim/fam] +
- +
-**NPU consent genotypes**+
  
-/work/KellerLab/GSCAN/dbGaP/JHS/PhenoGenotypeFiles/ChildStudyConsentSet_phs000499.JHS.v3.p1.c1.HMB-IRB-NPU/GenotypeFiles/phg000103.v1.JHS.genotype 
--calls-matrixfmt.c1.HMB-IRB-NPU/JHS_PLINK_illu_NCU.[bed/bim/fam] 
- 
-**Subject Sample Mapping File** 
- 
-/work/KellerLab/GSCAN/dbGaP/JHS/PhenoGenotypeFiles/ChildStudyConsentSet_phs000499.JHS.v3.p1.c3.HMB-IRB/GenotypeFiles/phg000104.v1.JHS.sample-info.M 
-ULTI/JHS_subject_sample_map_8_10_2010.txt 
- 
- 
-===== Phenotypes ===== 
  
  
Line 1232: Line 1209:
 names(covariates) [2] <- "iid" names(covariates) [2] <- "iid"
 names(covariates) [6] <- "age" names(covariates) [6] <- "age"
 +
 +###--------------------###
 +### Smoking initiation ###
 +###--------------------###
 +### 
 +### JHSCare variables are "current_smoker_baseline" and "former_smoking_baseline"
 +###       current_smoker_baseline = Current smoking status at first participant visit
 +###       former_smoker_baseline = Former smoking status at first participant visit
 +###
 +### Response options are
 +###     0 - No
 +###     1 - Yes
 +###
 +### table(si)
 +###
 +###    0    1    x
 +### 1206 537  9
  
 current.smoker <- subset(mapped_geno_pcs, select=c("current_smoker_baseline", "SUBJID")) current.smoker <- subset(mapped_geno_pcs, select=c("current_smoker_baseline", "SUBJID"))
Line 1239: Line 1233:
 for(i in 1:N){ for(i in 1:N){
   if(is.na(current.smoker[i,1]) | is.na(former.smoker[i,1])){   if(is.na(current.smoker[i,1]) | is.na(former.smoker[i,1])){
-     si[i] <- "x" +    si[i] <- "x" 
-   +  
-   else if (current.smoker[i,1]  == 0 & former.smoker[i,1] == 0){ +  else if (current.smoker[i,1]  == 0 & former.smoker[i,1] == 0){ 
-     si[i] <- "1" +    si[i] <- "1" 
-   +  
-   else if (current.smoker[i,1]  == 0 & former.smoker[i,1] == 1){ +  else if (current.smoker[i,1]  == 0 & former.smoker[i,1] == 1){ 
-     si[i] <- 2 ### former smokers are coded as 2 +    si[i] <- 2 ### former smokers are coded as 2 
-   +  
-  else if (current.smoker[i,1]  == 1 & former.smoker[i,1] == 0){ + else if (current.smoker[i,1]  == 1 & former.smoker[i,1] == 0){ 
-     si[i] <- 2 ### current smokers are coded as 2 +    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 "current_smoker_baseline" and "former_smoking_baseline"
 +###       current_smoker_baseline = Current smoking status at first participant visit
 +###       former_smoker_baseline = Former smoking status at first participant visit
 +###
 +### Response options are
 +###     0 - No
 +###     1 - Yes
 +###
 +### table(sc)
 +###
 +###    0    1    x
 +### 1206 537  9
 +
  
 current.smoker <- subset(mapped_geno_pcs, select=c("current_smoker_baseline", "SUBJID")) current.smoker <- subset(mapped_geno_pcs, select=c("current_smoker_baseline", "SUBJID"))
Line 1259: Line 1272:
 for(i in 1:N){ for(i in 1:N){
   if(is.na(current.smoker[i,1]) | is.na(former.smoker[i,1])){   if(is.na(current.smoker[i,1]) | is.na(former.smoker[i,1])){
-     sc[i] <- "x" +    sc[i] <- "x" 
-   +  
-   else if (current.smoker[i,1]  == 0 & former.smoker[i,1] == 0){ +  else if (current.smoker[i,1]  == 0 & former.smoker[i,1] == 0){ 
-     sc[i] <- "x" +    sc[i] <- "x" 
-   +  
-   else if (current.smoker[i,1]  == 0 & former.smoker[i,1] == 1){ +  else if (current.smoker[i,1]  == 0 & former.smoker[i,1] == 1){ 
-     sc[i] <- 1 ### former smokers are coded as 1 +    sc[i] <- 1 ### former smokers are coded as 1 
-   +  
-  else if (current.smoker[i,1]  == 1 & former.smoker[i,1] == 0){ + else if (current.smoker[i,1]  == 1 & former.smoker[i,1] == 0){ 
-     sc[i] <- 2 ### current smokers are coded as 2 +    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] <- "fid" names(phenotypes)[1] <- "fid"
  
-write.table(covariates, "<file path>", row.names=F, quote=F) +write.table(covariates, "AFR.JHS.covariates.ped", row.names=F, quote=F) 
-write.table(phenotypes, "<file path>", row.names=F, quote=F)+write.table(phenotypes, "AFR.JHS.phenotypes.ped", row.names=F, quote=F) 
  
  
keller_and_evans_lab/gscan_db_ga_p.txt · Last modified: 2019/10/31 12:28 by 66.249.87.23