commit/galaxy-central: jgoecks: Trackster and data providers: fix and document one-off/coordinate systems used for different track types.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/53aacf94c5fc/ changeset: 53aacf94c5fc user: jgoecks date: 2012-08-03 17:20:43 summary: Trackster and data providers: fix and document one-off/coordinate systems used for different track types. affected #: 2 files diff -r da7821adf629620b239c9f5c5e1381eaf4c3ff7b -r 53aacf94c5fc2e837975d15cc1bcc22d146db659 lib/galaxy/visualization/tracks/data_providers.py --- a/lib/galaxy/visualization/tracks/data_providers.py +++ b/lib/galaxy/visualization/tracks/data_providers.py @@ -688,7 +688,8 @@ class BamDataProvider( TracksDataProvider, FilterableMixin ): """ - Provides access to intervals from a sorted indexed BAM file. + Provides access to intervals from a sorted indexed BAM file. Position data + is reported in 1-based, closed format, i.e. SAM/BAM format. """ def get_filters( self ): @@ -987,6 +988,10 @@ return f, BigBedFile(file=f) class BigWigDataProvider ( BBIDataProvider ): + """ + Provides data from BigWig files; position data is reported in 1-based + coordinate system, i.e. wiggle format. + """ def _get_dataset( self ): if self.converted_dataset is not None: f = open( self.converted_dataset.file_name ) diff -r da7821adf629620b239c9f5c5e1381eaf4c3ff7b -r 53aacf94c5fc2e837975d15cc1bcc22d146db659 static/scripts/viz/trackster.js --- a/static/scripts/viz/trackster.js +++ b/static/scripts/viz/trackster.js @@ -4201,6 +4201,9 @@ } }); +/** + * Track displays continuous/numerical data. Track expects position data in 1-based format, i.e. wiggle format. + */ var LineTrack = function (view, container, obj_dict) { var track = this; this.display_modes = ["Histogram", "Line", "Filled", "Intensity"]; @@ -4420,6 +4423,9 @@ } }); +/** + * A track that displays features/regions. Track expects position data in BED format, i.e. 0-based, half-open. + */ var FeatureTrack = function(view, container, obj_dict) { // // Preinitialization: do things that need to be done before calling Track and TiledTrack @@ -4913,6 +4919,9 @@ extend(VcfTrack.prototype, Drawable.prototype, TiledTrack.prototype, FeatureTrack.prototype); +/** + * Track that displays mapped reads. Track expects position data in 1-based, closed format, i.e. SAM/BAM format. + */ var ReadTrack = function (view, container, obj_dict) { FeatureTrack.call(this, view, container, obj_dict); @@ -5847,7 +5856,8 @@ // Go left if it clips base_offset -= cig_len; } - var seq_start = feature_start + base_offset, + // -1 for feature start because data is using 1-based offset but display is 0-based. + var seq_start = (feature_start - 1) + base_offset, s_start = Math.floor( Math.max(0, (seq_start - tile_low) * w_scale) ), s_end = Math.floor( Math.max(0, (seq_start + cig_len - tile_low) * w_scale) ); Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket