require(Gviz)

dhs.tracks <-
  list(CD14=DataTrack(range='~/BAMs/CD14-DNase.signal.bw',
                      background.title='hotpink',
                      genome="hg19",
                      size=1,
                      window=-1,
                      type=c('h'),
                      col='hotpink',
                      fill='hotpink',
                      name = "CD14 DHS"),
       CD34=DataTrack(range='~/BAMs/CD34-DNase.signal.bw',
                      background.title='hotpink',
                      genome="hg19",
                      window=-1,
                      type=c('h'),
                      col='hotpink',
                      fill='hotpink',
                      size=1,
                      name = "CD34 DHS"),
       K562=DataTrack(range='~/BAMs/K562-DNase.signal.bw',
                      background.title='hotpink',
                      genome="hg19",
                      window=-1,
                      type=c('h'),
                      col='hotpink',
                      fill='hotpink',
                      size=1,
                      name="K562 DHS")
       )

Then blob in the ones you want with others.  I really need to clean up my
Gviz plotting code, it's a bit out of control at the moment.  I have
functions that "do" certain "things" (plot leukemic vs. normal samples,
mutant vs. wild-type, bulk vs. sorted) but the useful bits are little
snippets like the above.  Eventually I usually crash R from having too many
references dangling everywhere :-)

note: the above type of code shouldn't cause that, which is why I am
sharing it.

best,

--t



Statistics is the grammar of science.
Karl Pearson <http://en.wikipedia.org/wiki/The_Grammar_of_Science>


On Thu, May 15, 2014 at 11:03 AM, Lance Parsons <lparsons@princeton.edu>wrote:

>  Thanks Tim.  That does look like it could work.  If you have some code,
> I'd certainly appreciate taking a look at it.
>
> Lance
>
>
> Tim Triche, Jr. wrote:
>
> I haven't the foggiest how to replicate the smoothing but if you use
> BigWigs for (e.g.) DNAse hypersensitivity with plot type 'histogram', you
> get things like this.  If that works for you I can certainly send the code
> to do it
>
>
>  Statistics is the grammar of science.
> Karl Pearson <http://en.wikipedia.org/wiki/The_Grammar_of_Science>
>
>
> On Thu, May 15, 2014 at 9:36 AM, Lance Parsons <lparsons@princeton.edu>wrote:
>
>> I have been using Gviz to display coverage plots quite nicely using the
>> new AlignmentsTrack, however, I've now run into a bit of an issue.
>> There are some regions where we have very deep coverage (>20000 reads).
>> This is causing Gviz to use excessive amounts of memory and thus makes
>> plotting these regions unfeasible.
>>
>> Since I only need to plot coverage, I thought a solution might be to use
>> bedgraph or bigwig files and the DataTrack class to plot these.
>> However, it appears that the AlignmentsTrack object does some nice
>> smoothing of the data when plotting.  When I plot the coverage using a
>> "polygon" type in the DataTrack class, the plot does not look comparable
>> to my other plots and indeed doesn't look very nice.
>>
>> Any suggestions on how to either get the AlignmentsTrack class to handle
>> very deep data for coverage plots only or to replicate the smoothing in
>> the DataTracks class? Thanks.
>>
>> --
>> Lance Parsons - Scientific Programmer
>> 134 Carl C. Icahn Laboratory
>> Lewis-Sigler Institute for Integrative Genomics
>> Princeton University
>>
>> _______________________________________________
>> 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
>>
>
>
> --
> Lance Parsons - Scientific Programmer
> 134 Carl C. Icahn Laboratory
> Lewis-Sigler Institute for Integrative Genomics
> Princeton University
>
>

	[[alternative HTML version deleted]]

