details: http://www.bx.psu.edu/hg/galaxy/rev/073c9a0b2467
changeset: 2469:073c9a0b2467
user: Greg Von Kuster <greg(a)bx.psu.edu>
date: Wed Jul 08 17:01:49 2009 -0400
description:
Change folder.active_datasets mapper to a property, and correct the list of library_datasets it returns - fixes the 'bug' part of ticket # 102 reported by Ross Lazarus.
3 file(s) affected in this change:
lib/galaxy/model/__init__.py
lib/galaxy/model/mapping.py
lib/galaxy/web/controllers/admin.py
diffs (54 lines):
diff -r 035c0dc31963 -r 073c9a0b2467 lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py Wed Jul 08 15:25:57 2009 -0400
+++ b/lib/galaxy/model/__init__.py Wed Jul 08 17:01:49 2009 -0400
@@ -734,11 +734,17 @@
def active_components( self ):
return list( self.active_folders ) + list( self.active_datasets )
@property
+ def active_datasets( self ):
+ # This needs to be a list
+ return [ ld for ld in self.datasets if not ld.library_dataset_dataset_association.deleted ]
+ @property
def activatable_datasets( self ):
- return [ ld for ld in self.datasets if not ld.library_dataset_dataset_association.dataset.deleted ] #this needs to be a list
+ # This needs to be a list
+ return [ ld for ld in self.datasets if not ld.library_dataset_dataset_association.dataset.deleted ]
@property #make this a relation
def activatable_folders( self ):
- return [ folder for folder in self.folders if not folder.purged ] #this needs to be a list
+ # This needs to be a list
+ return [ folder for folder in self.folders if not folder.purged ]
class LibraryDataset( object ):
# This class acts as a proxy to the currently selected LDDA
diff -r 035c0dc31963 -r 073c9a0b2467 lib/galaxy/model/mapping.py
--- a/lib/galaxy/model/mapping.py Wed Jul 08 15:25:57 2009 -0400
+++ b/lib/galaxy/model/mapping.py Wed Jul 08 17:01:49 2009 -0400
@@ -706,11 +706,6 @@
primaryjoin=( ( LibraryDataset.table.c.folder_id == LibraryFolder.table.c.id ) ),
order_by=asc( LibraryDataset.table.c.order_id ),
lazy=False,
- viewonly=True ),
- active_datasets=relation( LibraryDataset,
- primaryjoin=( ( LibraryDataset.table.c.folder_id == LibraryFolder.table.c.id ) & ( not_( LibraryDataset.table.c.deleted ) ) ),
- order_by=asc( LibraryDataset.table.c.order_id ),
- lazy=False,
viewonly=True )
) )
diff -r 035c0dc31963 -r 073c9a0b2467 lib/galaxy/web/controllers/admin.py
--- a/lib/galaxy/web/controllers/admin.py Wed Jul 08 15:25:57 2009 -0400
+++ b/lib/galaxy/web/controllers/admin.py Wed Jul 08 17:01:49 2009 -0400
@@ -1937,10 +1937,11 @@
ldda = trans.app.model.LibraryDatasetDatasetAssociation.get( id )
ldda.deleted = True
ldda.flush()
- msg = "The selected datasets have been removed from this library"
+ msg = "The selected datasets have been removed from this library"
trans.response.send_redirect( web.url_for( controller='admin',
action='browse_library',
id=library_id,
+ show_deleted=False,
msg=util.sanitize_text( msg ),
messagetype='done' ) )
else:
Hello Galaxy team and Eckart,
It seems questions about zero/one based coordinates are frequent by new
galaxy users.
Some time ago I wrote a short summary (with screen shots) about the
different between one-based and zero-based coordinates in UCSC browser
(and by extension - in galaxy).
You're welcome to put it on your wiki, if you'd like.
-Gordon.
Eckart Bindewald wrote, On 07/07/2009 02:14 PM:
> Hello:
> thank you for providing the Galaxy server, it is a very impressive
> web application. I have a seemingly dumb but important question, and
> I could not find the information anywhere: what is the precise
> definition of an interval? Or: has the first residue of a chromosome
> the index zero or the index one? Is the end residue (the second
> number of an interval) the last residue of the interval, or one
> residue downstream with respect to the last residue included in the
> interval?
> Maybe questions like this can be included in the FAQ...
>
> Thanks in advance,
>
> Eckart Bindewald
>
> _______________________________________________
> galaxy-bugs mailing list
> galaxy-bugs(a)bx.psu.edu
> http://mail.bx.psu.edu/cgi-bin/mailman/listinfo/galaxy-bugs