[BioC] rtracklayer 'track' method, a viewLimits parameter?
Paul Shannon
pshannon at systemsbiology.org
Fri Oct 29 18:44:32 CEST 2010
Hi Michael,
In creating a minimal script to demonstrate my track<- viewLimits problem, I got past the 'unused argument' but stuck at the next step. In other programs I have written, I do not see *this* particular problem. Something nondeterministic seems to be going on for me. Maybe you can see what I am doing wrong.
Here is the 14-line script. I'll be grateful for any help you can give.
library (rtracklayer)
library (GenomicFeatures)
score <- c (80.3, 99.5)
chrom.names <- c ('chr1', 'chr1')
feature.locs <- IRanges (c (201491492, 201491528), c (201491520, 201491607))
strand <- c ('+', '+')
name = Rle (c ('feature-1', 'feature-2'))
feature.grange <- GRangesForUCSCGenome ('hg18', chrom.names, feature.locs, strand, name, score)
view.range <- GRanges (seqnames='chr1', range=c(201491480, 20149120)) # slightly larger than the region covered by the features
session <- browserSession ('UCSC')
track.name <- 'demoFeatures'
track (session, track.name, viewLimits=c(80,100)) <- feature.grange
stopifnot (track.name %in% names (trackNames (session)))
view <- browserView (session, view.range, full='cytoBand', dense=c ('ruler', 'chainNetPanTro2', 'chainNetMm9'), hide=trackNames (session))
---- sessionInfo
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 GenomicRanges_1.2.0 IRanges_1.8.0 rtracklayer_1.10.2 RCurl_1.4-3 bitops_1.0-4.1
loaded via a namespace (and not attached):
[1] Biobase_2.10.0 biomaRt_2.6.0 Biostrings_2.18.0 BSgenome_1.17.5 DBI_0.2-5 RSQLite_0.9-2 XML_3.2-0
On Oct 28, 2010, at 4:03 PM, Michael Lawrence wrote:
>
> On Thu, Oct 28, 2010 at 1:21 PM, Paul Shannon <pshannon at systemsbiology.org> wrote:
> I have a specific rtracklayer question, and a general S4/help question.
>
> The specific question: Michael helpfully suggested the 'viewLimits' parameter to the rtracklayer track method, saying
>
> This is another track line parameter, called viewLimits. See class?GraphTrackLine.
> track (session, "wiggle", viewLimits = c(0, 100)) <- wiggle
>
> Indeed, class?GraphTrackLine mentions that parameter.
>
> But when I call this method (or what I *think* is this method), I get this:
>
> unused argument(s) (viewLimits = c(80, 100))
>
> That's my specific question. How do I supply viewLimits information to the track method?
>
>
> Could you please provide a reproducible example? I cannot reproduce with a simple test, and really the arguments are not interpreted in a way that would result in that error.
>
More information about the Bioconductor
mailing list