Entering edit mode
Paul Shannon
★
1.1k
@paul-shannon-578
Last seen 10.2 years ago
I have climbed what, for me, has been a difficult learning curve with
rtracklayer. Now that I understand it better, I really like it. It's
a very useful package.
I have a few remaining questions about controlling which tracks I see,
and what view mode they are in (dense, squish, pack, or full).
How do I implicitly or explicitly hide all tracks, except for a select
few, when creating a BrowserView? And how can I subsequently modify
the view mode of selected tracks?
1) When my UCSC browser session has some previously viewed tracks on
by default, these remain visible when I create a new view:
view <- browserView (session, range.to.view, full='exonHits',
dense=c ('chainNetPanTro2', 'chainNetMm9'))
I see these three tracks, plus a half-dozen others left over from
previous browsing.
Instead, I wish to tell the browser "hide all tracks except those I
explicitly mention', perhaps like this:
view <- browserView (session, range.to.view, full='exonHits',
dense=c ('chainNetPanTro2', 'chainNetMm9'), hide='everythingElse')
2) My second question: how do I communicate the specific view mode
when calling the 'trackNames' method? trackNames will hide everything
besides what I explicitly name (a workaround for question 1, above),
like this:
trackNames (view) <- c ('exonHits', 'chainNetPanTro2',
'chainNetMm9')
But this brings it two problems. I cannot control the mode of these
tracks (dense, squish, pack, full). And then this method creates a
new tab in my browser every time I call it. (Chrome on OS X 10.6) So
every time I want a particular view, with particular tracks, I need
two calls:
view <- browserView (....)
trackNames (view) <- (<some track="" names="">)
and I get two tabs, the first of which I always delete.
I have pored over the browserView and trackNames man pages, peeked at
the source, all to no avail.
Any advice?
- Paul
---- SessionInfo (following a recent update.packages ())
R version 2.12.0 (2010-10-15)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
locale:
[1] en_US.utf-8/en_US.utf-8/C/C/en_US.utf-8/en_US.utf-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] GenomicFeatures_1.1.11 rtracklayer_1.10.0
RCurl_1.4-3 bitops_1.0-4.1
[5] BSgenome.Hsapiens.UCSC.hg18_1.3.16
BSgenome.Mmusculus.UCSC.mm9_1.3.16 BSgenome_1.17.5
Biostrings_2.18.0
[9] GenomicRanges_1.2.0 IRanges_1.8.0
org.Pt.eg.db_2.4.1 org.Hs.eg.db_2.4.6
[13] org.Mm.eg.db_2.4.1 RSQLite_0.9-2
DBI_0.2-5 AnnotationDbi_1.11.8
[17] Biobase_2.10.0 RUnit_0.4.26
loaded via a namespace (and not attached):
[1] biomaRt_2.6.0 tools_2.12.0 XML_3.2-0