That&#39;s right.<div><br></div><div>Lincoln<br><br><div class="gmail_quote">On Mon, Apr 26, 2010 at 1:49 PM, Jayaraman, Pushkala <span dir="ltr">&lt;<a href="mailto:pjayaraman@mcw.edu">pjayaraman@mcw.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">








<div lang="EN-US" link="blue" vlink="purple">

<div>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">So all that I have to do is generate histograms in GFF and use
Bio::DB::GFF in the conf file for this track instead?</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Pushkala</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">

<p class="MsoNormal"><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt">
<a href="mailto:gmodhelp@googlemail.com" target="_blank">gmodhelp@googlemail.com</a> [mailto:<a href="mailto:gmodhelp@googlemail.com" target="_blank">gmodhelp@googlemail.com</a>] <b>On Behalf Of </b>Dave
Clements, GMOD Help Desk<br>
<b>Sent:</b> Monday, April 26, 2010 12:32 PM<br>
<b>To:</b> Jayaraman, Pushkala<br>
<b>Cc:</b> Wes Barris; <a href="mailto:gmod-gbrowse@lists.sourceforge.net" target="_blank">gmod-gbrowse@lists.sourceforge.net</a><br>
<b>Subject:</b> Re: [Gmod-gbrowse] Create SNP density track</span></p>

</div><div><div></div><div class="h5">

<p class="MsoNormal"> </p>

<p class="MsoNormal">Hi Pushkala,</p>

<div>

<p class="MsoNormal"> </p>

</div>

<div>

<p class="MsoNormal">I don&#39;t believe there is any difference between how this is
handled in the two different versions of GBrowse.</p>

</div>

<div>

<p class="MsoNormal"> </p>

</div>

<div>

<p class="MsoNormal" style="margin-bottom:12.0pt">Dave C</p>

<div>

<p class="MsoNormal">On Mon, Apr 19, 2010 at 11:30 PM, Jayaraman, Pushkala &lt;<a href="mailto:pjayaraman@mcw.edu" target="_blank">pjayaraman@mcw.edu</a>&gt; wrote:</p>

<p class="MsoNormal">Hello,<br>
This may be a repeat question:<br>
<br>
Is the command on gbrowse2 different or creating snp density track?<br>
In gbrowse1.7:<br>
========================================================================<br>
========================================<br>
<br>
Generating Feature Frequency histograms<br>
<br>
Note: this applies to GFF2 databases only and needs to be rewritten<br>
slightly for GFF3<br>
With a little bit of additional effort, you can set one or more tracks<br>
up to display a density histogram of the features contained within the<br>
track. For example, the human data source in the GBrowse demo uses<br>
density histograms in the chromosomal overview. In addition, when the<br>
features in the SNP track become too dense to view, this track converts<br>
into a histogram. To see this in action, turn on the SNP track and then<br>
zoom out beyond 150K - Link plz?<br>
There are four steps for making histograms:<br>
generate the density data using the <a href="http://bp_generate_histogram.pl" target="_blank">bp_generate_histogram.pl</a> script.<br>
load the density data using <a href="http://bp_load_gff.pl" target="_blank">bp_load_gff.pl</a>
or <a href="http://bp_fast_load_gff.pl" target="_blank">bp_fast_load_gff.pl</a>.<br>
declare a density aggregator to the gbrowse configuration file<br>
add the density aggregator to the appropriate track in the configuration<br>
file.<br>
The first step is to generate the density data. Currently this is done<br>
by generating a GFF file containing a set of &quot;bin&quot; feature types. Use<br>
the <a href="http://bp_generate_histogram.pl" target="_blank">bp_generate_histogram.pl</a>
script to do this. You will find it in<br>
BioPerl under the scripts/Bio-DB-GFF directory.<br>
Assuming that your database is named &quot;dicty&quot;, you have a feature
named<br>
SNP, and you wish to generate a density distribution across 10,000 bp<br>
bins, here is the command you would use:<br>
 <a href="http://bp_generate_histogram.pl" target="_blank">bp_generate_histogram.pl</a>
-merge -d dicty -bin 10000 SNP<br>
&gt;snp_density.gff<br>
This is saying to use the &quot;dicty&quot; database (-d) option, to use 10,000
bp<br>
bins (the -bin option) and to count the occurrences of the SNP feature<br>
throughout the database. In addition, the -merge option says to merge<br>
all types of SNPs into a single bin. Otherwise they will be stratified<br>
by their source. The resulting GFF file contains a series of entries<br>
like these ones:<br>
 Chr1  SNP bin 1     10000 49 + . bin Chr1:SNP<br>
 Chr1  SNP bin 10001 20000 29 + . bin Chr1:SNP<br>
