From ad997df65d620b6b7a80e63cb4829354446bf39f Mon Sep 17 00:00:00 2001 From: Eduardo Andres-Leon Date: Mon, 18 Dec 2017 14:27:53 +0100 Subject: [PATCH] Avoiding check.names while reading data. Thanks to Guillaume Noell for the hint --- lib/CbBio/RNASeq/R-Scripts/DE_EdgeR.R | 4 +++- lib/CbBio/RNASeq/R-Scripts/DE_noiseq.R | 3 ++- lib/CbBio/RNASeq/R-Scripts/QC_EdgeR.R | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/CbBio/RNASeq/R-Scripts/DE_EdgeR.R b/lib/CbBio/RNASeq/R-Scripts/DE_EdgeR.R index 3b8c3dc..5897267 100644 --- a/lib/CbBio/RNASeq/R-Scripts/DE_EdgeR.R +++ b/lib/CbBio/RNASeq/R-Scripts/DE_EdgeR.R @@ -98,7 +98,9 @@ DE_EdgeR<-function(projectdir,dir,file,targetfile,label,contrastfile, filter, cp #Importing the data workingDir<-projectdir setwd(workingDir) - data <- read.table(file, header=TRUE, sep="\t") + + #added check.names=F suggested by Guillaume Noell + data <- read.table(file, header=TRUE, sep="\t",check.names=F) data<-data[,sort(colnames(data))] diff --git a/lib/CbBio/RNASeq/R-Scripts/DE_noiseq.R b/lib/CbBio/RNASeq/R-Scripts/DE_noiseq.R index 2a00c8a..db0ae1e 100644 --- a/lib/CbBio/RNASeq/R-Scripts/DE_noiseq.R +++ b/lib/CbBio/RNASeq/R-Scripts/DE_noiseq.R @@ -85,7 +85,8 @@ DE_noiseq<-function(projectdir,dir,file,targetsfile,label,filter,contrastfile,le #Importing the data workingDir<-dir setwd(workingDir) - data<-read.table(file=file, sep="\t", header=T) + #added check.names=F suggested by Guillaume Noell + data<-read.table(file=file, sep="\t", header=T,check.names=F) #Checking any additional data provided to use in data exploration if(!missing(lenghtfile)){ mylength<-read.table(file=lenghtfile, sep="\t", header=T) diff --git a/lib/CbBio/RNASeq/R-Scripts/QC_EdgeR.R b/lib/CbBio/RNASeq/R-Scripts/QC_EdgeR.R index d973a42..2e6ff6f 100644 --- a/lib/CbBio/RNASeq/R-Scripts/QC_EdgeR.R +++ b/lib/CbBio/RNASeq/R-Scripts/QC_EdgeR.R @@ -98,7 +98,8 @@ QC_EdgeR<-function(projectdir,dir,file,targetfile,label,filter, cpmvalue=1, rept workingDir<-dir setwd(workingDir) filepath<-file.path(workingDir,file) - data <- read.table(filepath, header=TRUE, sep="\t") + #added check.names=F suggested by Guillaume Noell + data <- read.table(filepath, header=TRUE, sep="\t",check.names=F) data<-data[,sort(colnames(data))]