[BioC] Bioconductor, PHP, and R

Dan Tenenbaum dtenenba at fhcrc.org
Mon Nov 7 20:25:13 CET 2011


On Mon, Nov 7, 2011 at 11:05 AM, Hussein Hijazi <hshijazi at gmail.com> wrote:
> Thank you for the reply. Yes I have apache running. I basically installed
> gcrma from R using the following :
>
>     source("http://bioconductor.org/biocLite.R")
>     biocLite("gcrma")
>

That is correct. What I am saying is that
1) R sometimes installs packages in a directory somewhere under your
home directory. When other users run R, they cannot see this
directory.
2) Your apache web server is probably not running as you; it's
probably running as the user 'apache'. Therefore the 'apache' user
does not have the gcrma package installed.

The solution is something like this:

if (!"gcrma" %in% installed.packages()) {
  source("http://bioconductor.org/biocLite.R")
  biocLite("gcrma")
}
library(gcrma)
# etc etc

Dan




> Is this the right installation?
>
>
>
> On Mon, Nov 7, 2011 at 2:00 PM, Dan Tenenbaum <dtenenba at fhcrc.org> wrote:
>>
>> On Mon, Nov 7, 2011 at 10:57 AM, hussein bazzi [guest]
>> <guest at bioconductor.org> wrote:
>> >
>> > I'm calling some R script in php and it works fine. However when I call
>> > an R script that is using a bio-conductor package the script doesn't run.
>> > Specifically I have the following script which works perfectly fine in R but
>> > when I call it from php it doesn't. Note that when I call a script that
>> > doesn't use the bio-conductor package it works fine.
>> >
>> > library(gcrma) //It stops before it hits the first line
>> > print("b")
>> > Data <- ReadAffy()
>> > eset <- rma(Data)
>> > write.exprs(eset, file="NormalizedDate.txt")
>> >
>> >
>> >
>> >  -- output of sessionInfo():
>> >
>> > This is my input:
>> >
>> >
>> > library(gcrma) //It stops before it hits the first line
>> > print("b")
>> > Data <- ReadAffy()
>> > eset <- rma(Data)
>> > write.exprs(eset, file="NormalizedDate.txt")
>> >
>> >
>>
>> What user is your web server (presumably apache) running as?
>> Does that user have the gcrma package installed?
>>
>> Dan
>>
>>
>> >
>> > --
>> > Sent via the guest posting facility at bioconductor.org.
>> >
>> > _______________________________________________
>> > Bioconductor mailing list
>> > Bioconductor at r-project.org
>> > https://stat.ethz.ch/mailman/listinfo/bioconductor
>> > Search the archives:
>> > http://news.gmane.org/gmane.science.biology.informatics.conductor
>> >
>
>



More information about the Bioconductor mailing list