[Bioc-sig-seq] Error while trying to xyplot. Perhaps a lattice problem.

ig2ar-saf2 at yahoo.co.uk ig2ar-saf2 at yahoo.co.uk
Wed Apr 29 06:23:05 CEST 2009


Hello Deepayan,

Thanks for giving me a hand with xyplot.

The output of str(nread.islands) is

> nread.islands <- as(gdapply(E1, islandReadSummary), "data.frame")
> str(nread.islands)
'data.frame':    4886 obs. of  4 variables:
 $ nread     : num  1 2 3 4 5 6 7 8 9 10 ...
 $ count     : num  80871 12722 2548 666 176 ...
 $ chromosome: Factor w/ 21 levels "chr1.fa","chr10.fa",..: 1 1 1 1 1 1 1 1 1 1 ...
 $ sample    : Factor w/ 4 levels "C1","C2","T1",..: 1 1 1 1 1 1 1 1 1 1 ...
> 

Aha! I see what you mean. Instead of using

chromosome == "chr19"

I should be using

chromosome == "chr19.fa"

Now I am logged in remotely to my work computer. Bad connection. I'll try it tomorrow and let you know if it works.

Thank you.

Ivan





----- Original Message ----
From: Deepayan Sarkar <deepayan.sarkar at gmail.com>
To: ig2ar-saf2 at yahoo.co.uk
Cc: bioc-sig-sequencing at r-project.org
Sent: Tuesday, 28 April, 2009 19:01:16
Subject: Re: [Bioc-sig-seq] Error while trying to xyplot. Perhaps a lattice  problem.

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