From 501231d3ebcc148491cc9f407215c4a8d1369b35 Mon Sep 17 00:00:00 2001 From: Efrain Gonzalez Date: Thu, 5 Apr 2018 15:10:35 -0400 Subject: [PATCH] Added |^UCSC_RefGene_Name$ to list of potential names in GPL --- RCleanDscret.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RCleanDscret.R b/RCleanDscret.R index 3f8ab7f..639cb56 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*$|^Gene symbol$|^GENE_SYMBOL$",colnames(.))) + dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$|^Gene symbol$|^GENE_SYMBOL$|^UCSC_RefGene_Name$",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*$|^Gene symbol$|^GENE_SYMBOL$",colnames(.))) + dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$|^Gene symbol$|^GENE_SYMBOL$|^UCSC_RefGene_Name$",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*$|^Gene symbol$|^GENE_SYMBOL$",colnames(.))) + dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$|^Gene symbol$|^GENE_SYMBOL$|^UCSC_RefGene_Name$",colnames(.))) } } else if(soft == FALSE){ geneIDNam <- genena %>% read_delim(delim="\t",comment = "#")%>% - dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$|^Gene symbol$|^GENE_SYMBOL$",colnames(.))) + dplyr::select(.,ID,grep("Symbol|^ORF\\s*$|^gene_assignment\\s*$|^Gene symbol$|^GENE_SYMBOL$|^UCSC_RefGene_Name$",colnames(.))) } ##Labeling the gene IDs without names -- 2.29.0