diff --git a/RCleanDscret.R b/RCleanDscret.R index 8f5efe2..3efab06 100644 --- a/RCleanDscret.R +++ b/RCleanDscret.R @@ -324,7 +324,7 @@ write.table(t(Fullalzdwr), file = nfnaex, sep = "\t") rawword <- t(ALZWORDF) ##where is ID_REF located -hereim <- grep("ID_REF",rawword[,1]) +hereim <- grep("ID_REF",rownames(rawword)) ##Subject Names GSM... subjnam <- rawword[hereim,] @@ -438,11 +438,11 @@ for(k in 2:dim(dialzdat)[2]-1){ Dscrtalzdw <- bind_rows(RAWWORD,dialzdat) #Produces Discrete file -nfnaex <- strsplit(rawdat,"[\\|/]") %>% +nfnaex2 <- strsplit(alz,"[\\|/]") %>% .[[1]] %>% .[length(.)] %>% gsub("\\D","",.) %>% c("GSE",.,"dscrt.txt") %>% paste(collapse = "") -write.table(Dscrtalzdw, file = nfnaex, sep = "\t",col.names = TRUE,row.names = FALSE) +write.table(Dscrtalzdw, file = nfnaex2, sep = "\t",col.names = TRUE,row.names = FALSE)