Hi Johan,
is.environment() should be helpful. Use ?is.environment for more
detail.
HTH,
Ting-Yuan
______________________________________
Ting-Yuan Liu
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
Seattle, WA, USA
______________________________________
On Thu, 24 Nov 2005, Johan Lindberg wrote:
> Hi. I am writing a function doing home-brewed chromosomal plots but
I have
> run in to a problem when I want to make it more general.
>
>
>
> When you load your home-made package created with the help of
AnnBuilder
> environments become available with different information.
>
>
>
> ######################################################
>
> ls("package:Hum30kbatch1to5")
>
> [1] "Hum30kbatch1to5"
>
> [2] "Hum30kbatch1to5ACCNUM"
>
> [3] "Hum30kbatch1to5CHR"
>
> [4] "Hum30kbatch1to5CHRLENGTHS"
>
> [5] "Hum30kbatch1to5CHRLOC"
>
> [6] "Hum30kbatch1to5ENZYME"
>
> [7] "Hum30kbatch1to5ENZYME2PROBE"
>
> [8] "Hum30kbatch1to5GENENAME"
>
> [9] "Hum30kbatch1to5GO"
>
> [10] "Hum30kbatch1to5GO2ALLPROBES"
>
> [11] "Hum30kbatch1to5GO2PROBE"
>
> [12] "Hum30kbatch1to5LOCUSID"
>
> [13] "Hum30kbatch1to5MAP"
>
> [14] "Hum30kbatch1to5MAPCOUNTS"
>
> [15] "Hum30kbatch1to5OMIM"
>
> [16] "Hum30kbatch1to5ORGANISM"
>
> [17] "Hum30kbatch1to5PATH"
>
> [18] "Hum30kbatch1to5PATH2PROBE"
>
> [19] "Hum30kbatch1to5PFAM"
>
> [20] "Hum30kbatch1to5PMID"
>
> [21] "Hum30kbatch1to5PMID2PROBE"
>
> [22] "Hum30kbatch1to5PROSITE"
>
> [23] "Hum30kbatch1to5QC"
>
> [24] "Hum30kbatch1to5QCDATA"
>
> [25] "Hum30kbatch1to5REFSEQ"
>
> [26] "Hum30kbatch1to5SUMFUNC"
>
> [27] "Hum30kbatch1to5SYMBOL"
>
> [28] "Hum30kbatch1to5UNIGENE"
>
> ######################################################
>
>
>
> I thought they all were environments and if you want to call an
environment
> from within a function you could use something like:
>
>
>
> getEnvironment <- function(chipName, environment)
>
> {
>
> get(paste(chipName, environment, sep = ""),
mode =
> "environment")
>
> }
>
>
>
> To prevent having to pass every environment that I want to use in
the
> function as an argument.
>
>
>
> But I discovered that the "Hum30kbatch1to5CHRLENGTHS" was a vector
rather
> than an environment and that it is accessible from my workspace. If
I type
> just
>
>
>
> ###############################################
>
> > Hum30kbatch1to5CHRLENGTHS
>
> 1 2 3 4 5 6
>
> 246127941 243615958 199344050 191731959 181034922 170914576
>
> 7 8 9 10 11 12
>
> 158545518 146308819 136372045 135037215 134482954 132078379
>
> 13 14 15 16 17 18
>
> 113042980 105311216 100256656 90041932 81860266 76115139
>
> 19 20 21 22 X Y
>
> 63811651 63741868 46976097 49396972 153692391 50286555
>
> M
>
> 16571
>
> ###############################################
>
> then I get the lengths of the different chromosomes.
>
>
>
> How do I get hold of this information from within a function if I do
not
> want to give the whole object as an argument? I only want to provide
the
> name of my package and then get hold of all information. Could one
use get?
> But how? I tried something like
>
>
>
> get("Hum30kbatch1to5","CHRLENGTHS", mode = "numeric")
>
> Error in as.environment(pos) : no item called "CHRLENGTHS" on the
search
> list
>
>
>
> but that didn't work since it isn't accessible in my workspace.
>
>
>
> Help please?
>
>
>
> Best regards
>
>
>
> // Johan L
>
>
>
> ********************************************************************
********
> ***************
>
> Johan Lindberg
>
> Royal Institute of Technology
>
> AlbaNova University Center
>
> Stockholm Center for Physics, Astronomy and Biotechnology
>
> Department of Molecular Biotechnology
>
> Visiting address:
>
> Roslagstullsbacken 21, Floor 3
>
> 106 91 Stockholm, Sweden
>
> Delivering address:
>
> Roslagstullsbacken 30B
>
> 104 06 Stockholm, Sweden
>
> Phone (office) +46 8 553 783 44
>
> Fax + 46 8 553 784 81
>
> http://www.ktharray.se/
>
> ********************************************************************
********
> ***************
>
>
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
>
Hi,
I am using LimmaGUI to analyse my cDNA microarray experiments and
produce plots showing particular genes etc. (LimmaGUI 1.3.9 with R
2.1.1)
Once I make an MA plot, I can easily resize the X axis (A) if I want
to,, as the option is given inside the "Resize" menu. But more often I
would like to resize the X axis (M). Either to display a number of
plots all in the same scale, or because a particular gene of interest
is not been shown as it is off scale (in my latest example, the M
value
for my gene was around 4, but the Y axis was automatically cut at
between 2-3, so my gene wasn't shown...).
Is there a simple way to re-scale the Y axis?
Yes, it is becoming clear that I should start getting to grips with
the
command line version of Limma, because of its flexibility... but it
will take me a little time and deadlines being what they are... I
would
really appreciate any help to allow me to sort this from LimmaGUI now.
Thanks for any help.
Jose
--
Dr. Jose I. de las Heras Email: J.delasHeras at
ed.ac.uk
The Wellcome Trust Centre for Cell Biology Phone: +44 (0)131
6513374
Institute for Cell & Molecular Biology Fax: +44 (0)131
6507360
Swann Building, Mayfield Road
University of Edinburgh
Edinburgh EH9 3JR
UK
Jose,
I'm checking what you say. The resize Window only adjusts the scale of
the whole plot window, not the scale on either axis.
There isn't a way of adjusting the scales on the axis in limmaGUI,
though it is being considered as a future modification.
If an M value is not being plotted, try a different background
correction method. The Subtract method(the default in limmaGUI) may
produce some negative values, which are hence excluded. Use None
instead. There will soon be a change to limmaGUI that includes the
normexp algorithm which is currently available in limma.
Your right about the command line limma program - more features are
currently available using it. We plan to add more features to the GUI
programs. Your comments on which ones (other than settable scale
parameters) are welcome.
cheers,
Keith
J.delasHeras at ed.ac.uk wrote:
>Hi,
>
>I am using LimmaGUI to analyse my cDNA microarray experiments and
>produce plots showing particular genes etc. (LimmaGUI 1.3.9 with R
>2.1.1)
>Once I make an MA plot, I can easily resize the X axis (A) if I want
>to,, as the option is given inside the "Resize" menu. But more often
I
>would like to resize the X axis (M). Either to display a number of
>plots all in the same scale, or because a particular gene of interest
>is not been shown as it is off scale (in my latest example, the M
value
>for my gene was around 4, but the Y axis was automatically cut at
>between 2-3, so my gene wasn't shown...).
>
>Is there a simple way to re-scale the Y axis?
>
>Yes, it is becoming clear that I should start getting to grips with
the
>command line version of Limma, because of its flexibility... but it
>will take me a little time and deadlines being what they are... I
would
>really appreciate any help to allow me to sort this from LimmaGUI
now.
>
>Thanks for any help.
>
>Jose
>
>
>