Commit Graph
172 Commits
Author SHA1 Message Date
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
Ian Schenck feda672ffa - Performance of indexers much improved.
- Indexing for tracks done in background with a visual treatment done to Trackster

- DB builds can be uploaded by a user (chromInfo/len extension).

- TODO: Add ability to change the dbkey of a dataset to any arbitrary string value.
2009-04-23 13:46:52 -04:00
Greg Von Kuster fb2441caa1 merging heads 2009-03-26 11:13:13 -04:00
Greg Von Kuster bd41001a99 i18n fix: dataset.info should not be translated since it will generally not have an entry in the catalog. Wormbase fixes: URL to main site corrected, and all supported builds added to gbrowse_build_sites.txt. 2009-03-26 09:34:05 -04:00
Greg Von Kuster 05c2d4222b merging from central 2009-03-20 03:06:40 -04:00
Greg Von Kuster 354d0447df Fixes for i18n support - all charsets set to utf-8, now able to paste multi-byte chars in upload form, templates use utf-8 as output_charset, other miscellaneous fixes. 2009-03-20 02:49:30 -04:00
Greg Von Kuster c0a4d982aa merging from central 2009-03-19 21:44:42 -04:00
Greg Von Kuster ad8f672677 Fixes for wormbase tools, use post as http method rather than get. 2009-03-19 21:41:06 -04:00
Nate Coraor 86eb5e62b2 Asynchronous uploads. Currently disabled in IE, since IE throws
occasional 'permission denied' errors when jquery attempts to set the
form target.  Compatible with the nginx upload module, but interrupted
uploads will remain in the 'upload' state indefinitely.
2009-03-13 13:48:59 -04:00
Greg Von Kuster e55a4d84f8 More library work - requires database schema update:
1) include templates in the upload form for library datasets
2) Add user_id column to library_dataset_dataset_association table
3) Add message column to library_dataset_dataset_association table
4) Several miscellaneous bug fixes related to uploading library datasets

SQL commands required:

ALTER TABLE library_dataset_dataset_association ADD COLUMN user_id INTEGER;
ALTER TABLE library_dataset_dataset_association ADD CONSTRAINT library_dataset_dataset_association_user_id_id_fkey FOREIGN KEY (user_id) REFERENCES galaxy_user(id);
ALTER TABLE library_dataset_dataset_association ADD COLUMN message VARCHAR(255);
2009-03-09 17:02:21 -04:00
Greg Von Kuster 987df32669 Fix for rendering tools / workflows in target frames, also elimnate the Workflow link in the tool panel as we're now using the menu bar. 2009-02-23 13:52:34 -05:00
Greg Von Kuster 377a5d8981 Add the Libraries tab to base panel and fix the access_libraries tool config for PrognosysBio. 2009-02-23 11:04:27 -05:00
Nate Coraor 42cbc8d893 Set a width hint for the library browser 2009-02-06 14:34:57 -05:00
Greg Von Kuster bb2b948557 merging from central 2009-01-22 08:51:48 -05:00
Greg Von Kuster 705994a0fc Fixes for formatting end of line chars in html when displaying dataset.info. Also change the biomart tool version. 2009-01-22 08:50:52 -05:00
Greg Von Kuster 6dd5b31c0e merging from central 2009-01-21 17:06:02 -05:00
Greg Von Kuster 7e21fb74a3 Fixes for Biomart and UCSC to better ensure the data type is correctly set. A data type of "tabular" is now the default, and data will be sniffed if this is the data type. 2009-01-21 17:03:39 -05:00
Greg Von Kuster 19c0b7e30b merging from central 2009-01-15 11:03:19 -05:00
Greg Von Kuster b7aaa17bc3 Change History.copy() back to use datasets rather than active_datasets. Add checks in set_peek() to properly set peek on purged datasets. Fixes sharing a history that contains purged datasets. 2009-01-15 10:49:01 -05:00
Greg Von Kuster df610a666c merging from central 2009-01-13 10:56:05 -05:00
Greg Von Kuster 051a78bc39 Add new tool config for flymine production server. 2009-01-13 10:55:08 -05:00
Nate Coraor b6d561fb42 Allow users to download a selection of datasets directly from the library in an archive format of their choosing. 2008-12-15 16:37:54 -05:00