What this is saying is that there are now a series of pseudo-features of<br>
type &quot;bin:SNP&quot; that occupy successive 10,000 bp regions of the
genome.<br>
The score field contains the number of times a SNP was seen in that bin.<br>
You&#39;ll now load this file using <a href="http://bp_load_gff.pl" target="_blank">bp_load_gff.pl</a>
or <a href="http://bp_fast_load_gff.pl" target="_blank">bp_fast_load_gff.pl</a>:<br>
 <a href="http://bp_load_gff.pl" target="_blank">bp_load_gff.pl</a> -d
dicty snp_density.gff<br>
The next step is to tell GBrowse how to use this information. You do<br>
this by creating a new aggregator for the SNP density information. Open<br>
the GBrowse configuration file and find the aggregators option. Add a<br>
new aggregator that looks like this:<br>
 aggregators = snp_density{bin:SNP}<br>
This is declaring a new feature named &quot;snp_density&quot; that is composed
of<br>
subparts of type bin:SNP.<br>
The last step is to declare a track for the density information. You<br>
will use the &quot;xyplot&quot; glyph, which can draw a number of graphs,<br>
including histograms. To add the SNP density information as a static<br>
track in the overview, create a section like this one:<br>
[SNP:overview]<br>
feature       = snp_density<br>
glyph         = xyplot<br>
graph_type    = boxes<br>
scale         = right<br>
bgcolor       = red<br>
fgcolor       = red<br>
height        = 20<br>
key           = SNP Density<br>
This is declaring a new constant track in the overview named &quot;SNP<br>
Density.&quot; The feature is &quot;snp_density&quot;, corresponding to the
aggregator<br>
declared earlier. The glyph is &quot;xyplot&quot; using the graph type of
&quot;boxes&quot;<br>
to generate a column graph.<br>
To set up a track so that the histogram appears when the user zooms out<br>
beyond 100,000 bp but shows the detailed information at higher<br>
magnifications, generate two track sections like these:<br>
 [SNPs]<br>
 feature       = snp<br>
 glyph         = triangle<br>
 point         = 1<br>
 orient        = N<br>
 height        = 6<br>
 bgcolor       = blue<br>
 fgcolor       = blue<br>
 key           = SNPs<br>
 [SNPs:100000]<br>
 feature       = snp_density<br>
 glyph         = xyplot<br>
 graph_type    = boxes<br>
 scale         = right<br>
The first track section sets up the defaults for the SNP track. SNPs are<br>
represented as blue triangles pointing North. The second track<br>
declaration declares that when the user zooms out to over 100K base<br>
pairs, GBrowse should display the snp_density feature using the xyplot<br>
glyph.<br>
<br>
========================================================================<br>
=============================<br>
<br>
How different is this for gbrowse2?<br>
<br>
<br>
Pushkala<br>
<br>
------------------------------------------------------------------------------<br>
Download Intel&amp;#174; Parallel Studio Eval<br>
Try the new software tools for yourself. Speed compiling, find bugs<br>
proactively, and fine-tune applications for parallel performance.<br>
See why Intel Parallel Studio got high marks during beta.<br>
<a href="http://p.sf.net/sfu/intel-sw-dev" target="_blank">http://p.sf.net/sfu/intel-sw-dev</a><br>
_______________________________________________<br>
Gmod-gbrowse mailing list<br>
<a href="mailto:Gmod-gbrowse@lists.sourceforge.net" target="_blank">Gmod-gbrowse@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse" target="_blank">https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse</a></p>

</div>

<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<br clear="all">
<br>
-- <br>
===&gt; PLEASE KEEP RESPONSES ON THE LIST &lt;===<br>
<a href="http://gmod.org/wiki/GMOD_Logo_Program" target="_blank">http://gmod.org/wiki/GMOD_Logo_Program</a><br>
<a href="http://gmod.org/wiki/GMOD_News" target="_blank">http://gmod.org/wiki/GMOD_News</a><br>
Was this helpful? <a href="http://gmod.org/wiki/Help_Desk_Feedback" target="_blank">http://gmod.org/wiki/Help_Desk_Feedback</a></p>

</div>

</div></div></div>

</div>


</blockquote></div><br><br clear="all"><br>-- <br>Lincoln D. Stein<br>Director, Informatics and Biocomputing Platform<br>Ontario Institute for Cancer Research<br>101 College St., Suite 800<br>Toronto, ON, Canada M5G0A3<br>
416 673-8514<br>Assistant: Renata Musa &lt;<a href="mailto:Renata.Musa@oicr.on.ca">Renata.Musa@oicr.on.ca</a>&gt;<br>
</div>