Entering edit mode
Paul Shannon
★
1.1k
@paul-shannon-578
Last seen 10.4 years ago
Hi Michael,
Thanks for the fix.
My little demo script doesn't run quite right just yet though. Of my
two features, only one is rendered. And the viewLimits appear to be
drawn from the first features's score, rather then from the viewLimits
I supply.
Could you give this a try?
- Paul
library (rtracklayer)
library (GenomicFeatures)
session <- browserSession ('UCSC')
track.name <- 'demoFeatures'
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'))
features <- GRangesForUCSCGenome ('hg18', chrom.names, feature.locs,
strand, name, score)
view.range <- GRanges (seqnames='chr1', range=range(feature.locs))
track (session, track.name, viewLimits=c(80,100)) <- features
view <- browserView (session, view.range, full=c('demoFeatures',
'ruler'), dense=c ('chainNetPanTro2', 'chainNetMm9'), hide=trackNames
(session))
On Oct 29, 2010, at 4:12 PM, Michael Lawrence wrote:
> I've fixed this in both release and devel, to come with 1.10(11).3.
>
> The problem was not related to the viewLimits. Export of WIG was
broken whenever there were chromosomes in the seqlengths that had no
actual ranges. Obviously a major bug.
>
> Thanks for the report,
> Michael
>
> On Fri, Oct 29, 2010 at 9:44 AM, Paul Shannon <pshannon at="" systemsbiology.org=""> wrote:
> 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.
> >
>
>