[Bioc-devel] tab completion for library()

Martin Morgan mtmorgan at fhcrc.org
Wed Nov 13 18:25:51 CET 2013


On 11/13/2013 09:17 AM, Tim Triche, Jr. wrote:
> This seems like what I'm looking for, but it doesn't do what I'd expect:
>
> R> rc.options(ipck=TRUE)
> R> rc.options()$ipck
> [1] TRUE
> R> require(Biostr\t
> # nothing happens
>
> Should I be using one of the intermediate/undocumented functions to grab a
> list of possible completions?

should be rc.settings(ipck=TRUE)

Tab completion can be pretty useful to customize for class developers, for 
instance library(GenomicRanges); .DollarNames.GenomicRanges is what enables tab 
completion on the metadata column names

 > gr = GRanges("chr1", IRanges(1, 10), foo=1, bar=2)
 > gr$f<tab>

Martin

>
> Thanks,
>
> --t
>
>
> R> sessionInfo()
> R Under development (unstable) (2013-11-11 r64202)
> Platform: x86_64-unknown-linux-gnu (64-bit)
>
> locale:
>   [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>   [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
>   [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
>   [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
>   [9] LC_ADDRESS=C               LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] parallel  stats     graphics  grDevices datasets  utils     methods
> [8] base
>
> other attached packages:
>   [1] Matrix_1.1-0
>   [2] frma_1.15.1
>   [3] BSgenome.Hsapiens.UCSC.hg19_1.3.19
>   [4] BSgenome_1.31.6
>   [5] Biostrings_2.31.1
>   [6] Homo.sapiens_1.1.1
>   [7] TxDb.Hsapiens.UCSC.hg19.knownGene_2.10.1
>   [8] org.Hs.eg.db_2.10.1
>   [9] GO.db_2.10.1
> [10] RSQLite_0.11.4
> [11] DBI_0.2-7
> [12] OrganismDbi_1.5.0
> [13] GenomicFeatures_1.15.2
> [14] AnnotationDbi_1.25.3
> [15] Biobase_2.23.2
> [16] chromophobe_0.79
> [17] fastcluster_1.1.11
> [18] pheatmap_0.7.7
> [19] ggplot2_0.9.3.1
> [20] reshape2_1.2.2
> [21] GenomicRanges_1.15.9
> [22] XVector_0.3.1
> [23] IRanges_1.21.8
> [24] BiocGenerics_0.9.0
> [25] BiocInstaller_1.13.2
> [26] gtools_3.1.1
> [27] devtools_1.3
>
> loaded via a namespace (and not attached):
>   [1] affxparser_1.35.0        affy_1.41.1              affyio_1.31.0
>
>   [4] biomaRt_2.19.1           bit_1.1-10               bitops_1.0-6
>
>   [7] codetools_0.2-8          colorspace_1.2-4         dichromat_2.0-0
>
> [10] digest_0.6.3             evaluate_0.5.1           ff_2.2-12
>
> [13] foreach_1.4.1            GenomicAlignments_0.99.2 graph_1.41.1
>
> [16] grid_3.1.0               gtable_0.1.2             httr_0.2
>
> [19] iterators_1.0.6          labeling_0.2             lattice_0.20-24
>
> [22] MASS_7.3-29              matrixStats_0.8.12       memoise_0.1
>
> [25] munsell_0.4.2            oligo_1.27.0             oligoClasses_1.25.1
>
> [28] plyr_1.8                 preprocessCore_1.25.0    proto_0.3-10
>
> [31] R.methodsS3_1.5.2        RBGL_1.39.1              RColorBrewer_1.0-5
>
> [34] RCurl_1.95-4.1           Rsamtools_1.15.7         rtracklayer_1.23.3
>
> [37] scales_0.2.3             splines_3.1.0            stats4_3.1.0
>
> [40] stringr_0.6.2            tools_3.1.0              whisker_0.3-2
>
> [43] XML_3.98-1.1             zlibbioc_1.9.0
>
>
> *He that would live in peace and at ease, *
> *Must not speak all he knows, nor judge all he sees.*
>
> Benjamin Franklin, Poor Richard's
> Almanack<http://archive.org/details/poorrichardsalma00franrich>
>
>
> On Wed, Nov 13, 2013 at 8:43 AM, Deepayan Sarkar
> <deepayan.sarkar at gmail.com>wrote:
>
>> On Wed, Nov 13, 2013 at 10:06 PM, Tim Triche, Jr. <tim.triche at gmail.com>
>> wrote:
>>> How hard would this be to set up (e.g. using a mechanism like
>>> AnnotationHub's)?
>>>
>>> I'm really lazy and wondering if the time spent writing a little package
>>> might be recovered when I want to load a BSgenome or SNPlocs (or...)
>>> package this way.
>>>
>>> Plus if the mechanism could involve caching, maybe that could work for
>>> biocLite too.
>>>
>>> Just a thought.  How much trouble am I looking at and what should I watch
>>> out for?
>>
>> Set
>>
>> rc.options(ipck = TRUE)
>>
>> and try again. Is this what you are looking for?
>>
>> -Deepayan
>>
>>> thanks,
>>>
>>> --t
>>>
>>>
>>> *He that would live in peace and at ease, *
>>> *Must not speak all he knows, nor judge all he sees.*
>>>
>>> Benjamin Franklin, Poor Richard's
>>> Almanack<http://archive.org/details/poorrichardsalma00franrich>
>>>
>>>          [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> Bioc-devel at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>


-- 
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the Bioc-devel mailing list