[Bioc-sig-seq] Error while trying to xyplot. Perhaps a lattice problem.
Deepayan Sarkar
deepayan.sarkar at gmail.com
Wed Apr 29 01:01:16 CEST 2009
On Tue, Apr 28, 2009 at 9:58 AM, <ig2ar-saf2 at yahoo.co.uk> wrote:
>
> Hello everybody,
>
> I am working with the yet unreleased package chipseq.
>
> There is a very nice xyplot that I am trying to reproduce from the
>
> http://www.bioconductor.org/workshops/2009/SeattleJan09/ChIP-seq/ChipSeqWorkflow.pdf
>
> However, R complains saying
>
> "Error in limits.and.aspect(prepanel.default.xyplot, prepanel = prepanel, :
> need at least one panel"
>
> What am I doing? This
>
>> class(E1)
> [1] "GenomeDataList"
> attr(,"package")
> [1] "BSgenome"
>> names(E1)
> [1] "C1" "C2" "T1" "T2"
>> islandReadSummary <- function(x)
> + {
> + g <- extendReads(x, seqLen = 200)
> + s <- slice(coverage(g, 1, max(end(g))), lower = 1)
> + tab <- table(viewSums(s) / 200)
> + ans <- data.frame(nread = as.numeric(names(tab)), count = as.numeric(tab))
> + ans
> + }
>> nread.islands <- as(gdApply(E1, islandReadSummary), "data.frame")
> There were 50 or more warnings (use warnings() to see the first 50)
Could you share the output of
str(nread.islands)
?
>> xyplot(log(count) ~ nread | sample,
> + nread.islands,
> + subset = (chromosome == "chr19" & nread <= 40),
> + layout = c(1, 4), pch = 16, type = c("p", "g"))
> Error in limits.and.aspect(prepanel.default.xyplot, prepanel = prepanel, :
> need at least one panel
>>
>
> Can anybody shed some light?
>
> Clarification: the warning "There were 50 or more warnings (use warnings() to see the first 50)" comes from IRanges. chipseq is using the slightly older start/end convention rather than the newer shift/step convention.
>
Actually, that's happening inside your 'islandReadSummary' function, where
s <- slice(coverage(g, 1, max(end(g))), lower = 1)
should now be
s <- slice(coverage(g), lower = 1)
-Deepayan
> Thank you,
>
> Ivan
>
>
>
>
> _______________________________________________
> Bioc-sig-sequencing mailing list
> Bioc-sig-sequencing at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
>
More information about the Bioc-sig-sequencing
mailing list