[BioC] Granges for chromosome interactions
Tim Triche, Jr.
tim.triche at gmail.com
Tue Aug 7 20:57:42 CEST 2012
Probably the smartest way to do this seems like the 'r3Cseq' package,
which comes with an example. But it uses RangedData for now.
R> biocLite(c('r3Cseq','BSgenome.Mmusculus.UCSC.mm9'))
## time passes
R> require(r3Cseq)
R> library(BSgenome.Mmusculus.UCSC.mm9)
R> load(system.file("data","example.data.rda",package="r3Cseq"))
R> calculateRPM(my.data)
R> getInteractions(my.data)
R> plotOverviewInteractions(my.data)
Another, less smart, idea: add values(interactions.GR)$interactsWith
as a SimpleList and walk through the list as needed?
R> int.GR <- as(foo, 'GenomicRanges')
R> show(int.GR)
## GRanges with 6 ranges and 1 elementMetadata col:
## seqnames ranges strand | interactsWith
## <Rle> <IRanges> <Rle> | <list>
## A1BG chr19 [ 63549984, 63565932] - | ########
## NAT2 chr8 [ 18293035, 18303003] + | ########
## ADA chr20 [ 42681577, 42713790] - | ########
## CDH2 chr18 [ 23784933, 24011189] - | ########
## AKT3 chr1 [241718158, 242073207] - | ########
## LOC100009676 chr3 [102877980, 102880471] + | ########
## ...
R> values(int.GR)$interactsWith <- SimpleList( c(2,3), c(1,4), c(),
c(1), c(6), c(5) )
R> invisible(lapply( values(int.GR)$interactsWith, function(x)
cat(names(int.GR)[x], "\n" )))
## NAT2 ADA
## A1BG CDH2
##
## A1BG
## LOC100009676
## AKT3
Per above, this would be the disrecommended approach, as far as I know.
Hope this helps.
--t
On Tue, Aug 7, 2012 at 10:14 AM, Bogdan Tanasa <tanasa at gmail.com> wrote:
>
> Dear all,
>
> I would like to represent 2 (chromosomal) interactions as Granges data
> structure:
>
> let's say :
> chr1 1000-1010 site interacting with chr1 5000-5010
> chr1 5000-5010 site interacting with chr1 8000-8010
>
> in order to apply the function georm_arch in ggbio for visualization ...
>
> I would appreciate any suggestions in this respect. thanks very much,
>
> Bogdan
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
--
A model is a lie that helps you see the truth.
Howard Skipper
More information about the Bioconductor
mailing list