diff --git a/RCleanDscret.R b/RCleanDscret.R index e0b757f..a82735d 100644 --- a/RCleanDscret.R +++ b/RCleanDscret.R @@ -258,7 +258,7 @@ geneIDNam <- paste0("Clean_GPL",gplnum,".txt") %>% .[IDLOCAL] geneIDNam <- genena %>% read_delim(delim="\t",col_names = TRUE, comment = "!", skip = idlocgpl) %>% - dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$",colnames(.))) + dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$|^Gene symbol$",colnames(.))) } else if(IDF == 0){ #No information on this particular GPL file idLOCGPL <- genena %>% @@ -270,7 +270,7 @@ geneIDNam <- paste0("Clean_GPL",gplnum,".txt") %>% cat(file="GPL_ID_LOC.txt",sep = "\t", fill = TRUE, append = TRUE) geneIDNam <- genena %>% read_delim(delim="\t",col_names = TRUE, comment = "!", skip = idLOCGPL) %>% - dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$",colnames(.))) + dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$|^Gene symbol$",colnames(.))) } } else if(fileex == 0){ #We must create a file that we can access for later use @@ -284,12 +284,12 @@ geneIDNam <- paste0("Clean_GPL",gplnum,".txt") %>% write.table(Firstval,file = "GPL_ID_LOC.txt", sep = "\t",row.names = FALSE, col.names = TRUE) geneIDNam <- genena %>% read_delim(delim="\t",col_names = TRUE, comment = "!", skip = idLOCGPL) %>% - dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$",colnames(.))) + dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$|^Gene symbol$",colnames(.))) } } else if(soft == FALSE){ geneIDNam <- genena %>% read_delim(delim="\t",comment = "#")%>% - dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$",colnames(.))) + dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$|^Gene symbol$",colnames(.))) } ##Labeling the gene IDs without names