diff --git a/RAutoClDs.R b/RAutoClDs.R index e6866d7..8d051ab 100644 --- a/RAutoClDs.R +++ b/RAutoClDs.R @@ -235,7 +235,7 @@ THEFT <- function(){ read_delim(delim="\t",col_names = c("ID","Symbol"), comment = "!") } - if(clfileex == 0){ + else if(clfileex == 0){ ##Lets Create a clean version ##Gene ID to Gene Name @@ -259,7 +259,7 @@ THEFT <- function(){ read_delim(delim="\t",col_names = TRUE, comment = "!", skip = idlocgpl) %>% dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$",colnames(.))) } - if(IDF == 0){ + else if(IDF == 0){ #No information on this particular GPL file idLOCGPL <- genena %>% read_delim(delim="\t",col_names = FALSE, comment = "!", n_max = 1000) %>% @@ -273,7 +273,7 @@ THEFT <- function(){ dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$",colnames(.))) } } - if(fileex == 0){ + else if(fileex == 0){ #We must create a file that we can access for later use idLOCGPL <- genena %>% read_delim(delim="\t",col_names = FALSE, comment = "!", n_max = 1000) %>% @@ -288,7 +288,7 @@ THEFT <- function(){ dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$",colnames(.))) } } - if(soft == FALSE){ + else if(soft == FALSE){ geneIDNam <- genena %>% read_delim(delim="\t",comment = "#")%>% dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$",colnames(.))) @@ -391,7 +391,7 @@ THEFT <- function(){ NuRDATN[,j] <- RAWDATNUM[,which(RAWDATID==rownames(tabRDATID)[j])] } ##Averaging duplicates and putting them in their new homes - if(tabRDATID[j] > 1){ + else if(tabRDATID[j] > 1){ NuRDATN[,j] <- rowMeans(RAWDATNUM[,which(RAWDATID==rownames(tabRDATID)[j])],na.rm = TRUE) } j <- j + 1 @@ -461,7 +461,7 @@ THEFT <- function(){ } #CHOOSE A DATA FILE TO CLEAN OR SEVERAL DATA FILES TO CLEAN - if(numDAT == 2){ + else if(numDAT == 2){ #All the files you want to analyze ANDIS <- select.list(choices = list.files()[GSEfileloc],multiple = TRUE, title = "Choose the file/files you want to analyze:") if(length(ANDIS) == 0){ @@ -524,7 +524,7 @@ THEFT <- function(){ read_delim(delim="\t",col_names = c("ID","Symbol"), comment = "!") } - if(clfileex == 0){ + else if(clfileex == 0){ ##Lets Create a clean version ##Gene ID to Gene Name @@ -548,7 +548,7 @@ THEFT <- function(){ read_delim(delim="\t",col_names = TRUE, comment = "!", skip = idlocgpl) %>% dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$",colnames(.))) } - if(IDF == 0){ + else if(IDF == 0){ #No information on this particular GPL file idLOCGPL <- genena %>% read_delim(delim="\t",col_names = FALSE, comment = "!", n_max = 1000) %>% @@ -562,7 +562,7 @@ THEFT <- function(){ dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$",colnames(.))) } } - if(fileex == 0){ + else if(fileex == 0){ #We must create a file that we can access for later use idLOCGPL <- genena %>% read_delim(delim="\t",col_names = FALSE, comment = "!", n_max = 1000) %>% @@ -577,7 +577,7 @@ THEFT <- function(){ dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$",colnames(.))) } } - if(soft == FALSE){ + else if(soft == FALSE){ geneIDNam <- genena %>% read_delim(delim="\t",comment = "#")%>% dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$",colnames(.))) @@ -680,7 +680,7 @@ THEFT <- function(){ NuRDATN[,j] <- RAWDATNUM[,which(RAWDATID==rownames(tabRDATID)[j])] } ##Averaging duplicates and putting them in their new homes - if(tabRDATID[j] > 1){ + else if(tabRDATID[j] > 1){ NuRDATN[,j] <- rowMeans(RAWDATNUM[,which(RAWDATID==rownames(tabRDATID)[j])],na.rm = TRUE) } j <- j + 1