details: http://www.bx.psu.edu/hg/galaxy/rev/d3abf05d9272
changeset: 2456:d3abf05d9272
user: Greg Von Kuster <greg(a)bx.psu.edu>
date: Fri Jun 19 11:21:13 2009 -0400
description:
Fix for importing history items ( datasets ) that include child datasets into a library.
1 file(s) affected in this change:
lib/galaxy/model/__init__.py
diffs (42 lines):
diff -r 075c0fd5b1d5 -r d3abf05d9272 lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py Thu Jun 18 12:10:36 2009 -0400
+++ b/lib/galaxy/model/__init__.py Fri Jun 19 11:21:13 2009 -0400
@@ -628,7 +628,7 @@
hda.set_peek()
hda.flush()
return hda
- def to_library_dataset_dataset_association( self, target_folder, replace_dataset=None, parent_id=None ):
+ def to_library_dataset_dataset_association( self, target_folder, replace_dataset=None, parent_id=None, user=None ):
if replace_dataset:
# The replace_dataset param ( when not None ) refers to a LibraryDataset that is being replaced with a new version.
library_dataset = replace_dataset
@@ -637,6 +637,8 @@
# LibraryDataset, and the current user's DefaultUserPermissions will be applied to the associated Dataset.
library_dataset = LibraryDataset( folder=target_folder, name=self.name, info=self.info )
library_dataset.flush()
+ if not user:
+ user = self.history.user
ldda = LibraryDatasetDatasetAssociation( name=self.name,
info=self.info,
blurb=self.blurb,
@@ -649,7 +651,7 @@
deleted=self.deleted,
parent_id=parent_id,
copied_from_history_dataset_association=self,
- user=self.history.user )
+ user=user )
ldda.flush()
# Permissions must be the same on the LibraryDatasetDatasetAssociation and the associated LibraryDataset
# Must set metadata after ldda flushed, as MetadataFiles require ldda.id
@@ -660,7 +662,10 @@
library_dataset.library_dataset_dataset_association_id = ldda.id
library_dataset.flush()
for child in self.children:
- child_copy = child.to_library_dataset_dataset_association( target_folder=target_folder, replace_dataset=replace_dataset, parent_id=ldda.id )
+ child_copy = child.to_library_dataset_dataset_association( target_folder=target_folder,
+ replace_dataset=replace_dataset,
+ parent_id=ldda.id,
+ user=ldda.user )
if not self.datatype.copy_safe_peek:
# In some instances peek relies on dataset_id, i.e. gmaj.zip for viewing MAFs
ldda.set_peek()
details: http://www.bx.psu.edu/hg/galaxy/rev/075c0fd5b1d5
changeset: 2455:075c0fd5b1d5
user: Greg Von Kuster <greg(a)bx.psu.edu>
date: Thu Jun 18 12:10:36 2009 -0400
description:
Fix for detecting metadata column types in tabular files, the number of lines read for detecting column types will always be the max setting, with previously detected column types being overridden if appropriate ( e.g., int overridden with float ). This will only occur in files whose data varies between types within the same column.
1 file(s) affected in this change:
lib/galaxy/datatypes/tabular.py
diffs (14 lines):
diff -r d83b9225b5dd -r 075c0fd5b1d5 lib/galaxy/datatypes/tabular.py
--- a/lib/galaxy/datatypes/tabular.py Tue Jun 16 13:54:33 2009 -0400
+++ b/lib/galaxy/datatypes/tabular.py Thu Jun 18 12:10:36 2009 -0400
@@ -121,8 +121,8 @@
#"column_types": ["int", "int", "str", "list"]
first_line_column_types = column_types
column_types = [ None for col in first_line_column_types ]
- elif ( column_types and None not in column_types ) or i > num_check_lines:
- #found and set all known columns, or we exceeded our max check lines
+ elif i > num_check_lines:
+ # We exceeded our max check lines
break
#we error on the larger number of columns
Hello Len,
This is not currently possible in a clean fashion, and providing this
feature will take a bit longer than I had originally thought, so I've
opened the following ticket for this. You can "follow" the issue in
bitbucket if you want. Thanks for sending this.
http://bitbucket.org/galaxy/galaxy-central/issue/97/enable-ability-to-have-…
Greg Von Kuster
Galaxy Development Team
lentaing(a)jimmy.harvard.edu wrote:
> Hi Greg,
>
> We have a program that can either output 1 (a bed file) or 2 files (a bed
> and a wig file). We'd like to give the user the option to select whether
> they want 1 or 2 files; in galaxy, is there a way to make the NUMBER of
> outputs dependent on a variable? I tried this, but it didn't work--when i
> select "False" for $two_out, galaxy still generates two output files:
>
> ...
> <command interpreter="bash">test_cond_out.sh $output1
> </command>
> <inputs>
> <param name="two_out" type="select" display="radio">
> <option value="true">True</option>
> <option value="false">False</option>
> </param>
> </inputs>
> <outputs>
> #if $two_out == "true":
> <data format="bed" name="output1" />
> <data format="bed" name="output2" />
> #else:
> <data format="bed" name="output1" />
> #end if
> </outputs>
> ...
>
> Thanks,
>
> Len
>
>
>