[BioC] Combining GEOquery with samr or siggenes

Sean Davis sdavis2 at mail.nih.gov
Thu Sep 1 12:50:02 CEST 2011


On Thu, Sep 1, 2011 at 5:57 AM, Voke AO <ovokeraye at gmail.com> wrote:
> Hi,
>
> Is it possible to somehow have a code that can pull out several GDS
> info (like a batch process) using GEOquery in a way that they can
> subsequently be analyzed with SAM or Siggenes in a kind of loop?

Yes.  Here is a simple example.  You will need to supply the code to
do any actual analysis and return the actual result, but I hope you
get the idea.  I used sapply as the loop structure, but you could use
any loop structure that you like.

Hope that helps.

Sean

> gdslist = c('GDS3717','GDS3718','GDS3719')
> analysisfunc = function(gdsid) {
  gdsdat = getGEO(gdsid,destdir=".")
  gdseset = GDS2eSet(gdsdat)
  message("DO SIGGENES STUFF HERE")
  return(sprintf("Results from %s would be here",gdsid))
}
> resultlist = sapply(gdslist,analysisfunc)
File stored at:
./GDS3717.soft.gz
File stored at:
/var/folders/23/234W5ZnqHPih-U4YppHVCU+++TI/-Tmp-//RtmpgeksBL/GPL570.annot.gz
DO SIGGENES STUFF HERE
File stored at:
./GDS3718.soft.gz
File stored at:
/var/folders/23/234W5ZnqHPih-U4YppHVCU+++TI/-Tmp-//RtmpgeksBL/GPL1261.annot.gz
DO SIGGENES STUFF HERE
File stored at:
./GDS3719.soft.gz
File stored at:
/var/folders/23/234W5ZnqHPih-U4YppHVCU+++TI/-Tmp-//RtmpgeksBL/GPL1319.annot.gz
DO SIGGENES STUFF HERE
There were 50 or more warnings (use warnings() to see the first 50)
> resultlist
                             GDS3717                              GDS3718
"Results from GDS3717 would be here" "Results from GDS3718 would be here"
                             GDS3719
"Results from GDS3719 would be here"



More information about the Bioconductor mailing list