RangedData Element Metadata
1
0
Entering edit mode
Dario Strbenac ★ 1.5k
@dario-strbenac-5916
Last seen 2 days ago
Australia
Hello, I have two bigWig files read in by using a function from rtracklayer. I'm trying to do a simple subtraction of the coverage values. I use diff <- values(bws[[2]])[,1] - values(bws[[1]])[,1] I'd like to assign this to one of the bws and write it out again, but I can't because values <- requires a SplitDataFrameList. I had a look at the function definition : SplitDataFrameList(..., compress = TRUE, cbindArgs = FALSE) on page 9 of the reference manual and then I tried to use it, by converting diff to a data.frame first, but seemingly there is no constructor : > SplitDataFrameList(tmp) Error: could not find function "SplitDataFrameList" How can I put the diff values back into one of the RangedData objects ? > sessionInfo() R version 2.14.2 (2012-02-29) Platform: x86_64-unknown-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_AU.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_AU.UTF-8 LC_COLLATE=en_AU.UTF-8 [5] LC_MONETARY=en_AU.UTF-8 LC_MESSAGES=en_AU.UTF-8 [7] LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] parallel stats graphics grDevices utils datasets methods [8] base other attached packages: [1] rtracklayer_1.14.4 RCurl_1.91-1 bitops_1.0-4.1 loaded via a namespace (and not attached): [1] Biobase_2.11.10 Biostrings_2.22.0 BSgenome_1.19.6 [4] GenomicRanges_1.6.7 IRanges_1.12.6 tools_2.14.2 [7] XML_3.4-0 zlibbioc_1.0.1 -------------------------------------- Dario Strbenac Research Assistant Cancer Epigenetics Garvan Institute of Medical Research Darlinghurst NSW 2010 Australia
Coverage rtracklayer ASSIGN Coverage rtracklayer ASSIGN • 1.0k views
ADD COMMENT
0
Entering edit mode
@michael-lawrence-3846
Last seen 2.9 years ago
United States
On Thu, Mar 29, 2012 at 11:00 PM, Dario Strbenac <d.strbenac@garvan.org.au>wrote: > Hello, > > I have two bigWig files read in by using a function from rtracklayer. I'm > trying to do a simple subtraction of the coverage values. I use > > diff <- values(bws[[2]])[,1] - values(bws[[1]])[,1] > > I'd like to assign this to one of the bws and write it out again, but I > can't because values <- requires a SplitDataFrameList. > > I think it's as simple as: score(bws[[1]]) <- score(bws[[2]]) - score(bws[[1]]) Or: bws[[1]][,1] <- diff Or: bws[[1]][,"score"] <- diff Or: bws[[1]]$score <- diff > I had a look at the function definition : SplitDataFrameList(..., compress > = TRUE, cbindArgs = FALSE) > on page 9 of the reference manual and then I tried to use it, by > converting diff to a data.frame first, but seemingly there is no > constructor : > > > SplitDataFrameList(tmp) > Error: could not find function "SplitDataFrameList" > > How can I put the diff values back into one of the RangedData objects ? > > > sessionInfo() > R version 2.14.2 (2012-02-29) > Platform: x86_64-unknown-linux-gnu (64-bit) > > locale: > [1] LC_CTYPE=en_AU.UTF-8 LC_NUMERIC=C > [3] LC_TIME=en_AU.UTF-8 LC_COLLATE=en_AU.UTF-8 > [5] LC_MONETARY=en_AU.UTF-8 LC_MESSAGES=en_AU.UTF-8 > [7] LC_PAPER=C LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C > > attached base packages: > [1] parallel stats graphics grDevices utils datasets methods > [8] base > > other attached packages: > [1] rtracklayer_1.14.4 RCurl_1.91-1 bitops_1.0-4.1 > > loaded via a namespace (and not attached): > [1] Biobase_2.11.10 Biostrings_2.22.0 BSgenome_1.19.6 > [4] GenomicRanges_1.6.7 IRanges_1.12.6 tools_2.14.2 > [7] XML_3.4-0 zlibbioc_1.0.1 > > -------------------------------------- > Dario Strbenac > Research Assistant > Cancer Epigenetics > Garvan Institute of Medical Research > Darlinghurst NSW 2010 > Australia > > _______________________________________________ > 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

Login before adding your answer.

Traffic: 751 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