Commit Graph
193 Commits
Author SHA1 Message Date
Daniel Blankenberg 183c2d3d13 Bug fix for handling 'spaces to tab' for non-binary composite datatype files.
Add upload tests for testing 'space to tab' when uploading composite and non-composite datatypes.
2010-06-07 15:34:20 -04:00
Greg Von Kuster 15abe33231 Add the CBI Rice Mart data source tool to the distribution. 2010-06-04 15:49:58 -04:00
Daniel Blankenberg 64c68b5a66 Several Fixes for Uploading Composite datatypes. Revert changeset 3769:69e70e588a8e. 2010-05-12 15:57:05 -04:00
Greg Von Kuster 95ac03c352 Remove the hack I just committed for changing modENCODE fly and worm dbkeys, and translate the values in the tool configs. 2010-05-12 15:18:40 -04:00
Greg Von Kuster de5de2973c Force modENCODE worm dbkey to be ce6 and modENCODE fly dbkey to be dm2. 2010-05-12 14:50:25 -04:00
Greg Von Kuster 53363c793e Add the modENCODEfly and modENCODEworm data source tools. 2010-05-06 19:39:27 -04:00
Nate Coraor ca066cef04 Add a tip to the upload tool about using url paste for big files 2010-05-04 10:18:42 -04:00
Ross Lazarus 84b05c8113 Fixes to rgQC top table ordering and add offset so can use rgManQQ to make plots
Fixes to rgManQQ to handle unsorted data - now sorts before manhattan plot
2010-04-05 14:14:09 -04:00
Nate Coraor 933944c12d Fix bug in upload where source import files could be removed if an error occurs during detection and galaxy owns the source files. 2010-03-23 12:45:08 -04:00
Nate Coraor 482b69b749 Modify the newline conversion methods in sniff so converting in place is optional. This is necessary to fix a bug that occurs if using the 'server_dir' or 'path_paste' library upload methods: previously, they would modify the file to be imported in-place if permissions allowed (probably not what the admin wanted) or fail if permissions did not allow. New functionality is to return the converted tempfile if 'server_dir' or 'path_paste' methods are used. Also, no newline conversion will be done if the administrator uses the symlink checkbox. 2010-03-11 11:56:20 -05:00
Greg Von Kuster 19592b4e39 Update tool_conf.xml.main and the tool conf for eupathdb. 2010-01-27 08:51:23 -05:00
Kanwei Li 0f1d788690 Wiki links now point to bitbucket instead of trac 2010-01-19 18:15:27 -05:00
Greg Von Kuster a14492c491 Added from __future__ import division to the Filter tool and increased the version, and fixed the URL in the new bx_browser tool config. 2010-01-14 11:26:08 -05:00
Greg Von Kuster 826da3acac Add a tool config for the new bx_browser data source tool. 2010-01-14 10:24:37 -05:00
Greg Von Kuster 75753f1783 Add error handling to upload's check_zip. 2009-12-09 16:20:12 -05:00
Greg Von Kuster cf83cecb0b Better approach to altering initial content of output dataset if necessary. The upload tool will now call the data type's groom_output_dataset() method ( a better name than before_setting_metadata since it is not related to metadata ). This will now also run on the cluster. 2009-12-08 11:46:13 -05:00
Greg Von Kuster 7051ce7dd5 Rename the before_edit() and after_edit() metadata related methods to be more appropriately named before_setting_metadata() and after_setting_metadata(), and add the metthods to all datatype classes. Move sorting of Bam files from the Bam set_meta() method to this new method. 2009-12-08 09:05:35 -05:00
Greg Von Kuster bcd6751cdf Fix for uploading a Bam file that has not yet been sorted, the call to samtools sort has been moved from the sam_to_bam tool to the Bam()set_meta() method to ensure all Bam datasets are sorted prior to indexing. Added new functional tests to cover uploaing unsorted Bam files. Also cleaned up code in the upload tool for uploaing various binary data formats. 2009-12-07 16:04:33 -05:00
Daniel Blankenberg f92b25d2f5 Enhance tool parameter sanitization. Sanitization rules can now be defined on a per input parameter basis. Resolves ticket #38 and #142.
Sanitization now occurs as part of the InputValueWrapper logic. Previously sanitization occurred as soon as parameter values were provided by the user via form submits, causing the sanitized values to be stored in the database. Now the original user specified values are stored in the database and sanitation happens when str is called on the InputValueWrapper, i.e. during command-line generation and when generating configfiles.

