Skip to content

Instantly share code, notes, and snippets.

@ben-domingue
Created July 20, 2015 22:15
Show Gist options
  • Select an option

  • Save ben-domingue/cb8e8fe7424eb3a70ca3 to your computer and use it in GitHub Desktop.

Select an option

Save ben-domingue/cb8e8fe7424eb3a70ca3 to your computer and use it in GitHub Desktop.
#get genetic risk score
read.table("/hrsshare/alz_context/pgs/alz_nc.profile",header=TRUE)->score
score[,c(2,6)]->score
names(score)<-c("subjectID","polygenic_score")
#rand fat files
load("/hrsshare/v2_hrs_linked.Rdata")
x[,c("subjectID","hhidpn","family","raracem","rahispan")]->ids
ids[ids$raracem=="1.white/caucasian" & ids$rahispan=="0. not hispanic",]->ids
merge(ids,score)->x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment