The minFeatWidth test only comes into play when the feature is less than
1% of the width of the block that it's in (where the block width is
usually around 200px wide), so that it doesn't make sense to draw the
subfeatures because they would probably not be visible on the user's screen.
So, if you have subfeatureScale set to 0, it should always draw the
subfeatures until it gets small enough to be below minFeatWidth.
Also, are you sure you have subfeatureScale under 'style' in the
configuration? The trackList.json should look something like:
tracks: [
...
{
"label": "myCoolTrack",
...
"style": {
...
"subfeatureScale": 0
...
}
}
...
]
If all of this still doesn't work, the next step would be to send me the
URL of your JBrowse instance so I can look at it and diagnose it first-hand.
Robert Buels
Lead Developer
JBrowse - http://jbrowse.org
On 07/23/2012 11:43 AM, Hernán Bondino wrote:
> Hi, sorry for the delay.
>
> No, it doesn't work. I tried with one single feature in the track,
> the level of zoom at which the subfeature shows up is the same as before.
>
> I am trying to see a feature of 100 bp with a subfeature of 100 bp in
> a chromosome of 22,000,000 bp, it only appears when the zoom shows
> 25.000 bp.
>
> I'm not an expert, but maybe in this case
> featwidth < minFeatWidth
> then
> featwidth > minFeatWidth is not true
> and
> scale >= this.subfeatureScale is not applied
>
> But I'm just guessing
>
>
>
> On Fri, Jul 13, 2012 at 2:05 PM, Robert Buels <rbuels@...
> <mailto:rbuels@...>> wrote:
>
> The display of subfeatures is influenced both by the
> subfeatureScale, property, *and* by the feature density (total
> number of features in the track's dataset divided by the length of
> the reference sequence in bp).
>
> See
>
> https://github.com/GMOD/__jbrowse/blob/1.4.2-release/js/__FeatureTrack.js#L119
> <https://github.com/GMOD/jbrowse/blob/1.4.2-release/js/FeatureTrack.js#L119>
>
> https://github.com/GMOD/__jbrowse/blob/1.4.2-release/js/__FeatureTrack.js#L695
> <https://github.com/GMOD/jbrowse/blob/1.4.2-release/js/FeatureTrack.js#L695>
>
> In the code, `scale` is the number of pixels per base pair in the
> current zoom level. So, the comparison (with units) is:
>
> scale (px/bp) >? feature density (features/bp) * subfeatureScale
> (px/feature)
>
> Setting a value of 0 for subfeatureScale will mean that subfeatures
> will always be shown.
>
> Does that help?
>
>
> Robert Buels
> Lead Developer
> JBrowse - http://jbrowse.org
>
> On 07/13/2012 10:36 AM, Hernán Bondino wrote:
>
> Hi Robert,
>
> "histScale" : 0 now works perfect,
>
> With "subfeatureScale" I can make that the subfeatures be shown at
> deeper zooms,
> but not at lower zooms, I mean,
>
> "subfeatureScale" : 300000 shows the subfeatures only in the
> deepest zoom
>
> but
>
> "subfeatureScale" : 0 makes no difference with the standard zoom
> level
>
> I think this is related with the size of the feature to show,
> because at some medium levels of zoom, in the same track, the
> subfeatures
> for blocks of 200 bp are shown but the subfeatures for blocks of
> 100 bp
> aren't.
>
> Do you have any idea?
>
> Hernán
>
>
|