Abstract out param name and value translations that are performed on data source tools. This changes some of the names of the tags used for these purposes  (e.g. data_type_translation becomes value_translation) to reflect this generalization. The ToolConfigSyntax wiki page has been updated with these changes.

Future Enhancement:
Allow methods with arguments and keywords to be specified for sanitation and translation purposes.
2009-12-07 10:19:41 -05:00
Greg Von Kuster 08e0d5e532 Fixes for Bam data type's set_meta() and sam_to_bam tool, indexes will now be properly created for bam datasets. Fixes also for uploading Bam files, they will no longer be uncompressed on upload. 2009-12-04 19:51:46 -05:00
Greg Von Kuster f16d27c2d4 Add datasource tool configs for modMine and Ratmine. 2009-12-03 15:33:15 -05:00
Greg Von Kuster 0e807f13f5 Add support for uploading BAM files. 2009-12-02 20:02:05 -05:00
Kanwei Li 82eef1efcf Data from UCSC table browser now uses hgta_table for table name. Fixes #67 2009-11-20 15:25:13 -05:00
Greg Von Kuster dd32491716 A bit of code cleanup in genetics.py, and add all rgenetics data types to datatypes_conf.xml.sample. Also include the new Sff data type in the upload config help section. 2009-11-13 16:24:00 -05:00
Greg Von Kuster e38e78f5e4 Fixes, cleanup and new functional tests for data types and upload:
- moved all supported binary data types to the new binary.py
- changed GeneTrack data type to subclass from Text rather than Binary
- added Sff data type to datatypes_conf.xml.sample
- merged test_sniffinad_and_metadata_settings.py test scritp into test_get_data.py
- added several additional functional test for data types to test_get_data.py
- fixed some bugs in upload.py when uploading binary data types
2009-11-13 14:13:03 -05:00
Greg Von Kuster dc8e7c1039 Eliminate the _monkeypatch_session_method from assignmapper by cleaning up remaining object flushes. The _monkeypatch_query_method remains due to a single object query in ~/datatypes/metadata.py in the FileParameter.wrap() method. The sqlalchemy session is now also passed into the __init__ methods for both HistoryDatasetAssociation and LibraryDatasetDatasetAssociation when the create_dataset param is True to enable methods in the DatasetInstance class to correctly add the created dataset to the sqlalchemy session and flush it. 2009-11-12 15:25:48 -05:00
Ramkrishna Chakrabarty 702bad5d25 Added sff datatype
Also, made changes to upload.py to sniff sff binary files
2009-11-11 17:55:08 -05:00
Greg Von Kuster 8f6e8213a0 Fix most of the db flushes to be compatibel with sqlalchemy 05. Add the _monkeypatch_query_method() back into assignmapper due to a single object.get() method in the MetadataCollection class since Metadata has no current hook into mapping.context ( the sqlalchemy session ). There a 4 flushes in metadata,py and 20 flushes in model.__init__.py that still use the _monkeypatch_session_method in assignmapper due to the same issue, but all other flushes are fixed. 2009-11-11 15:59:41 -05:00
Nate Coraor 8d96c8d979 imported patch alchemy05_fixes_02 2009-11-03 12:52:01 -05:00
Nate Coraor 8d24d0aeba Remove old encode import tools 2009-11-02 16:21:28 -05:00
Nate Coraor e8cbb18a87 Make Galaxy attempt to honor the user's umask and primary group (output datasets can have the wrong primary group if the primary group differs on the cluster). Also fixed a composite datatype files_path bug in the upload tool. 2009-10-23 14:33:23 -04:00
Greg Von Kuster 9f6ceaef1c Fixes and new functional tests for uploading multi-byte character files and fixes for displaying multi-byte character dataset peek. 2009-10-15 20:10:32 -04:00
Nate Coraor 5d4513b585 Add a new option, 'allow_library_path_paste' that adds a new upload page
("Upload files from filesystem paths") to the admin-side library upload pages.
This form contains a textarea that allows Galaxy admins to paste any number of
filesystem paths (files or directories) from which Galaxy will import library
datasets, saving the directory structure (if desired).  Since such ability
allows admins access to any file on the Galaxy server which is readable by
Galaxy's system user, this option is disabled by default, and system
administrators should take care in assigning Galaxy administrators when this
feature is enabled.  Controls on what files are accessible to this tool based
on ownership or other properties can be added at a later date if there is
sufficient interest for such features.

