rtracklayer GraphTrackLine
5
0
Entering edit mode
Dario Strbenac ★ 1.5k
@dario-strbenac-5916
Last seen 3 days ago
Australia
Hello, I'm running into difficulties into converting my track into a GraphTrackLine. I assume this is what I need to do next ? > library(rtracklayer) Loading required package: RCurl Loading required package: bitops > track1 <- import("myFolder/MBD2IP_1.bw") > track1 <- as(track1, "GraphTrackLine") Error in as(track1, "GraphTrackLine") : no method or default for coercing "RangedData" to "GraphTrackLine" I am aiming to convert it into a GraphTrackLine object so that I can set the viewLimits, color, etc. slots and then visualise it programatically with browserView() across about 100 windows. I also read about some wigTrackLine class in the user manual, and thought maybe that's what I need to use, but it seems not to exist anymore ? Thanks for your help. -------------------------------------- Dario Strbenac Research Assistant Cancer Epigenetics Garvan Institute of Medical Research Darlinghurst NSW 2010 Australia
convert convert • 1.3k views
ADD COMMENT
0
Entering edit mode
@michael-lawrence-3846
Last seen 2.4 years ago
United States
On Wed, May 5, 2010 at 5:32 PM, Dario Strbenac <d.strbenac@garvan.org.au>wrote: > Hello, > > I'm running into difficulties into converting my track into a > GraphTrackLine. I assume this is what I need to do next ? > > > library(rtracklayer) > Loading required package: RCurl > Loading required package: bitops > > track1 <- import("myFolder/MBD2IP_1.bw") > > track1 <- as(track1, "GraphTrackLine") > Error in as(track1, "GraphTrackLine") : > no method or default for coercing "RangedData" to "GraphTrackLine" > > You can convert your track to a UCSCData object, which has a trackline. The track itself cannot be represented by a single line. A lot of times, you don't even need to worry about this. For example, if you want to upload the track to the UCSC browser, you can specify track line parameters in the call to the track<- function. See the "Plotting the SNP track" example in the vignette. > I am aiming to convert it into a GraphTrackLine object so that I can set > the viewLimits, color, etc. slots and then visualise it programatically with > browserView() across about 100 windows. > > I also read about some wigTrackLine class in the user manual, and thought > maybe that's what I need to use, but it seems not to exist anymore ? > > Right the wigTrackLine has been replaced by the GraphTrackLine class. I'll fix the documentation. Thanks, Michael > Thanks for your help. > > -------------------------------------- > Dario Strbenac > Research Assistant > Cancer Epigenetics > Garvan Institute of Medical Research > Darlinghurst NSW 2010 > Australia > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > 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
Thanks for these tips. Just another problem, however. I'm having trouble loading in the tracks. I've tried copying the file to my hard drive and also using it from another computer on the network. # Try 1 library(rtracklayer) track1 <- import("C:/Users/dario/Documents/Garvan/Bre12p3_MBD2IP_1.bw") # Try 2 library(rtracklayer) track1 <- import("http://129.94.136.7/bw/Bre12p3_MBD2IP_1.bw") I killed both processes after 10 minutes. They each use 100% of 1 CPU. Could that mean an infinite loop somewhere ? I have also tried out other bigWigs, and it's the same result. Could you try to replicate the '# Try 2' snippet please ? The file should be web - accessible. I am using version 1.8.1 of the package and 2.11.0 R (for 64 bit Windows edition). Thanks. -------------------------------------- Dario Strbenac Research Assistant Cancer Epigenetics Garvan Institute of Medical Research Darlinghurst NSW 2010 Australia
ADD REPLY
0
Entering edit mode
@michael-lawrence-3846
Last seen 2.4 years ago
United States
On Thu, May 6, 2010 at 7:31 PM, Dario Strbenac <d.strbenac@garvan.org.au>wrote: > Thanks for these tips. > > Just another problem, however. I'm having trouble loading in the tracks. > I've tried copying the file to my hard drive and also using it from another > computer on the network. > > # Try 1 > library(rtracklayer) > track1 <- import("C:/Users/dario/Documents/Garvan/Bre12p3_MBD2IP_1.bw") > > # Try 2 > library(rtracklayer) > track1 <- import("http://129.94.136.7/bw/Bre12p3_MBD2IP_1.bw") > > I killed both processes after 10 minutes. They each use 100% of 1 CPU. > Could that mean an infinite loop somewhere ? I have also tried out other > bigWigs, and it's the same result. > > Could you try to replicate the '# Try 2' snippet please ? The file should > be web - accessible. > > I am using version 1.8.1 of the package and 2.11.0 R (for 64 bit Windows > edition). > > It seems to work fine on my Linux machine. I have never tested the bigwig support on Windows, and I'm not surprised that it's broken. The UCSC library that I use to parse them is not supported on Windows. I managed to hack it to get it to compile, but it's probably not close to working. Developing on Windows is a pain. If you have access to a Linux or Mac, give it a try. Note that for bigwig, since we're usually dealing with big files, you're expected to give it some notion of what you want out of the file. So you'll need something like: track1 <- import("http://129.94.136.7/bw/Bre12p3_MBD2IP_1.bw", selection = GenomicSelection("hg19")) To get the whole file, if it's for the hg19 genome. See BigWigSelection and GenomicSelection for more details. > Thanks. > > -------------------------------------- > Dario Strbenac > Research Assistant > Cancer Epigenetics > Garvan Institute of Medical Research > Darlinghurst NSW 2010 > Australia > [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
Hello again, I'm really close to having it all working now. It's just that when I try to pass some parameters to track() that you'd expect to be available, they don't seem to. e.g. > track(session, "Bre12 P3", priority = 1, viewLimits = c(0, 10), color = as(col2rgb("green"), "integer")) <- track1 Error in .local(object, con, variant, color, append, ...) : unused argument(s) (viewLimits = c(0, 10)) Is this something that is still in development perhaps ? Thanks, Dario
ADD REPLY
0
Entering edit mode
@michael-lawrence-3846
Last seen 2.4 years ago
United States
On Mon, May 10, 2010 at 7:12 PM, Dario Strbenac <d.strbenac@garvan.org.au>wrote: > Hello again, > > I'm really close to having it all working now. It's just that when I try to > pass some parameters to track() that you'd expect to be available, they > don't seem to. > > e.g. > > > track(session, "Bre12 P3", priority = 1, viewLimits = c(0, 10), color = > as(col2rgb("green"), "integer")) <- track1 > > Error in .local(object, con, variant, color, append, ...) : > unused argument(s) (viewLimits = c(0, 10)) > > Is this something that is still in development perhaps ? > > This is not a fully reproducible example, but my guess is that your 'track1' does not have a numeric "score" column. Thus, rtracklayer assumes you want to upload it as a BED track rather than as a graph track (either wig or bedGraph, depending on some complex logic). In that case, the graph- specific parameters are invalid. You can check this by calling as(track1, "UCSCData) and then checking the class of the 'trackLine' slot. To force the use of wig/bedGraph, simply pass format="wig" or format="bedGraph" to the track<- function. Michael > Thanks, > Dario > [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
Ah, right. I did a bit of inversigating, and I think it doesn't seem to like BigWigs. Here's my reproducible example : library(rtracklayer) track1 <- import("http://129.94.136.7/bw/Bre12p3_MBD2IP_1.bw", selection = GenomicSelection("hg18")) > track1 at values$chr1 DataFrame with 2928039 rows and 0 columns I don't think there would be a problem with the .bw file being corrupted or anything. We've seen it in UCSC browser before and it looks good. Thanks, Dario. ---- Original message ---- >Date: Mon, 10 May 2010 19:25:50 -0700 >From: Michael Lawrence <lawrence.michael at="" gene.com=""> >Subject: Re: [BioC] rtracklayer GraphTrackLine >To: D.Strbenac at garvan.org.au >Cc: Michael Lawrence <lawrence.michael at="" gene.com="">, bioconductor at stat.math.ethz.ch > > On Mon, May 10, 2010 at 7:12 PM, Dario Strbenac > <d.strbenac at="" garvan.org.au=""> wrote: > > Hello again, > > I'm really close to having it all working now. > It's just that when I try to pass some parameters > to track() that you'd expect to be available, they > don't seem to. > > e.g. > > > track(session, "Bre12 P3", priority = 1, > viewLimits = c(0, 10), color = > as(col2rgb("green"), "integer")) <- track1 > > Error in .local(object, con, variant, color, > append, ...) : > ?unused argument(s) (viewLimits = c(0, 10)) > > Is this something that is still in development > perhaps ? > > This is not a fully reproducible example, but my > guess is that your 'track1' does not have a numeric > "score" column. Thus, rtracklayer assumes you want > to upload it as a BED track rather than as a graph > track (either wig or bedGraph, depending on some > complex logic). In that case, the graph-specific > parameters are invalid. > > You can check this by calling as(track1, "UCSCData) > and then checking the class of the 'trackLine' slot. > To force the use of wig/bedGraph, simply pass > format="wig" or format="bedGraph" to the track<- > function. > > Michael > ? > > Thanks, > ? ? ? Dario -------------------------------------- Dario Strbenac Research Assistant Cancer Epigenetics Garvan Institute of Medical Research Darlinghurst NSW 2010 Australia
ADD REPLY
0
Entering edit mode
@michael-lawrence-3846
Last seen 2.4 years ago
United States
You need to tell it to read the scores in from the BigWig file, i.e. GenomicSelection("hg18", "score"). Michael On Mon, May 10, 2010 at 7:48 PM, Dario Strbenac <d.strbenac@garvan.org.au>wrote: > Ah, right. I did a bit of inversigating, and I think it doesn't seem to > like BigWigs. Here's my reproducible example : > > library(rtracklayer) > track1 <- import("http://129.94.136.7/bw/Bre12p3_MBD2IP_1.bw", selection = > GenomicSelection("hg18")) > > > track1@values$chr1 > DataFrame with 2928039 rows and 0 columns > > I don't think there would be a problem with the .bw file being corrupted or > anything. We've seen it in UCSC browser before and it looks good. > > Thanks, > Dario. > > ---- Original message ---- > >Date: Mon, 10 May 2010 19:25:50 -0700 > >From: Michael Lawrence <lawrence.michael@gene.com> > >Subject: Re: [BioC] rtracklayer GraphTrackLine > >To: D.Strbenac@garvan.org.au > >Cc: Michael Lawrence <lawrence.michael@gene.com>, > bioconductor@stat.math.ethz.ch > > > > On Mon, May 10, 2010 at 7:12 PM, Dario Strbenac > > <d.strbenac@garvan.org.au> wrote: > > > > Hello again, > > > > I'm really close to having it all working now. > > It's just that when I try to pass some parameters > > to track() that you'd expect to be available, they > > don't seem to. > > > > e.g. > > > > > track(session, "Bre12 P3", priority = 1, > > viewLimits = c(0, 10), color = > > as(col2rgb("green"), "integer")) <- track1 > > > > Error in .local(object, con, variant, color, > > append, ...) : > > unused argument(s) (viewLimits = c(0, 10)) > > > > Is this something that is still in development > > perhaps ? > > > > This is not a fully reproducible example, but my > > guess is that your 'track1' does not have a numeric > > "score" column. Thus, rtracklayer assumes you want > > to upload it as a BED track rather than as a graph > > track (either wig or bedGraph, depending on some > > complex logic). In that case, the graph-specific > > parameters are invalid. > > > > You can check this by calling as(track1, "UCSCData) > > and then checking the class of the 'trackLine' slot. > > To force the use of wig/bedGraph, simply pass > > format="wig" or format="bedGraph" to the track<- > > function. > > > > Michael > > > > > > Thanks, > > Dario > > > -------------------------------------- > Dario Strbenac > Research Assistant > Cancer Epigenetics > Garvan Institute of Medical Research > Darlinghurst NSW 2010 > Australia > [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
Correction: GenomicRanges("hg18", colnames = "score") On Mon, May 10, 2010 at 7:59 PM, Michael Lawrence <michafla@gene.com> wrote: > You need to tell it to read the scores in from the BigWig file, i.e. > GenomicSelection("hg18", "score"). > > Michael > > > > On Mon, May 10, 2010 at 7:48 PM, Dario Strbenac <d.strbenac@garvan.org.au>wrote: > >> Ah, right. I did a bit of inversigating, and I think it doesn't seem to >> like BigWigs. Here's my reproducible example : >> >> library(rtracklayer) >> track1 <- import("http://129.94.136.7/bw/Bre12p3_MBD2IP_1.bw", selection >> = GenomicSelection("hg18")) >> >> > track1@values$chr1 >> DataFrame with 2928039 rows and 0 columns >> >> I don't think there would be a problem with the .bw file being corrupted >> or anything. We've seen it in UCSC browser before and it looks good. >> >> Thanks, >> Dario. >> >> ---- Original message ---- >> >Date: Mon, 10 May 2010 19:25:50 -0700 >> >From: Michael Lawrence <lawrence.michael@gene.com> >> >Subject: Re: [BioC] rtracklayer GraphTrackLine >> >To: D.Strbenac@garvan.org.au >> >Cc: Michael Lawrence <lawrence.michael@gene.com>, >> bioconductor@stat.math.ethz.ch >> > >> > On Mon, May 10, 2010 at 7:12 PM, Dario Strbenac >> > <d.strbenac@garvan.org.au> wrote: >> > >> > Hello again, >> > >> > I'm really close to having it all working now. >> > It's just that when I try to pass some parameters >> > to track() that you'd expect to be available, they >> > don't seem to. >> > >> > e.g. >> > >> > > track(session, "Bre12 P3", priority = 1, >> > viewLimits = c(0, 10), color = >> > as(col2rgb("green"), "integer")) <- track1 >> > >> > Error in .local(object, con, variant, color, >> > append, ...) : >> > unused argument(s) (viewLimits = c(0, 10)) >> > >> > Is this something that is still in development >> > perhaps ? >> > >> > This is not a fully reproducible example, but my >> > guess is that your 'track1' does not have a numeric >> > "score" column. Thus, rtracklayer assumes you want >> > to upload it as a BED track rather than as a graph >> > track (either wig or bedGraph, depending on some >> > complex logic). In that case, the graph-specific >> > parameters are invalid. >> > >> > You can check this by calling as(track1, "UCSCData) >> > and then checking the class of the 'trackLine' slot. >> > To force the use of wig/bedGraph, simply pass >> > format="wig" or format="bedGraph" to the track<- >> > function. >> > >> > Michael >> > >> > >> > Thanks, >> > Dario >> >> >> -------------------------------------- >> Dario Strbenac >> Research Assistant >> Cancer Epigenetics >> Garvan Institute of Medical Research >> Darlinghurst NSW 2010 >> Australia >> > > [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
I mean GenomicSelection("hg18", colnames = "score") On Mon, May 10, 2010 at 8:08 PM, Michael Lawrence <michafla@gene.com> wrote: > Correction: GenomicRanges("hg18", colnames = "score") > > > On Mon, May 10, 2010 at 7:59 PM, Michael Lawrence <michafla@gene.com>wrote: > >> You need to tell it to read the scores in from the BigWig file, i.e. >> GenomicSelection("hg18", "score"). >> >> Michael >> >> >> >> On Mon, May 10, 2010 at 7:48 PM, Dario Strbenac <d.strbenac@garvan.org.au>> > wrote: >> >>> Ah, right. I did a bit of inversigating, and I think it doesn't seem to >>> like BigWigs. Here's my reproducible example : >>> >>> library(rtracklayer) >>> track1 <- import("http://129.94.136.7/bw/Bre12p3_MBD2IP_1.bw", selection >>> = GenomicSelection("hg18")) >>> >>> > track1@values$chr1 >>> DataFrame with 2928039 rows and 0 columns >>> >>> I don't think there would be a problem with the .bw file being corrupted >>> or anything. We've seen it in UCSC browser before and it looks good. >>> >>> Thanks, >>> Dario. >>> >>> ---- Original message ---- >>> >Date: Mon, 10 May 2010 19:25:50 -0700 >>> >From: Michael Lawrence <lawrence.michael@gene.com> >>> >Subject: Re: [BioC] rtracklayer GraphTrackLine >>> >To: D.Strbenac@garvan.org.au >>> >Cc: Michael Lawrence <lawrence.michael@gene.com>, >>> bioconductor@stat.math.ethz.ch >>> > >>> > On Mon, May 10, 2010 at 7:12 PM, Dario Strbenac >>> > <d.strbenac@garvan.org.au> wrote: >>> > >>> > Hello again, >>> > >>> > I'm really close to having it all working now. >>> > It's just that when I try to pass some parameters >>> > to track() that you'd expect to be available, they >>> > don't seem to. >>> > >>> > e.g. >>> > >>> > > track(session, "Bre12 P3", priority = 1, >>> > viewLimits = c(0, 10), color = >>> > as(col2rgb("green"), "integer")) <- track1 >>> > >>> > Error in .local(object, con, variant, color, >>> > append, ...) : >>> > unused argument(s) (viewLimits = c(0, 10)) >>> > >>> > Is this something that is still in development >>> > perhaps ? >>> > >>> > This is not a fully reproducible example, but my >>> > guess is that your 'track1' does not have a numeric >>> > "score" column. Thus, rtracklayer assumes you want >>> > to upload it as a BED track rather than as a graph >>> > track (either wig or bedGraph, depending on some >>> > complex logic). In that case, the graph-specific >>> > parameters are invalid. >>> > >>> > You can check this by calling as(track1, "UCSCData) >>> > and then checking the class of the 'trackLine' slot. >>> > To force the use of wig/bedGraph, simply pass >>> > format="wig" or format="bedGraph" to the track<- >>> > function. >>> > >>> > Michael >>> > >>> > >>> > Thanks, >>> > Dario >>> >>> >>> -------------------------------------- >>> Dario Strbenac >>> Research Assistant >>> Cancer Epigenetics >>> Garvan Institute of Medical Research >>> Darlinghurst NSW 2010 >>> Australia >>> >> >> > [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
I made a change for rtracklayer 1.9.2, so that this is possible: track1 <- import("http://129.94.136.7/bw/Bre12p3_MBD2IP_1.bw", ranges = "hg18") This works, because BigWigSelection() now takes a genome identifier as its 'ranges' parameter. That will bring in the score column by default. Easier? Michael On Mon, May 10, 2010 at 8:12 PM, Michael Lawrence <michafla@gene.com> wrote: > I mean GenomicSelection("hg18", colnames = "score") > > > On Mon, May 10, 2010 at 8:08 PM, Michael Lawrence <michafla@gene.com>wrote: > >> Correction: GenomicRanges("hg18", colnames = "score") >> >> >> On Mon, May 10, 2010 at 7:59 PM, Michael Lawrence <michafla@gene.com>wrote: >> >>> You need to tell it to read the scores in from the BigWig file, i.e. >>> GenomicSelection("hg18", "score"). >>> >>> Michael >>> >>> >>> >>> On Mon, May 10, 2010 at 7:48 PM, Dario Strbenac < >>> D.Strbenac@garvan.org.au> wrote: >>> >>>> Ah, right. I did a bit of inversigating, and I think it doesn't seem to >>>> like BigWigs. Here's my reproducible example : >>>> >>>> library(rtracklayer) >>>> track1 <- import("http://129.94.136.7/bw/Bre12p3_MBD2IP_1.bw", >>>> selection = GenomicSelection("hg18")) >>>> >>>> > track1@values$chr1 >>>> DataFrame with 2928039 rows and 0 columns >>>> >>>> I don't think there would be a problem with the .bw file being corrupted >>>> or anything. We've seen it in UCSC browser before and it looks good. >>>> >>>> Thanks, >>>> Dario. >>>> >>>> ---- Original message ---- >>>> >Date: Mon, 10 May 2010 19:25:50 -0700 >>>> >From: Michael Lawrence <lawrence.michael@gene.com> >>>> >Subject: Re: [BioC] rtracklayer GraphTrackLine >>>> >To: D.Strbenac@garvan.org.au >>>> >Cc: Michael Lawrence <lawrence.michael@gene.com>, >>>> bioconductor@stat.math.ethz.ch >>>> > >>>> > On Mon, May 10, 2010 at 7:12 PM, Dario Strbenac >>>> > <d.strbenac@garvan.org.au> wrote: >>>> > >>>> > Hello again, >>>> > >>>> > I'm really close to having it all working now. >>>> > It's just that when I try to pass some parameters >>>> > to track() that you'd expect to be available, they >>>> > don't seem to. >>>> > >>>> > e.g. >>>> > >>>> > > track(session, "Bre12 P3", priority = 1, >>>> > viewLimits = c(0, 10), color = >>>> > as(col2rgb("green"), "integer")) <- track1 >>>> > >>>> > Error in .local(object, con, variant, color, >>>> > append, ...) : >>>> > unused argument(s) (viewLimits = c(0, 10)) >>>> > >>>> > Is this something that is still in development >>>> > perhaps ? >>>> > >>>> > This is not a fully reproducible example, but my >>>> > guess is that your 'track1' does not have a numeric >>>> > "score" column. Thus, rtracklayer assumes you want >>>> > to upload it as a BED track rather than as a graph >>>> > track (either wig or bedGraph, depending on some >>>> > complex logic). In that case, the graph-specific >>>> > parameters are invalid. >>>> > >>>> > You can check this by calling as(track1, "UCSCData) >>>> > and then checking the class of the 'trackLine' slot. >>>> > To force the use of wig/bedGraph, simply pass >>>> > format="wig" or format="bedGraph" to the track<- >>>> > function. >>>> > >>>> > Michael >>>> > >>>> > >>>> > Thanks, >>>> > Dario >>>> >>>> >>>> -------------------------------------- >>>> Dario Strbenac >>>> Research Assistant >>>> Cancer Epigenetics >>>> Garvan Institute of Medical Research >>>> Darlinghurst NSW 2010 >>>> Australia >>>> >>> >>> >> > [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
Thanks, I'm happy to use either way. Just 1 more question, I now tried to do a simple example with just 1 bigWig because it was running slowly, and my example is : library(rtracklayer) library(grDevices) session <- browserSession("UCSC") track1 <- import("http://129.94.136.7/bw/Bre12p3_MBD2IP_1.bw", selection = GenomicSelection("hg18", colnames = "score")) # Using ver. 1.8.1 still. track1 <- as(track1, "UCSCData") track(session, "Bre12 P3", priority = 1, viewLimits = c(0, 10), color = as(col2rgb("green"), "integer")) <- track1 The actual .bw is only 438 Mb, so I'm curious about the resource (memory) usage ? PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 10572 darstr 20 0 9375m 9.1g 4876 S 0 57.7 15:26.58 R It's also curious that processing has stopped at this stage (i.e. I didn't get the > prompt yet), because the hard drive is hardly swapping, and I can open another R session that goes at 100% CPU (it's run on an 8 core computer).
ADD REPLY
0
Entering edit mode
@michael-lawrence-3846
Last seen 2.4 years ago
United States
On Tue, May 11, 2010 at 1:18 AM, Dario Strbenac <d.strbenac@garvan.org.au>wrote: > Thanks, I'm happy to use either way. > > Just 1 more question, I now tried to do a simple example with just 1 bigWig > because it was running slowly, and my example is : > > library(rtracklayer) > library(grDevices) > session <- browserSession("UCSC") > track1 <- import("http://129.94.136.7/bw/Bre12p3_MBD2IP_1.bw", selection = > GenomicSelection("hg18", colnames = "score")) # Using ver. 1.8.1 still. > track1 <- as(track1, "UCSCData") > track(session, "Bre12 P3", priority = 1, viewLimits = c(0, 10), color = > as(col2rgb("green"), "integer")) <- track1 > > The actual .bw is only 438 Mb, so I'm curious about the resource (memory) > usage ? > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 10572 darstr 20 0 9375m 9.1g 4876 S 0 57.7 15:26.58 R > > It's also curious that processing has stopped at this stage (i.e. I didn't > get the > prompt yet), because the hard drive is hardly swapping, and I can > open another R session that goes at 100% CPU (it's run on an 8 core > computer). > Sounds to me like it's network overhead. If the bigWig is 438 MB, then the wig/bedGraph data is going to be huge. It's important to realize that rtracklayer does not send tracks to UCSC as bigWig. This is because you need to give UCSC a URL on a web server. All rtracklayer has is a RangedData object in memory. Would it be useful for you to have rtracklayer write it out to some specified location, with a specified URL to pass to UCSC? In your case, you really only need to pass the URL. Michael [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
Yeah, that'd be a cool feature, since we're not doing any data manipulations with it - just getting a set of screenshots. Thanks for all the help over the last couple days ! ---- Original message ---- >Date: Tue, 11 May 2010 05:44:40 -0700 >From: Michael Lawrence <lawrence.michael at="" gene.com=""> >Subject: Re: [BioC] rtracklayer GraphTrackLine >To: D.Strbenac at garvan.org.au >Cc: Michael Lawrence <lawrence.michael at="" gene.com="">, bioconductor at stat.math.ethz.ch > > On Tue, May 11, 2010 at 1:18 AM, Dario Strbenac > <d.strbenac at="" garvan.org.au=""> wrote: > > Thanks, I'm happy to use either way. > > Just 1 more question, I now tried to do a simple > example with just 1 bigWig because it was running > slowly, and my example is : > > library(rtracklayer) > library(grDevices) > session <- browserSession("UCSC") > track1 <- > import("http://129.94.136.7/bw/Bre12p3_MBD2IP_1.bw", > selection = GenomicSelection("hg18", colnames = > "score")) # Using ver. 1.8.1 still. > track1 <- as(track1, "UCSCData") > track(session, "Bre12 P3", priority = 1, > viewLimits = c(0, 10), color = > as(col2rgb("green"), "integer")) <- track1 > > The actual .bw is only 438 Mb, so I'm curious > about the resource (memory) usage ? > > ?PID USER ? ? ?PR ?NI ?VIRT ?RES ?SHR S > %CPU %MEM ? ?TIME+ ?COMMAND > 10572 darstr ? ?20 ? 0 9375m 9.1g 4876 S ? ?0 > 57.7 ?15:26.58 R > > It's also curious that processing has stopped at > this stage (i.e. I didn't get the > prompt yet), > because the hard drive is hardly swapping, and I > can open another R session that goes at 100% CPU > (it's run on an 8 core computer). > > Sounds to me like it's network overhead. If the > bigWig is 438 MB, then the wig/bedGraph data is > going to be huge. It's important to realize that > rtracklayer does not send tracks to UCSC as bigWig. > This is because you need to give UCSC a URL on a web > server. All rtracklayer has is a RangedData object > in memory. Would it be useful for you to have > rtracklayer write it out to some specified location, > with a specified URL to pass to UCSC? In your case, > you really only need to pass the URL. > > Michael -------------------------------------- Dario Strbenac Research Assistant Cancer Epigenetics Garvan Institute of Medical Research Darlinghurst NSW 2010 Australia
ADD REPLY

Login before adding your answer.

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