-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bigwig parsing and rendering support added #42
Changes from 19 commits
0b0b344
337952b
9516dc4
2a25369
888fac1
1f248e8
e4f5fd2
c3507bf
e1ebb5d
5ad69df
0eff5a6
95e8344
df694a7
1681509
649500c
77936dc
bbb4d5f
8d4a5d8
f01372b
ac462f9
35861db
bfc0257
1852edb
8d63894
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Genoverse.Track.Model.File.BIGWIG = Genoverse.Track.Model.Graph.Bar.extend({ | ||
|
||
getData : function(chr, start, end){ | ||
var model = this; | ||
var deferred = $.Deferred(); | ||
|
||
if(!this.url) this.data = new dallianceLib.BlobFetchable(this.track.dataFile); | ||
else this.data = new dallianceLib.URLFetchable(this.url); | ||
|
||
new BWReader(this.data, this.name, function(bw){ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
bw.getValues(chr, start, end, function(features){ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is possible for bw to be null - need to check for this and immediately resolve the deferred if it is the case |
||
model.receiveData(features, chr, start, end); | ||
deferred.resolveWith(model); | ||
}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please replace tabs with spaces |
||
}); | ||
|
||
return deferred; | ||
} | ||
}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add ; to the end of the file |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Genoverse.Track.File.BIGWIG = Genoverse.Track.Graph.Bar.extend({ | ||
model : Genoverse.Track.Model.File.BIGWIG, | ||
name : 'bigwig', | ||
height : 100 | ||
}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have seen files with both so adding this line will then allow suppor for both extensions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace the above two lines with
so that we don't make a new dallianceLib object every time getData is called
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohh right I will do that