This commit also includes a checkbox on the "Upload directory of files" page
(as well as the new "Upload files from filesystem paths" page above) that will
prevent Galaxy from copying data to its files directory (by default,
'database/files/').  This is useful for large library datasets that live in
their own managed locations on the filesystem, this will prevent the existence
of duplicate copies of datasets (but means administrators must take care to
manage data - moving or removing the data from its Galaxy-external location
will render these datasets invalid within Galaxy).

One unique feature to be aware of: when using the "Copy data into Galaxy?"
checkbox on the "Upload directory of files" page, any symbolic links
encountered in the chosen import directory will be made absolute and
dereferenced ONCE.  This allows administrators to link large datasets to the
import directory, rather than having to make full copies, while being able to
delete such links after importing.  Only the first symlink (the one in the
import directory itself) is dereferenced; all others remain.  See the following
for an example:

library_import_dir = /galaxy/import

% ls -lR /galaxy/import
/galaxy/import:
total 6
drwxr-xr-x   2 nate     nate         512 Oct  1 11:31 link/

/galaxy/import/link:
total 10
lrwxrwxrwx   1 nate     nate          71 Oct  1 10:38 1.bed -> ../../../home/nate/galaxy/test-data/1.bed
lrwxrwxrwx   1 nate     nate          60 Oct  1 10:38 2.bed -> /home/nate/galaxy/test-data/2.bed
lrwxrwxrwx   1 nate     nate          11 Oct  1 10:38 3.bed -> ../../3.bed
lrwxrwxrwx   1 nate     nate          35 Oct  1 11:30 4.bed -> ../../galaxy_symlink/test-data/4.bed
lrwxrwxrwx   1 nate     nate          41 Oct  1 11:31 5.bed -> /galaxy/galaxy_symlink/test-data/5.bed

% ls -l /galaxy/3.bed
lrwxrwxrwx   1 nate     nate          60 Oct  1 10:39 /galaxy/3.bed -> /home/nate/galaxy/test-data/3.bed

% ls -l /galaxy/galaxy_symlink
lrwxrwxrwx   1 nate     nate          44 Oct  1 11:30 /galaxy/galaxy_symlink -> /home/nate/galaxy/

In this example,

1.bed is a relative symbolic link to the real 1.bed.

2.bed is an absolute symlink to the real 2.bed.

3.bed is a relative symlink to ../../3.bed, aka /galaxy/3.bed, which itself is
a symlink to the real 3.bed.

4.bed is a relative symlink which follows another symlink
(/galaxy/galaxy_symlink) to the real 4.bed.

5.bed is an absolute symlink in the same fashion as 4.bed

If the 'link' server directory is chosen on the "Upload directory of files"
page, and "Copy data into Galaxy?" is checked "No", the following files will be
referenced by Galaxy:

/home/nate/galaxy/test-data/1.bed
/home/nate/galaxy/test-data/2.bed
/galaxy/3.bed
/galaxy/galaxy_symlink/test-data/4.bed
/galaxy/galaxy_symlink/test-data/5.bed

The Galaxy administrator may now safely delete /galaxy/import/link, but should
take care not to remove the referenced symbolic links (/galaxy/3.bed,
/galaxy/galaxy_symlink).

Not all symbolic links are dereferenced because it is assumed that if an
administrator links to a path in the import directory which itself is (or
contains) links, that is the preferred path for accessing the data.
2009-10-01 12:35:41 -04:00
Nate Coraor 1a03ede2b4 Prevent script tags in uploads as reported by Mitsuteru Nakao 2009-09-30 09:22:02 -04:00
Nate Coraor d14eb4d653 Reintroduce nginx upload module support.
http://www.grid.net.ru/nginx/upload.en.html

The following config variables are added to universe_wsgi.ini:

    nginx_upload_store = Path to nginx upload store
        ex: = database/upload_store
    nginx_upload_path = URL (from root of the Galaxy server) to direct upload POSTs to
        ex: = /_upload

