On Thu, Jun 21, 2012 at 11:29 AM, Tim Triche, Jr. <tim.triche@gmail.com>wrote:

> I have a pile of copy number array results that have been segmented and
> assigned regional p-values by GISTIC.   (I have piles of other data that
> have all been converted to SummarizedExperiments now, because SEs rule).
>  I'd like to slot them in with the rest of the data in a container that
> automatically "packs out" missing assays/features across
> SummarizedExperiments by adding NAs, because that allows me to query the
> whole kit and kaboodle using an arbitrary range or ranges.
>
> In order to not have the CNV results be obscenely large, I'd like to take
> all of the GRanges of each patient's segmented results, and use disjoin()
> to get a minimal representation that I can then query by
> feature/range/whatever for overlapping mutations, aberrations, or what have
> you, against the other data on the patients.  This was mostly Sean Davis'
> idea but I only just recently figured out how it could make sense for my
> application (yes I know that is pathetic).  Anyways...
>
> To be concrete, I tried the following without success:
>
>  CNV.ranges <- do.call(disjoin, CNV.GRL)
>  CNV.ranges <- disjoin(CNV.GRL)
>
> After thinking about it a bit more, I tried
>
>  CNV.ranges <- disjoin(unlist(CNV.GRL))
>
> and that seemed to be the correct magic.  However,
>
>  Reduce(sum, sapply(CNV.GRL, length))
>  ## [1] 438762
>
>
I think you wanted: sum(elementLengths(CNV.CRL))? The above is a cumsum, I
think.


> versus
>
>  length(CNV.ranges)
>  ## [1] 352036
>
> Does this seem right?  Also, once I've done this, what's the most efficient
> way to turn all the patients' results into Rle() columns against
> CNV.ranges?
>
>
>
You would use findOverlaps to map the disjoined regions back to the
original regions and then Rle() the resulting vectors.


> Thanks for any assistance,
>
> --t
>
>
>
>
> --
> *A model is a lie that helps you see the truth.*
> *
> *
> Howard Skipper<
> http://cancerres.aacrjournals.org/content/31/9/1173.full.pdf>
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

