Hijacking the thread to discuss TAB completion as well.

hub = AnnotationHub()
hub$<TAB>
#  looks good, let me try goldenpath
hub$goldenpath.<TAB>
hub$goldenpath.a ... [59] hub$goldenpath.b ... [110]
hub$goldenpath.c ... [257] hub$goldenpath.d ... [242]
hub$goldenpath.e ... [51] hub$goldenpath.f ... [88]
hub$goldenpath.g ... [85] hub$goldenpath.h ... [5005]
hub$goldenpath.l ... [18] hub$goldenpath.m ... [250]
hub$goldenpath.nomLeu ... [23] hub$goldenpath.o ... [68]
hub$goldenpath.p ... [175] hub$goldenpath.r ... [78]
hub$goldenpath.s ... [87] hub$goldenpath.t ... [55]
hub$goldenpath.vicPac1.database. ... [14]
hub$goldenpath.xenTro ... [34]

This is a bit useless, since mostly I see single letters.  I would suggest
the following

First, the names tend to be super long.  So don't start the examples with
the entire path, like
  hub$goldenpath.a
but perhaps something like
"current selection: goldenpath.
a.. [59]
b.. [110]
etc, so that goldenpath is only listed once.  That way, the suggestions are
shorter and it is clearer what the choices are between (at least I think
that is the case)

Now, when I go down the list to
hub$goldenpath.hg19.encodeDCC.wgEncode

I get

Possible completions are:
hub$goldenpath.hg19.encodeDCC.wgEncodeA ... [176]
hub$goldenpath.hg19.encodeDCC.wgEncodeBroadHistone.wgEncodeBroadHistone ...
[280]
hub$goldenpath.hg19.encodeDCC.wgEncodeC ... [1041]
hub$goldenpath.hg19.encodeDCC.wgEncodeDukeAffyExon.wgEncodeDukeAffyExon ...
[107]
hub$goldenpath.hg19.encodeDCC.wgEncodeGencodeV4.wgEncodeGencode ... [4]
hub$goldenpath.hg19.encodeDCC.wgEncodeHaib ... [736]
hub$goldenpath.hg19.encodeDCC.wgEncodeOpenChrom ... [193]
hub$goldenpath.hg19.encodeDCC.wgEncodeRikenCage.wgEncodeRikenCage ... [108]
hub$goldenpath.hg19.encodeDCC.wgEncodeS ... [452]
hub$goldenpath.hg19.encodeDCC.wgEncodeU ... [1394]

But for example, for wgEncodeA, it turns out that there are only two real
choices:
hub$goldenpath.hg19.encodeDCC.wgEncodeAffyRnaChip.wgEncodeAffyRnaChip ...
[52]
hub$goldenpath.hg19.encodeDCC.wgEncodeAwgDnaseUniform.wgEncodeAwgDnase ...
[124]

but I can't really see this.

Anyway, I know this is hard to program, but right now it is a bit hard to
explore using the TAB completion.  Perhaps this can all be fixed by having
more suggestions (there is probably a limited to how many suggestions to
show).  In this particular case, with this many choices of resources, I
guess I would rather have (many) more suggestions than fewer.

At the end I just did
  print(names(hub))
and looked at that, which is probably not what we want.

Best,
Kasper



On Thu, Aug 1, 2013 at 8:35 PM, Kasper Daniel Hansen <
kasperdanielhansen@gmail.com> wrote:

> Technically yes, since I can do
>
> function(path) {
>   `[[`(hub, path)
> }
>
> Still, I think it does make sense to have something a bit more standard (I
> find the `[[` to be a bit unusual, but that may be colored by how I
> program).
>
> Retrieving multiple resources in a single call, like
>   paths = names(hub)[1:10]
> is going to be used a lot, I predict.
>
> Kasper
>
>
>
> On Thu, Aug 1, 2013 at 8:14 PM, Marc Carlson <mcarlson@fhcrc.org> wrote:
>
>> Hi Kasper,
>>
>> I think you could just do the following:
>>
>> ah[["goldenpath.hg19.**encodeDCC.wgEncodeUwTfbs.**
>> wgEncodeUwTfbsMcf7CtcfStdPkRep**1.narrowPeak_0.0.1.RData"]]
>>
>> Instead of using $ like usual:
>>
>> ah$goldenpath.hg19.encodeDCC.**wgEncodeUwTfbs.**
>> wgEncodeUwTfbsMcf7CtcfStdPkRep**1.narrowPeak_0.0.1.RData
>>
>>
>> Does that solve your problem?
>>
>>
>>   Marc
>>
>>
>>
>>
>>
>>
>> On 07/31/2013 06:14 PM, Kasper Daniel Hansen wrote:
>>
>>> I was wrong about ahinfo.  Is there an exposed interface to getting the
>>> result of a path, assuming the path is a character vector.  I see I can
>>> do
>>>    AnnotationHub:::.getResource(**hub, path)
>>> with hub an AnnotationHub and path a character vector.
>>>
>>> Such an interface would be extremely useful.
>>>
>>>
>>> On Wed, Jul 31, 2013 at 9:02 PM, Kasper Daniel Hansen <
>>> kasperdanielhansen@gmail.com> wrote:
>>>
>>>  About ?AnnotationHub (package version 1.1.8)
>>>>
>>>> All the functions whose values are described under "Value" are not
>>>> described under "Usage".  All the functions listed under "Usage" are not
>>>> described under "Value".
>>>>
>>>> The ahinfo (which seems to be a key function for doing things
>>>> programmatically) is not described under either "usage" or "value".
>>>>
>>>> The examples are great though.
>>>>
>>>> Best,
>>>> Kasper
>>>>
>>>>          [[alternative HTML version deleted]]
>>>
>>> ______________________________**_________________
>>> Bioconductor mailing list
>>> Bioconductor@r-project.org
>>> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https://stat.ethz.ch/mailman/listinfo/bioconductor>
>>> Search the archives: http://news.gmane.org/gmane.**
>>> science.biology.informatics.**conductor<http://news.gmane.org/gmane.science.biology.informatics.conductor>
>>>
>>
>> ______________________________**_________________
>> Bioconductor mailing list
>> Bioconductor@r-project.org
>> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https://stat.ethz.ch/mailman/listinfo/bioconductor>
>> Search the archives: http://news.gmane.org/gmane.**
>> science.biology.informatics.**conductor<http://news.gmane.org/gmane.science.biology.informatics.conductor>
>>
>
>

	[[alternative HTML version deleted]]