The following nginx config supports such a configuration:

    location /_upload {
        upload_store /path/to/galaxy/database/upload_store;
        upload_pass_form_field "tool_id";
        upload_pass_form_field "tool_state";
        upload_pass_form_field "async_datasets";
        upload_pass_form_field "^files_[0-9]+\|.*";
        upload_pass_form_field "file_type";
        upload_pass_form_field "dbkey";
        upload_pass_form_field "runtool_btn";
        upload_pass_form_field "ajax_upload";
        upload_pass_form_field "upload_option";
        upload_pass_form_field "library_id";
        upload_pass_form_field "folder_id";
        upload_pass_form_field "message";
        upload_pass_form_field "roles";
        upload_set_form_field "__${upload_field_name}__is_composite" "true";
        upload_set_form_field "__${upload_field_name}__keys" "name path";
        upload_set_form_field "${upload_field_name}_name" "$upload_file_name";
        upload_set_form_field "${upload_field_name}_path" "$upload_tmp_path";
        upload_pass_args on;
        upload_pass /_upload_done;
    }

    location /_upload_done {
        set $dst /tool_runner/index;
        if ($args ~ nginx_redir=([^&]+)) {
            set $dst $1;
        }
        rewrite "" $dst;
    }
2009-09-29 17:14:20 -04:00
Kanwei Li 3531212ff6 typo fixes for tools in folders A-M 2009-09-27 23:11:43 -04:00
Nate Coraor 87db3952d3 Real Job(tm) support for the library upload tool. Does not include iframe upload for the library side yet. 2009-09-25 14:36:12 -04:00
Nate Coraor 6f3a169b01 Get rid of the hacky "alternate path" stuff used by the upload tool and fix setting metadata when using autodetect and set_metadata_externally 2009-09-10 14:52:38 -04:00
Nate Coraor 2e407c0b21 Fix for multi-byte file uploads 2009-08-25 14:58:37 -04:00
Nate Coraor 4158ee0833 set job state to new in upload tool action so that track_jobs_in_database works 2009-08-25 11:53:42 -04:00
Nate Coraor 3f5da01132 Real Job(tm) upload support 2009-08-20 10:49:54 -04:00
Greg Von Kuster d0d7875192 Deprecated code corrections for supporting Python 2.6. Many of the Python 2.6 eggs are still throwing DeprecationWarning messages, so some things still won't work. Eggs for 2.6 need to be re-scrambled after corrections are made. 2009-08-14 15:37:31 -04:00
Daniel Blankenberg b2e2b801ea Enhance data_source.py to take advantage of the content length when known. If content length provided by external application is
greater than config.output_size_limit, no data will be retrieved and an error message will be provided to the user.

Tools using this script have been updated to provide the max file size on the command line.

Resolves ticket #93.
2009-08-03 12:02:54 -04:00
Daniel Blankenberg cc22aee3cb Initial pass at allowing the setting of certain metadata parameters on upload (controlled via a flag). This allows the user to specify the 'base_name' to be used for Rgenetics datatypes, etc. Bunch of cleanup needed in upload. 2009-07-15 14:11:35 -04:00
James Taylor db9c0a9870 Commenting out 'other dbkey' in upload 2009-06-11 15:41:57 -04:00
James Taylor 537f8952ef Merging Ian's trackster update with current head 2009-06-11 12:20:03 -04:00
Daniel Blankenberg c0d797e00d Allow the uploading of composite datatypes. A new grouping parameter, UploadDataset, is used to contain and process the file_data/url_paste/space_to_tab used to upload a file - multiple sets are displayed when uploading a composite datatype (similar to a repeat). Composite files can now be declared to the datatypes registry (required for proper uploading), but they are stored in the same manner as before (the extra_files_path) and should be backwards compatible. When uploading a composite datatype, only one dataset can be uploaded at a time. The ability to upload multiple datasets (url_paste (contents or urls) + file_data) for non-composite datatypes remains unchanged.
A more structured way of storing these files (rather than dumping in a directory) is worth considering.
2009-06-08 12:49:26 -04:00
Greg Von Kuster 49938abb76 Add EuPathDb data source tool config. 2009-06-01 10:27:04 -04:00
Greg Von Kuster a9cd544be9 Add a defaulttimeout setting of 10 minutes to the urlopen() call for requests to remote data sources. 2009-05-28 11:10:44 -04:00
Greg Von Kuster e608f904ee Add tool config for GrameneMart data source. 2009-05-27 14:19:59 -04:00