-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Ana Ines edited this page Apr 24, 2015
·
12 revisions
- Ana Ines Vazquez (anainesvs@gmail.com)
- Molly Bray (mbray@austin.utexas.edu)
An example of the use of this function is as follows:
snpdata<-illu_ped.raw(file='TIGER_genotypes_P1P2_data4.txt', snpc=snp_name, sujc=labid)
Now we save SNP information and and the matrix with SNP counts.
snpInfo<-data.frame(snp=snpid, mafSnp=mafA, notCountSnp=mafB)
write.table(snpInfo, row.names=FALSE, file='snpInfo.csv', sep=',')
aimsPC2<-as.data.frame(aimsPC)
aimsPC3<-cbind(data.frame(study_id=row.names(aimsPC), labid=row.names(aimsPC)),aimsPC)
###
#get key ids
tmp<-read.table('../Data/TIGER_HRPAS_derived_attendance_VazquezV2.csv', sep=',', header=T, stringsAsFactors=FALSE)
key<-tmp[,2:3]
tmp<-is.na(key$labid)|is.na(key$id_number)|key$labid==2390
key<-key[!tmp,]
labid<-aimsPC3[,2]<-as.character(aimsPC3[,2])
aimsPC3[,1]<-rep(NA, times=nrow(aimsPC3))
for(i in 1:length(labid)){
ckey<-which(key$labid == labid[i])
if(length(ckey)>0) aimsPC3[i,1]<-key$id_number[ckey]
}
write.table(aimsPC3, file='snpsCount.csv', sep=',', row.names=FALSE, quote=FALSE)
Now that we have read the new markers and counted incidence, we will merge this matrix into the larger platform.