Skip to content

Commit

Permalink
Use log scale by default
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Nov 18, 2018
1 parent 31c6bd3 commit 1672f73
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/JBrowse/Store/SeqFeature/BAM.js
Expand Up @@ -294,7 +294,7 @@ return declare( [ SeqFeatureStore, DeferredStatsMixin, DeferredFeaturesMixin, In
}
console.log(Object.keys(this.featureCache).length)
Object.entries(this.featureCache).forEach(([k, v]) => {
if(v._get('end') - v._get('start') < 10000 && (v._get('end') > query.start && v._get('start') < query.end)) {
if(v._get('end') - v._get('start') < 1000000 && (v._get('end') > query.start && v._get('start') < query.end)) {
featCallback(v)
}
})
Expand Down
9 changes: 6 additions & 3 deletions src/JBrowse/View/FeatureGlyph/PairedAlignment.js
Expand Up @@ -58,6 +58,8 @@ renderConnector( context, fRect ) {

_defaultConfig() {
return this._mergeConfigs(dojo.clone( this.inherited(arguments) ), {
readCloudLog: true,
readCloudStretch: 50,
style: {
connectorColor: '#333',
connectorThickness: 1,
Expand All @@ -73,10 +75,11 @@ layoutFeature(viewArgs, layout, feature) {
if(feature.pairedFeature()) {
var tlen = feature.read1.get('template_length')
var t = Math.abs(tlen)
var k = this.config.readCloudLog ? Math.log(t+1) : t
k *= this.config.readCloudStretch

// need to set the top of the inner rect
rect.rect.t = t / (this.config.scaleFactor||1);
rect.t = t / (this.config.scaleFactor||1);
rect.rect.t = k
rect.t = k
} else {
rect.t = 0
rect.rect.t = 0
Expand Down

0 comments on commit 1672f73

Please sign in to comment.