Operations on GenomicRanges metadata information
1
0
Entering edit mode
Aleš Maver ▴ 80
@ales-maver-3556
Last seen 9.7 years ago
Dear BioConductors! I have been using functions in GenomicRanges package to find overlaps between multiple genomic tracks stored as GRanges objects. In the metadata section of the GRanges object, I store the feature's score data and I have been wondering if you can perform any operations with this data. For example, I would like to perform a sliding window analysis, where score values would be averaged for every window of a defined range? Is this possible using GenomicRanges? Even if I use the reduce function, the metadata gets lost from the resulting object - is there any possibility to retain or operate on metadata? Thank you for any input on this! I wish you all a good day, Ales ****************** Ales Maver Institute of Medical Genetics, Department of Obstetrics and Gynaecology UMC Ljubljana Å lajmerjeva 3 SI-1000 Ljubljana Slovenia Tel/ fax +38615401137 GSM: +38631710721 E-mail: Ales.Maver@gmail.com <ales.maver@gmail.com> [[alternative HTML version deleted]]
Genetics GenomicRanges Genetics GenomicRanges • 1.2k views
ADD COMMENT
0
Entering edit mode
@michael-lawrence-3846
Last seen 2.4 years ago
United States
On Wed, Jun 27, 2012 at 11:39 AM, Aleš Maver <ales.maver@gmail.com> wrote: > Dear BioConductors! > > I have been using functions in GenomicRanges package to find overlaps > between multiple genomic tracks stored as GRanges objects. In the metadata > section of the GRanges object, I store the feature's score data and I have > been wondering if you can perform any operations with this data. For > example, I would like to perform a sliding window analysis, where score > values would be averaged for every window of a defined range? Is this > possible using GenomicRanges? > Even if I use the reduce function, the metadata gets lost from the > resulting object - is there any possibility to retain or operate on > metadata? > > The metadata is discarded, since the features may have been fundamentally altered by the reduce operation. As far as window-based computations, there is no easy way. If your data makes sense as a genome-length vector, with zeros between the features, you could use coverage(gr, weight = "score") to get the score as an RleList. Then use functions like runmean(). If zeros in the gaps do not make sense, you will need to somehow set them to NA to exclude them. Michael > Thank you for any input on this! > > I wish you all a good day, > Ales > > ****************** > Ales Maver > Institute of Medical Genetics, Department of Obstetrics and Gynaecology > UMC Ljubljana > Šlajmerjeva 3 > SI-1000 Ljubljana > Slovenia > Tel/ fax +38615401137 > GSM: +38631710721 > E-mail: Ales.Maver@gmail.com <ales.maver@gmail.com> > > [[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]]
ADD COMMENT
0
Entering edit mode
Michael, thank you very much for the explanation! I will definitely try the weighted coverage option. Thanks again and all the best! Ales Maver, MD Institute of Medical Genetics, Department of Obstetrics and Gynaecology UMC Ljubljana Šlajmerjeva 3 SI-1000 Ljubljana Slovenia Tel/ fax +38615401137 GSM: +38631710721 E-mail: Ales.Maver@gmail.com <ales.maver@gmail.com> 2012/6/27 Michael Lawrence <lawrence.michael@gene.com> > > > On Wed, Jun 27, 2012 at 11:39 AM, Aleš Maver <ales.maver@gmail.com> wrote: > >> Dear BioConductors! >> >> I have been using functions in GenomicRanges package to find overlaps >> between multiple genomic tracks stored as GRanges objects. In the metadata >> section of the GRanges object, I store the feature's score data and I have >> been wondering if you can perform any operations with this data. For >> example, I would like to perform a sliding window analysis, where score >> values would be averaged for every window of a defined range? Is this >> possible using GenomicRanges? >> Even if I use the reduce function, the metadata gets lost from the >> resulting object - is there any possibility to retain or operate on >> metadata? >> >> > The metadata is discarded, since the features may have been fundamentally > altered by the reduce operation. > > As far as window-based computations, there is no easy way. If your data > makes sense as a genome-length vector, with zeros between the features, you > could use coverage(gr, weight = "score") to get the score as an RleList. > Then use functions like runmean(). If zeros in the gaps do not make sense, > you will need to somehow set them to NA to exclude them. > > Michael > > >> Thank you for any input on this! >> >> I wish you all a good day, >> Ales >> >> ****************** >> Ales Maver >> Institute of Medical Genetics, Department of Obstetrics and Gynaecology >> UMC Ljubljana >> Šlajmerjeva 3 >> SI-1000 Ljubljana >> Slovenia >> Tel/ fax +38615401137 >> GSM: +38631710721 >> E-mail: Ales.Maver@gmail.com <ales.maver@gmail.com> >> >> [[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]]
ADD REPLY

Login before adding your answer.

Traffic: 416 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6