commit/galaxy-central: jgoecks: Fix issues with genomes API: handle periods in keys, fix typo, and list genomes when querying.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/e8fc8e57dadc/ changeset: e8fc8e57dadc user: jgoecks date: 2012-10-03 23:49:30 summary: Fix issues with genomes API: handle periods in keys, fix typo, and list genomes when querying. affected #: 2 files diff -r f78de6cddd0f240aede5f02911379db7102981e2 -r e8fc8e57dadc8a1254d994e4e05f40271d7e856b lib/galaxy/visualization/genomes.py --- a/lib/galaxy/visualization/genomes.py +++ b/lib/galaxy/visualization/genomes.py @@ -236,7 +236,7 @@ if not len_ds: genome = self.genomes[ dbkey ] else: - gneome = Genome( dbkey, len_file=len_ds.file_name ) + genome = Genome( dbkey, len_file=len_ds.file_name ) return genome.to_dict( num=num, chrom=chrom, low=low ) diff -r f78de6cddd0f240aede5f02911379db7102981e2 -r e8fc8e57dadc8a1254d994e4e05f40271d7e856b lib/galaxy/webapps/galaxy/api/genomes.py --- a/lib/galaxy/webapps/galaxy/api/genomes.py +++ b/lib/galaxy/webapps/galaxy/api/genomes.py @@ -5,6 +5,12 @@ def is_true ( a_str ): return is_true == True or a_str in [ 'True', 'true', 'T', 't' ] +def get_id( base, format ): + if format: + return "%s.%s" % ( base, format ) + else: + return base + class GenomesController( BaseAPIController ): """ RESTful controller for interactions with genome data. @@ -16,7 +22,7 @@ GET /api/genomes: returns a list of installed genomes """ - return [] + return self.app.genomes.get_dbkeys_with_chrom_info( trans ) @web.json def show( self, trans, id, num=None, chrom=None, low=None, high=None, **kwd ): @@ -27,6 +33,7 @@ """ # Process kwds. + id = get_id( id, kwd.get( 'format', None ) ) reference = is_true( kwd.get( 'reference', False ) ) # Return info. 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