DNAString ("GC") -- error in nchar?
4
0
Entering edit mode
Paul Shannon ★ 1.1k
@paul-shannon-578
Last seen 10.3 years ago
The Biostrings vignette has some code like this: > library(Biostrings) > b <- BString("I am a BString object") > d <- DNAString("TTGAAAA-CTC-N") With the first, I get this error: Error in BString("I am a BString object") : Error in nchar(src) : 2 arguments passed to .Internal(nchar) which requires 3 With the second, I get: Error in DNAString("TTGAAAA-CTC-N") : Error in nchar(src) : 2 arguments passed to .Internal(nchar) which requires 3 I'm running bioc 2.6; is that my problem? sessionInfo () R version 2.6.0 alpha (2007-09-12 r42830) i386-apple-darwin8.10.1 locale: C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] RUnit_0.4.17 Biostrings_2.5.19 loaded via a namespace (and not attached): [1] tools_2.6.0 Thanks! - Paul
Biostrings Biostrings • 1.8k views
ADD COMMENT
0
Entering edit mode
@henrik-bengtsson-4333
Last seen 7 months ago
United States
Hi, go to http://www.bioconductor.org/. Follow the link "For Developers" and then "2.1 check reports" to get to: http://bioconductor.org/checkResults/2.1/bioc-LATEST/ which is list daily checks on all BioC v2.1 (devel) packages, which is what you use if you run R devel (v2.6.0). Scroll down to 'Biostrings' and you'll see that all its builds and tests are reported as "OK". In other words, it most likely a problem with your setup, and not the package. Compare the version numbers of your packages in sessionInfo() with existing ones. Since, it looks like yours are up to date, the next thing I would check is your R version. On the top of the BioC check page you'll find that "R v2.6.0 RC (2007-09-26 r42991)" was used. Your R v2.6.0 is from 2007-09-12. Since we're getting close to the release date of R v2.6.0, things tend to get updated more frequently. So, update R and retry. Hope this helps Henrik PS. When you see error like "2 arguments passed to .Internal(nchar) which requires 3" reporting on mismatching # arguments on internal functions it is very likely that there has been updates in either a package or in base R. DS. On 9/28/07, Paul Shannon <pshannon at="" systemsbiology.org=""> wrote: > The Biostrings vignette has some code like this: > > > library(Biostrings) > > b <- BString("I am a BString object") > > d <- DNAString("TTGAAAA-CTC-N") > > With the first, I get this error: > > Error in BString("I am a BString object") : Error in nchar(src) : > 2 arguments passed to .Internal(nchar) which requires 3 > > With the second, I get: > > Error in DNAString("TTGAAAA-CTC-N") : Error in nchar(src) : > 2 arguments passed to .Internal(nchar) which requires 3 > > > I'm running bioc 2.6; is that my problem? > > sessionInfo () > R version 2.6.0 alpha (2007-09-12 r42830) > i386-apple-darwin8.10.1 > > locale: > C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] RUnit_0.4.17 Biostrings_2.5.19 > > loaded via a namespace (and not attached): > [1] tools_2.6.0 > > > Thanks! > > - Paul > > _______________________________________________ > 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 >
ADD COMMENT
0
Entering edit mode
@herve-pages-1542
Last seen 3 days ago
Seattle, WA, United States
Hi Paul, Here are 2 things that you could check: - How did you install R-2.6? Did you compile it yourself or did you use the universal binary from the "R for Mac OS X Developer's Page": http://r.research.att.com/ This is where we grab the R that we use on pitt (our Mac OS X build machine). - How did you install Biostrings? Again, did you compile it yourself (with e.g. biocLite("Biostrings", type="source")), or are you using our universal binary. You'll get our binary with biocLite("Biostrings", type="mac.binary") or just biocLite("Biostrings") if you didn't change the "pkgType" option in your startup file. There are many different ways to configure and install things from source on Mac OS X and there is no way for us to test our packages for all the possible setups. So when someone chooses this path, s/he is more or less on his/her own because we have no way to reproduce their problem. Sorry! Please test again but with the latest universal binary from the "R for Mac OS X Developer's Page" and with biocLite("Biostrings", type="mac.binary") and let us know if you still have this problem. Thanks! H. Paul Shannon wrote: > The Biostrings vignette has some code like this: > > > library(Biostrings) > > b <- BString("I am a BString object") > > d <- DNAString("TTGAAAA-CTC-N") > > With the first, I get this error: > > Error in BString("I am a BString object") : Error in nchar(src) : > 2 arguments passed to .Internal(nchar) which requires 3 > > With the second, I get: > > Error in DNAString("TTGAAAA-CTC-N") : Error in nchar(src) : > 2 arguments passed to .Internal(nchar) which requires 3 > > > I'm running bioc 2.6; is that my problem? > > sessionInfo () > R version 2.6.0 alpha (2007-09-12 r42830) > i386-apple-darwin8.10.1 > > locale: > C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] RUnit_0.4.17 Biostrings_2.5.19 > > loaded via a namespace (and not attached): > [1] tools_2.6.0 > > > Thanks! > > - Paul > > _______________________________________________ > 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
ADD COMMENT
0
Entering edit mode
Hi Herve, I just got R-2.6 from http://r.research.att.com/#nightly and then Biostrings via biocLite -- in the last few minutes. sessionInfo is below, and here is the (strangely persistent) error message. I was sure that getting the latest build from AT&T, as Henrik suggested, would do the trick! - Paul library (Biostrings) > DNAString ('AT') Error in DNAString("AT") : Error in nchar(src) : 2 arguments passed to .Internal(nchar) which requires 3 R version 2.6.0 RC (2007-09-27 r43002) i386-apple-darwin8.10.1 locale: C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] Biostrings_2.5.19 loaded via a namespace (and not attached): [1] tools_2.6.0 > On Sep 28, 2007, at 2:19 PM, Herve Pages wrote: > Hi Paul, > > Here are 2 things that you could check: > > - How did you install R-2.6? Did you compile it yourself or did > you use > the universal binary from the "R for Mac OS X Developer's Page": > > http://r.research.att.com/ > > This is where we grab the R that we use on pitt (our Mac OS X > build machine). > > - How did you install Biostrings? Again, did you compile it > yourself (with > e.g. biocLite("Biostrings", type="source")), or are you using our > universal binary. You'll get our binary with > > biocLite("Biostrings", type="mac.binary") > > or just > > biocLite("Biostrings") > > if you didn't change the "pkgType" option in your startup file. > > There are many different ways to configure and install things from > source > on Mac OS X and there is no way for us to test our packages for all > the > possible setups. So when someone chooses this path, s/he is more or > less > on his/her own because we have no way to reproduce their problem. > Sorry! > > Please test again but with the latest universal binary from the "R > for Mac > OS X Developer's Page" and with biocLite("Biostrings", > type="mac.binary") > and let us know if you still have this problem. Thanks! > > H. > > > Paul Shannon wrote: >> The Biostrings vignette has some code like this: >> >>> library(Biostrings) >>> b <- BString("I am a BString object") >>> d <- DNAString("TTGAAAA-CTC-N") >> >> With the first, I get this error: >> >> Error in BString("I am a BString object") : Error in nchar(src) : >> 2 arguments passed to .Internal(nchar) which requires 3 >> >> With the second, I get: >> >> Error in DNAString("TTGAAAA-CTC-N") : Error in nchar(src) : >> 2 arguments passed to .Internal(nchar) which requires 3 >> >> >> I'm running bioc 2.6; is that my problem? >> >> sessionInfo () >> R version 2.6.0 alpha (2007-09-12 r42830) >> i386-apple-darwin8.10.1 >> >> locale: >> C >> >> attached base packages: >> [1] stats graphics grDevices utils datasets methods base >> >> other attached packages: >> [1] RUnit_0.4.17 Biostrings_2.5.19 >> >> loaded via a namespace (and not attached): >> [1] tools_2.6.0 >> >> >> Thanks! >> >> - Paul >> >> _______________________________________________ >> 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 >
ADD REPLY
0
Entering edit mode
Paul Shannon wrote: > Hi Herve, > > I just got R-2.6 from http://r.research.att.com/#nightly and then > Biostrings > via biocLite -- in the last few minutes. > > sessionInfo is below, and here is the (strangely persistent) error > message. I > was sure that getting the latest build from AT&T, as Henrik suggested, > would > do the trick! Thanks for upating your setup and sorry that it didn't make the trick... A really strange error indeed, but (sorry if my question is obvious) are you sure that your nchar() is working properly? Can you please try this: > nchar('AT') Otherwise, I have no idea why this call (R/BString-class.R, line 96) length <- nchar(src) would produce the error you get!!? I'll need help from other Mac OS X users: anybody else here that is able to reproduce Paul's problem? Thanks in advance! H. > > - Paul > > > library (Biostrings) >> DNAString ('AT') > Error in DNAString("AT") : Error in nchar(src) : > 2 arguments passed to .Internal(nchar) which requires 3 > > > R version 2.6.0 RC (2007-09-27 r43002) > i386-apple-darwin8.10.1 > > locale: > C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] Biostrings_2.5.19 > > loaded via a namespace (and not attached): > [1] tools_2.6.0 >> > > > On Sep 28, 2007, at 2:19 PM, Herve Pages wrote: > >> Hi Paul, >> >> Here are 2 things that you could check: >> >> - How did you install R-2.6? Did you compile it yourself or did you use >> the universal binary from the "R for Mac OS X Developer's Page": >> >> http://r.research.att.com/ >> >> This is where we grab the R that we use on pitt (our Mac OS X >> build machine). >> >> - How did you install Biostrings? Again, did you compile it yourself >> (with >> e.g. biocLite("Biostrings", type="source")), or are you using our >> universal binary. You'll get our binary with >> >> biocLite("Biostrings", type="mac.binary") >> >> or just >> >> biocLite("Biostrings") >> >> if you didn't change the "pkgType" option in your startup file. >> >> There are many different ways to configure and install things from source >> on Mac OS X and there is no way for us to test our packages for all the >> possible setups. So when someone chooses this path, s/he is more or less >> on his/her own because we have no way to reproduce their problem. Sorry! >> >> Please test again but with the latest universal binary from the "R for >> Mac >> OS X Developer's Page" and with biocLite("Biostrings", type="mac.binary") >> and let us know if you still have this problem. Thanks! >> >> H. >> >> >> Paul Shannon wrote: >>> The Biostrings vignette has some code like this: >>> >>>> library(Biostrings) >>>> b <- BString("I am a BString object") >>>> d <- DNAString("TTGAAAA-CTC-N") >>> >>> With the first, I get this error: >>> >>> Error in BString("I am a BString object") : Error in nchar(src) : >>> 2 arguments passed to .Internal(nchar) which requires 3 >>> >>> With the second, I get: >>> >>> Error in DNAString("TTGAAAA-CTC-N") : Error in nchar(src) : >>> 2 arguments passed to .Internal(nchar) which requires 3 >>> >>> >>> I'm running bioc 2.6; is that my problem? >>> >>> sessionInfo () >>> R version 2.6.0 alpha (2007-09-12 r42830) >>> i386-apple-darwin8.10.1 >>> >>> locale: >>> C >>> >>> attached base packages: >>> [1] stats graphics grDevices utils datasets methods base >>> >>> other attached packages: >>> [1] RUnit_0.4.17 Biostrings_2.5.19 >>> >>> loaded via a namespace (and not attached): >>> [1] tools_2.6.0 >>> >>> >>> Thanks! >>> >>> - Paul >>> >>> _______________________________________________ >>> 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 >> >
ADD REPLY
0
Entering edit mode
Hi Herve, I think you found the problem: > nchar('AT') Error in nchar("AT") : 2 arguments passed to .Internal(nchar) which requires 3 Weird, no? - Paul
ADD REPLY
0
Entering edit mode
Paul Shannon wrote: > Hi Herve, > > I think you found the problem: > > > nchar('AT') > Error in nchar("AT") : > 2 arguments passed to .Internal(nchar) which requires 3 > > > Weird, no? Absolutely! Maybe you could ask on the R-SIG-Mac mailing list? r-sig-mac at stat.math.ethz.ch Good luck! H. > > - Paul >
ADD REPLY
0
Entering edit mode
@martin-morgan-1513
Last seen 5 months ago
United States
I wonder what traceback() says immediately after the error, and whether you get the message in a clean R (R --vanilla from the command line; do not load Biostrings)? Martin Paul Shannon <pshannon at="" systemsbiology.org=""> writes: > Hi Herve, > > I just got R-2.6 from http://r.research.att.com/#nightly and then > Biostrings > via biocLite -- in the last few minutes. > > sessionInfo is below, and here is the (strangely persistent) error > message. I > was sure that getting the latest build from AT&T, as Henrik > suggested, would > do the trick! > > - Paul > > > library (Biostrings) > > DNAString ('AT') > Error in DNAString("AT") : Error in nchar(src) : > 2 arguments passed to .Internal(nchar) which requires 3 > > > R version 2.6.0 RC (2007-09-27 r43002) > i386-apple-darwin8.10.1 > > locale: > C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] Biostrings_2.5.19 > > loaded via a namespace (and not attached): > [1] tools_2.6.0 > > > > > On Sep 28, 2007, at 2:19 PM, Herve Pages wrote: > >> Hi Paul, >> >> Here are 2 things that you could check: >> >> - How did you install R-2.6? Did you compile it yourself or did >> you use >> the universal binary from the "R for Mac OS X Developer's Page": >> >> http://r.research.att.com/ >> >> This is where we grab the R that we use on pitt (our Mac OS X >> build machine). >> >> - How did you install Biostrings? Again, did you compile it >> yourself (with >> e.g. biocLite("Biostrings", type="source")), or are you using our >> universal binary. You'll get our binary with >> >> biocLite("Biostrings", type="mac.binary") >> >> or just >> >> biocLite("Biostrings") >> >> if you didn't change the "pkgType" option in your startup file. >> >> There are many different ways to configure and install things from >> source >> on Mac OS X and there is no way for us to test our packages for all >> the >> possible setups. So when someone chooses this path, s/he is more or >> less >> on his/her own because we have no way to reproduce their problem. >> Sorry! >> >> Please test again but with the latest universal binary from the "R >> for Mac >> OS X Developer's Page" and with biocLite("Biostrings", >> type="mac.binary") >> and let us know if you still have this problem. Thanks! >> >> H. >> >> >> Paul Shannon wrote: >>> The Biostrings vignette has some code like this: >>> >>>> library(Biostrings) >>>> b <- BString("I am a BString object") >>>> d <- DNAString("TTGAAAA-CTC-N") >>> >>> With the first, I get this error: >>> >>> Error in BString("I am a BString object") : Error in nchar(src) : >>> 2 arguments passed to .Internal(nchar) which requires 3 >>> >>> With the second, I get: >>> >>> Error in DNAString("TTGAAAA-CTC-N") : Error in nchar(src) : >>> 2 arguments passed to .Internal(nchar) which requires 3 >>> >>> >>> I'm running bioc 2.6; is that my problem? >>> >>> sessionInfo () >>> R version 2.6.0 alpha (2007-09-12 r42830) >>> i386-apple-darwin8.10.1 >>> >>> locale: >>> C >>> >>> attached base packages: >>> [1] stats graphics grDevices utils datasets methods base >>> >>> other attached packages: >>> [1] RUnit_0.4.17 Biostrings_2.5.19 >>> >>> loaded via a namespace (and not attached): >>> [1] tools_2.6.0 >>> >>> >>> Thanks! >>> >>> - Paul >>> >>> _______________________________________________ >>> 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 >> > > _______________________________________________ > 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 Bioconductor / Computational Biology http://bioconductor.org
ADD COMMENT
0
Entering edit mode
Good idea, Martin: in a clean R, nchar works fine. Stranger and stranger... - Paul On Sep 28, 2007, at 3:19 PM, Martin Morgan wrote: > I wonder what traceback() says immediately after the error, and > whether you get the message in a clean R (R --vanilla from the command > line; do not load Biostrings)?
ADD REPLY
0
Entering edit mode
There is almost always a simple explaination. So, what does > print(nchar) give your in a clean and "non-clean" R session, and especially what environment(s) are reported? Also, scan for all occurances of nchar(): res <- apropos("nchar", where=TRUE); names(res) <- search()[as.integer(names(res))]; print(res); Any clues? /Henrik On 9/28/07, Paul Shannon <pshannon at="" systemsbiology.org=""> wrote: > Good idea, Martin: in a clean R, nchar works fine. > > Stranger and stranger... > > - Paul > > > On Sep 28, 2007, at 3:19 PM, Martin Morgan wrote: > > > I wonder what traceback() says immediately after the error, and > > whether you get the message in a clean R (R --vanilla from the command > > line; do not load Biostrings)? > > _______________________________________________ > 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 >
ADD REPLY
0
Entering edit mode
Hi Martin, Henrik, Thanks for looking at this. Maybe you'd like to know that Biostrings defines methods for "nchar", hence this line of output at installation time: Creating a new generic function for "nchar" in "Biostrings" See here http://bioconductor.org/checkResults/2.1/bioc- LATEST/Biostrings/lamb1-buildsrc.html for the complete output on lamb1. There are actually "nchar" methods for BString, BStringViews and BStringAlign objects in Biostrings. Could this be related to the problem? Thanks again! H. Henrik Bengtsson wrote: > There is almost always a simple explaination. So, what does > >> print(nchar) > > give your in a clean and "non-clean" R session, and especially what > environment(s) are reported? > > Also, scan for all occurances of nchar(): > > res <- apropos("nchar", where=TRUE); > names(res) <- search()[as.integer(names(res))]; > print(res); > > Any clues? > > /Henrik > > On 9/28/07, Paul Shannon <pshannon at="" systemsbiology.org=""> wrote: >> Good idea, Martin: in a clean R, nchar works fine. >> >> Stranger and stranger... >> >> - Paul >> >> >> On Sep 28, 2007, at 3:19 PM, Martin Morgan wrote: >> >>> I wonder what traceback() says immediately after the error, and >>> whether you get the message in a clean R (R --vanilla from the command >>> line; do not load Biostrings)? >> _______________________________________________ >> 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 >> > > _______________________________________________ > 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
ADD REPLY
0
Entering edit mode
I see. An aroma.affymetrix user on Mac OSX reported a problem with a package and even after the update the problem remained. The session info reported that the package was up to date, but somehow the code of the problematic function was still from the previous version. It turned out that the person did not restart R so the old version was loaded but sessionInfo() reported the version that was on file, which was the new version. For details, see http://tinyurl.com/29wr5m. In this Biostrings problem, R has obviously been restarted, but maybe there was a problem with the installation that causes (part of?) the old version to be around, while the DESCRIPTION file is updated. Maybe there are other Biostrings functions you can investigate to tell if this is the case or not. /Henrik On 9/28/07, Herve Pages <hpages at="" fhcrc.org=""> wrote: > Hi Martin, Henrik, > > Thanks for looking at this. Maybe you'd like to know that Biostrings defines > methods for "nchar", hence this line of output at installation time: > > Creating a new generic function for "nchar" in "Biostrings" > > See here > > http://bioconductor.org/checkResults/2.1/bioc- LATEST/Biostrings/lamb1-buildsrc.html > > for the complete output on lamb1. > > There are actually "nchar" methods for BString, BStringViews and BStringAlign objects > in Biostrings. Could this be related to the problem? > > Thanks again! > H. > > > Henrik Bengtsson wrote: > > There is almost always a simple explaination. So, what does > > > >> print(nchar) > > > > give your in a clean and "non-clean" R session, and especially what > > environment(s) are reported? > > > > Also, scan for all occurances of nchar(): > > > > res <- apropos("nchar", where=TRUE); > > names(res) <- search()[as.integer(names(res))]; > > print(res); > > > > Any clues? > > > > /Henrik > > > > On 9/28/07, Paul Shannon <pshannon at="" systemsbiology.org=""> wrote: > >> Good idea, Martin: in a clean R, nchar works fine. > >> > >> Stranger and stranger... > >> > >> - Paul > >> > >> > >> On Sep 28, 2007, at 3:19 PM, Martin Morgan wrote: > >> > >>> I wonder what traceback() says immediately after the error, and > >>> whether you get the message in a clean R (R --vanilla from the command > >>> line; do not load Biostrings)? > >> _______________________________________________ > >> 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 > >> > > > > _______________________________________________ > > 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 > > _______________________________________________ > 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 >
ADD REPLY
0
Entering edit mode
@martin-morgan-1513
Last seen 5 months ago
United States
Hi Paul -- If something like (using '%' to mean the shell prompt) % R --vanilla > nchar('AT') works, but % R > nchar('AT') produces an error, then likely you've got something stored in .Rprofile, .Rdata, or other (see ?Startup) startup file that is confusing R, e.g., pointing to an old installation. On the other hand if % R --vanilla > nchar('AT') works but % R --vanilla > library(Biostrings) > nchar('AT') doesn't, then it points toward Biostrings and it would help to see traceback() and the complete session. If there's no error ever with R --vanilla, then it is again likely to be something in one of your profile / environment / site files. Martin Paul Shannon <pshannon at="" systemsbiology.org=""> writes: > Good idea, Martin: in a clean R, nchar works fine. > > Stranger and stranger... > > - Paul > > > On Sep 28, 2007, at 3:19 PM, Martin Morgan wrote: > >> I wonder what traceback() says immediately after the error, and >> whether you get the message in a clean R (R --vanilla from the command >> line; do not load Biostrings)? > -- Martin Morgan Bioconductor / Computational Biology http://bioconductor.org
ADD COMMENT

Login before adding your answer.

Traffic: 826 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