Re: [R] RSNPper SNPinfo and making it handle a vector
I am not a card-carrying Bioinformatician or Biostatistician. At the risk of demonstrating naivete let me ask if you have reservations about snpper and its durability why not query dbSNP? : http://www.ncbi.nlm.nih.gov/projects/SNP/ That may be easy for me to say since I don't have the skills to do the programming, I am a pediatric otolaryngologist. another good question. dbSNP did not, at the time RSNPper was created, provide easy programmatic access to such nicely curated/amalgamated data from various sources. i suspect that is still the case. but there may be other web services providing information on SNPs, where a clear specification exists regarding what you issue and what you get back, and what you get back tells you things like SNP location, role, relation to genes, population frequency, etc.. if you find one and let me know about it i will consider writing another package to retrieve SNP-related metadata. you might look at the biomaRt package in Bioconductor and see if its snp query resolution facilities meet your needs. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] RSNPper SNPinfo and making it handle a vector
If I run an analysis which generates statistical tests on many SNPs I would naturally want to get more details on the most significant SNPs. Directly from within R one can get the information by loading RSNPer (from Bioconductor) and simply issuing a command SNPinfo(2073285). Unfortunately, the command cannot handle a vector and therefore only wants to do one at a time. I tried the lapply and sapply functions but was stymied temporarily lapply(best.snp,SNPinfo) #where best.snp is a vector of SNPs Error in FREQ[[1]] : subscript out of bounds [I do not know what that means] Nevertheless, I found that one of the SNPs was causing this and could bypass it by using the try function. lapply(best.snp,function(x) try(SNPinfo(x))) which let R continue One can then extract numbers or values out of the resultant output but this method lacks finesse and is not easy. looks pretty easy to me. there is the nuisance of digging through the output but i have no use cases or -- to my knowledge, until you wrote -- any active users other than myself. so little motivation to push further. additionally, snpper is not particularly well maintained (builds seem pretty old) and i think it is going to be replaced. so i don't plan to put much more effort into it until i learn more about snpper.chip.org durability. Do you know of another method that would read the data and then write the resultant data to a dataframe? i think you'll be able to do this with your lapply -- and contribute the code? Another very useful feature for which I would like to use the same treatment is to use the SNPinfo as a way to get the gene information lapply(best.snp,function(x) try(geneDetails(SNPinfo(x as above __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Name conflict between Epi and ROC packages
we can use name spaces. i will try to put one in for ROC ASAP. best regards --- Vince Carey, PhD Assoc. Prof Med (Biostatistics) Harvard Medical School Channing Laboratory - ph 6175252265 fa 6177311541 181 Longwood Ave Boston MA 02115 USA [EMAIL PROTECTED] On Thu, 15 Dec 2005, Tuszynski, Jaroslaw W. wrote: The name conflicts in Epi and ROC packages (2 'ROC' functions are the problem) cause the following code to work once, but not twice: library(MASS); data(cats); x = cats[,2] y = ifelse(cats[,1]=='F',0,1) library(Epi); ROC(x,y,grid=0)$AUC library(ROC); AUC(rocdemo.sca(y, x, dxrule.sca)) What is the standard way of resolving name conflicts? Ask maintainers to resolve it or rename the younger function, use namespaces somehow, or something else? My machine is WinXP, R-2.2.0, ROC and Epi packages are the latest versions. Jarek Tuszynski __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Name conflict between Epi and ROC packages
apparently there is already a namespace for ROC. so whenever you need disambiguation and want to select the function defined in ROC, use ROC::f where f names a function in ROC package, and f is also used in another package on the searchlist. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Re: Importing a SAS file to R: Alas, STILL more problems--has anyone gotten this message before, and why
i am the author of read.ssd, and did not accommodate sas for windows in the creation of that function. i do not know how sas is called under windows, but it is possible that if you learn how to invoke sas through the R system command, you can supply the invocation command as the sascmd parameter to read.ssd other ways of transferring the information from SAS to R include 1) using a put statement to write the data out record by record into a whitespace delimited file, and then using read.table in R to collect the data for use in R, 2) using read.ssd on a unix system, saving the resulting R object, and then transferring the R object back to windows. --- Vince Carey On Mon, 9 Feb 2004, Shoultz, Gerald wrote: Sorry to write twice in one day--I am a relative newbie to some of these parts of R, and I am pulling my hair out! B/c I am preparing a file to use WINBUGS I am cross-posting to the BUGS group as well, in case anyone there has some ideas on this. I've got a large SAS dataset that I want to put in R form to more easily use the file with the hierarchical modeling software WINBUGS. It has numerous variables, so setting up vertical text files could be awkward. I did get the library foreign installed OK. I am now trying to run read.ssd. What I have below is similar to that found in the documentation for the foreign package, p.9: list.files(C:/Project_data/WINBUGSfiles) [1] lastfile.sas7bdat dtabunch-read.ssd(C:/Project_data/WINBUGSfiles,lastfile) I unfortunately got this: SAS failed. SAS program at C:\DOCUME~1\bjz9\LOCALS~1\Temp\Rtmp23335\file29621.sas a log and other error products should be in the vicinity Warning messages: 1: sas not found 2: ls not found 3: SAS return code was -1 in: read.ssd(C:/Project_data/WINBUGSfiles, lastfile) I have tried to find the log file but have been unable to do so.Can someone who has had this happen before kindly tell me what exactly (or possibly) is going on? I went to the SAS Technical Support Document TS-140 to try to get help and really didn't get much out of that. Does anyone know a better (as in foolproof/will avoid meaningless error messages) way to get a SAS dataset into R-format? Any help on this would be most appreciated. Thanks! Gerald Shoultz __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html