commit/galaxy-central: jgoecks: Trackster: add BED and GFF support to visual analytics framework, and enable GOPS intersect and subtract tools to work with visual analytics.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/e1f0a0dc1493/ changeset: r5287:e1f0a0dc1493 user: jgoecks date: 2011-03-30 17:44:08 summary: Trackster: add BED and GFF support to visual analytics framework, and enable GOPS intersect and subtract tools to work with visual analytics. affected #: 5 files (885 bytes) --- a/lib/galaxy/visualization/tracks/data_providers.py Wed Mar 30 10:40:09 2011 -0400 +++ b/lib/galaxy/visualization/tracks/data_providers.py Wed Mar 30 11:44:08 2011 -0400 @@ -487,8 +487,19 @@ col_name_data_attr_mapping = { 4 : { 'index': 4 , 'name' : 'Score' } } def write_data_to_file( self, chrom, start, end, filename ): - # TODO: write function. - pass + source = open( self.original_dataset.file_name ) + index = Indexes( self.converted_dataset.file_name ) + out = open( filename, 'w' ) + for start, end, offset in index.find(chrom, start, end): + source.seek( offset ) + if isinstance( self.original_dataset.datatype, Gff ): + reader = GFFReaderWrapper( source, fix_strand=True ) + feature = reader.next() + for interval in feature.intervals: + out.write(interval.raw_line + '\n') + elif isinstance( self.original_dataset.datatype, Bed ): + out.write( source.readline() ) + out.close() def get_filters( self ): """ Returns a dataset's filters. """ --- a/lib/galaxy/web/controllers/tracks.py Wed Mar 30 10:40:09 2011 -0400 +++ b/lib/galaxy/web/controllers/tracks.py Wed Mar 30 11:44:08 2011 -0400 @@ -724,9 +724,13 @@ input_dataset.history.add_dataset( subset_dataset ) trans.sa_session.add( subset_dataset ) trans.app.security_agent.set_all_dataset_permissions( subset_dataset.dataset, hda_permissions ) - if input_dataset.extension == 'bam': - data_provider = BamDataProvider( original_dataset=input_dataset, converted_dataset=converted_dataset ) - data_provider.write_data_to_file( chrom, low, high, subset_dataset.file_name ) + + # Write data subset to new HDA. + data_provider_class = get_data_provider( original_dataset=input_dataset ) + data_provider = data_provider_class( original_dataset=input_dataset, + converted_dataset=converted_dataset ) + data_provider.write_data_to_file( chrom, low, high, subset_dataset.file_name ) + # TODO: size not working. subset_dataset.set_size() subset_dataset.info = "Data subset for trackster" --- a/static/scripts/trackster.js Wed Mar 30 10:40:09 2011 -0400 +++ b/static/scripts/trackster.js Wed Mar 30 11:44:08 2011 -0400 @@ -1392,6 +1392,7 @@ // Slider. var slider_div = $("<div/>").addClass("slider").appendTo(param_div); var slider = $("<div id='" + param.name + "-param-control'>").appendTo(slider_div); + // Step must have a value so that (max-min)%step == 0. slider.slider({ min: param.min, max: param.max, --- a/tools/new_operations/intersect.xml Wed Mar 30 10:40:09 2011 -0400 +++ b/tools/new_operations/intersect.xml Wed Mar 30 11:44:08 2011 -0400 @@ -28,7 +28,7 @@ <param format="interval,gff" name="input2" type="data" help="Second dataset"><label>that intersect</label></param> - <param name="min" size="4" type="integer" value="1" help="(bp)"> + <param name="min" size="4" type="integer" value="1" min="0" max="600000" help="(bp)"><label>for at least</label></param></inputs> --- a/tools/new_operations/subtract.xml Wed Mar 30 10:40:09 2011 -0400 +++ b/tools/new_operations/subtract.xml Wed Mar 30 11:44:08 2011 -0400 @@ -31,7 +31,7 @@ <option value="-p">Non-overlapping pieces of intervals</option></param> - <param name="min" size="4" type="integer" value="1" help="(bp)"> + <param name="min" size="4" type="integer" value="1" min="0" max="600000" help="(bp)"><label>where minimal overlap is</label></param></inputs> 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