mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Trackster: bug fixes for read filtering.
This commit is contained in:
@@ -718,7 +718,7 @@ class BamDataProvider( TracksDataProvider, FilterableMixin ):
|
||||
else:
|
||||
results.append( [ "%i_%s" % ( read.pos, qname ),
|
||||
read.pos, read.pos + read_len, qname,
|
||||
read.cigar, strand, read.seq, [read.mapq, 125] ] )
|
||||
read.cigar, strand, read.seq, read.mapq ] )
|
||||
|
||||
# Take care of reads whose mates are out of range.
|
||||
# TODO: count paired reads when adhering to max_vals?
|
||||
|
||||
@@ -2480,14 +2480,27 @@ extend(NumberFilter.prototype, {
|
||||
return updated;
|
||||
}
|
||||
|
||||
//
|
||||
// Update filter's min, max based on element values.
|
||||
if (element[this.index] < this.min) {
|
||||
this.min = Math.floor(element[this.index]);
|
||||
updated = true;
|
||||
//
|
||||
|
||||
// Make value(s) into an Array.
|
||||
var values = element[this.index];
|
||||
if (!(values instanceof Array)) {
|
||||
values = [values];
|
||||
}
|
||||
if (element[this.index] > this.max) {
|
||||
this.max = Math.ceil(element[this.index]);
|
||||
updated = true;
|
||||
|
||||
// Loop through values and update min, max.
|
||||
for (var i = 0; i < values.length; i++) {
|
||||
var value = values[i];
|
||||
if (value < this.min) {
|
||||
this.min = Math.floor(value);
|
||||
updated = true;
|
||||
}
|
||||
if (value > this.max) {
|
||||
this.max = Math.ceil(value);
|
||||
updated = true;
|
||||
}
|
||||
}
|
||||
return updated;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user