errors with read.maimages
1
0
Entering edit mode
Ana Conesa ▴ 340
@ana-conesa-2156
Last seen 9.6 years ago
Dear List, I am getting a couple of erros when trying to import gpr files using the read.maimages of Limma RG1<-read.maimages(targets1,source="genepix") Error in sub(pattern, replacement, x, ignore.case, extended, fixed, useBytes) : input string 1 is invalid in this locale In this case I simply cannot load the corresponding gpr files > f<-function(x)as.numeric(x$Flags>-99) > RG2<-read.maimages(targets2,source="genepix",wt.fun=f) Error in gsub(pattern, replacement, x, ignore.case, extended, fixed, useBytes) : input string 1 is invalid in this locale In this case I have problems when trying to read the flags but it will work OK if I skip the wt.fun parameter In all cases I am using gpr files generated in the same project and I am able to read other gpr files from the same platform (but never succeed in getting the flags) I am using R 2.5.1 on a Kubuntu 7.10 machine Any tips on what to do are much appreciated Thanks Ana ------------------------------------------ Ana Conesa, PhD Bioinformatics Department Centro de Investigaci?n Pr?ncipe Felipe Avda. Autopista Saler, 16 46013 Valencia Spain http://bioinfo.cipf.es/aconesa ========================================== CAMDA2007 Conference @ CIPF http://camda.bioinfo.cipf.es
• 962 views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 6 weeks ago
United States
Hi Ana -- It would help to see the results of sessionInfo(), which would include at the top something about the 'locale'. This is likely a font encoding issue, see this earlier thread: https://stat.ethz.ch/pipermail/bioconductor/2007-July/018204.html Here's the relevant snippet (quoting myself) > I now change my system local to be like yours > > Sys.setlocale("LC_ALL", "en_US.UTF-8") > [1] "LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLAT E=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US;LC_PAPER=en_US ;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US;LC_IDENTIF ICATION=C" > and try to read the files > > read.maimages(fname, columns=columns) > Error in readGenericHeader(fullname, columns = columns, sep = sep) : > Specified column headings not found in file > In addition: Warning message: > In grep(a, txt) : input string 1 is invalid in this locale > Ah ha! This seems to be the problem. So set the locale to "en_US" > > Sys.setlocale("LC_ALL", "en_US") > [1] "LC_CTYPE=en_US;LC_NUMERIC=C;LC_TIME=en_US;LC_COLLATE=en_US;LC_M ONETARY=en_US;LC_MESSAGES=en_US;LC_PAPER=en_US;LC_NAME=C;LC_ADDRESS=C; LC_TELEPHONE=C;LC_MEASUREMENT=en_US;LC_IDENTIFICATION=C" > > res <- read.maimages(fname, columns=columns) > Read B12Z0471_A.GPR > Does this work for you? Alternatively here's an interesting solution > that 'just works': (other non-UTF-8 files should also work; once the files are read in it is fine to set the locale back to the original). Please let the list know if this is successful. Developers hoping to smooth this wrinkle over for users might read https://stat.ethz.ch/pipermail/r-devel/2007-September/046793.html Ana Conesa <aconesa at="" cipf.es=""> writes: > Dear List, > > I am getting a couple of erros when trying to import gpr files using > the read.maimages of Limma > > RG1<-read.maimages(targets1,source="genepix") > Error in sub(pattern, replacement, x, ignore.case, extended, fixed, > useBytes) : > input string 1 is invalid in this locale > > In this case I simply cannot load the corresponding gpr files > > > > f<-function(x)as.numeric(x$Flags>-99) > > RG2<-read.maimages(targets2,source="genepix",wt.fun=f) > Error in gsub(pattern, replacement, x, ignore.case, extended, fixed, > useBytes) : > input string 1 is invalid in this locale > > In this case I have problems when trying to read the flags but it will > work OK if I skip the wt.fun parameter > > > > In all cases I am using gpr files generated in the same project and I am > able to read other gpr files from the same platform (but never succeed > in getting the flags) > > > I am using R 2.5.1 on a Kubuntu 7.10 machine > Any tips on what to do are much appreciated > > Thanks > > > Ana > > ------------------------------------------ > Ana Conesa, PhD > Bioinformatics Department > Centro de Investigaci?n Pr?ncipe Felipe > Avda. Autopista Saler, 16 > 46013 Valencia Spain > http://bioinfo.cipf.es/aconesa > ========================================== > CAMDA2007 Conference @ CIPF > http://camda.bioinfo.cipf.es > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M2 B169 Phone: (206) 667-2793
ADD COMMENT

Login before adding your answer.

Traffic: 735 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6