Commit Graph
211 Commits
Author SHA1 Message Date
John Chilton 1f56fa37d7 WIP: metadata validation. 2023-06-06 10:02:29 +02:00
Greg Watson 8dc38e6e4c Add support for visualizing HDF5 datasets. This contribution is split into two parts: the visualization plugin and backend changes. The client code integrates the h5web visualizer into Galaxy (https://h5web.panosc.eu). The backend changes add the ability to access the contents of a dataset without needing to read the whole dataset, which is essential for large files. It is based on the h5grove API (https://github.com/silx-kit/h5grove). 2023-05-04 20:48:15 -04:00
Nicola Soranzo a850a47419 Update pysam depedency to 0.20.0
Fix `pysam.index()` calls which now use samtools 1.16 where
`samtools index input output` doesn't work any more if `output` is the path
of an already existing file, but `samtools index -o output input` works
fine.

Also:
- Pre-create the (empty) index file for mock test datasets as a unit test
  reproducer of the above issue.
- Fix `test_cram` unit test that wasn't checking the return value of
  `CRAM.set_index_file()`, which was in fact returning False because
  `test-data/2.cram` was not sorted (updated now).
2023-01-01 03:37:53 +00:00
John Davis e736bedca6 Add connectivity table test dataset 2022-11-18 18:24:54 -05:00
John Chilton 9d18c91aca Display dataset source transform information. 2021-11-12 11:42:21 -05:00
Alexander OSTROVSKY d88b72f1e0 added sniffer for yaml
import order

Better sniff for big files, removed extraneous comments

Better test for bigger files

lint

safe load, yaml error

typo
2021-09-20 13:07:20 -07:00
Matthias Bernt bb9e7f49a1 fix the to_inchi converter
which had the wrong id: CONVERTER_mol_to_mol2
therefore the test was not executed before
2021-07-01 15:08:49 +02:00
Matthias Bernt 109ba3b698 move test data for molecules converters 2021-06-29 14:06:39 +02:00
Matthias Bernt fe5fd8282d test-data: move 2.cram and link to datasets test 2021-06-29 10:47:23 +02:00
Matthias Bernt fad108f12f add a bit of docs to the add tags tool
and extend test for group tags
2021-04-21 11:45:07 +02:00
Nicola Soranzo 283ec1772f Merge branch 'release_20.09' into release_21.01 2021-03-12 17:12:04 +00:00
Nicola Soranzo 3506abcc80 Fix `metadata_bcf` framework test
Somewhere between file/libmagic 5.36 and 5.39, the output of `file` on a
`.csi` file changed, breaking the ``metadata_bcf`` framework test with
the following error:

```
        if found_exceptions:
>           raise JobOutputsError(found_exceptions, job_stdio)
E           galaxy.tool_util.verify.interactor.JobOutputsError: Output output_of_input_metadata:  different than expected, difference (using contains):
E           ( /tmp/tmpu1a3dgjcbcf_index_metadata_test.txt v. /tmp/tmpkt78tzggbcf_index_metadata_test.txt )
E           Failed to find 'gzip compressed data, extra field' in history data. (lines_diff=0):

lib/galaxy/tool_util/verify/interactor.py:1222: JobOutputsError
```

So add a requirement for the latest `file` version and update the test
accordingly.
2021-03-11 20:21:00 +00:00
Marius van den Beek c148445e6c Merge pull request #10880 from bernt-matthias/topic/options-fallback-name
Dynamic select parameters: also allow to choose legal options by name
2021-01-13 12:00:08 +01:00
Matthias Bernt 365e5a75c2 make 2nd column of 2.tabular test data unique values
in preparation of a test for chosing selects per name
2021-01-12 13:44:58 +01:00
Matthias Bernt 08810b2174 add empty test file 2021-01-08 12:43:37 +01:00
John Chilton 7c13c03dd6 Fix Galaxy tool/workflow staging and refactor for reuse in Planemo. 2020-08-01 10:34:46 -04:00
almahmoud 549c76a779 Add VCF_BGZIP to VCF converter 2020-07-25 01:33:02 +01:00
M Bernt fcf5436717 column_param_configfile test: don't check json content
dont compare the json file content but rely completely on the assertions on
the loaded json contents.

the json content test was superficial and did not work anymore since the order
of the keys differed. it worked before since the inputs contained only a
single key.
2020-02-01 14:15:20 +01:00
M Bernt f25192b533 json configfiles: handle slect like data_column
- in particular the case of an empty select did yield "None" before
  now its []
  Problem was that the ValueWrapper is not None if nothing is selected
- but also non empty selects were "option1,option2" now its
  ["option1","option2"]
- renamed variable value -> value_wrapper
2020-02-01 14:15:20 +01:00
mvdbeek dd91b14b6d Add testcase for new tag from file behavior 2019-05-27 14:58:16 +02:00
mvdbeek 0c1334fea0 Fix grouping1 with modern sort, fix test data
This tool currently fails with `sort: multi-character tab '$\\\\t'\n`
(https://jenkins.galaxyproject.org/view/All/job/docker-main-tools/lastCompletedBuild/testReport/test.functional/test_toolbox_pytest/test_tool_Grouping1_test_1_/).
This also removes test data that should be included in
galaxy-test-data instead (xref
https://github.com/galaxyproject/galaxy-test-data/pull/5),
and adds a test file that was missing from
https://github.com/galaxyproject/galaxy/pull/7205.
2019-04-29 17:38:10 +02:00
Nicola Soranzo bfc7b68848 Merge branch 'release_19.01' into dev 2019-04-12 23:18:49 +01:00
Nicola Soranzo d545e88703 Add test case and use assertRaises()
Also remove temporary directory.
2019-04-12 12:41:48 +01:00
mvdbeek 54b9609896 Merge branch 'release_19.01' into dev 2019-04-08 18:29:11 +02:00
mvdbeek fd6198905b Add test-data 2019-04-07 23:15:35 +02:00
John Chilton af8ae098f4 Legacy history export tests and infrastructure. 2019-03-11 10:56:25 -04:00
Matthew Dillon 091fe8121a SQUASH: Adding in other archive containers
Per discussion with @bgruening
2019-02-26 16:43:23 -07:00
John Chilton 00652f0b3a Merge pull request #7205 from bernt-matthias/topic/grouping-w-emptycells
group: don't remove empty cells at the begin/start of lines
2019-02-14 14:53:34 -05:00
Bjoern Gruening cb13e56e6b add test-data for new hdf5 based tool test 2019-02-05 04:23:13 +01:00
bernt@informatik.uni-leipzig.de bc86e37d85 groupby: reenabled tests and added some, more bugfix
- make script exit with code 1 in case of error
- removed one more strip
- adapted tool syntax to best practices
2019-01-12 16:13:23 +01:00
Pierrick ROGER efc7864cab Merge branch 'dev' into feature/isa_data_type 2018-10-18 10:36:49 +02:00
John Chilton 1c4a4ed8cb Merge remote-tracking branch 'galaxyproject/release_18.05' into release_18.09 2018-10-04 11:43:05 -04:00
John Chilton 4a345b99c3 Fix security problems when extracting untrusted tar files.
Fixes GX-2018-0006.
2018-10-04 11:32:52 -04:00
Qiang Gu 53709df8cf Revert "Update configfile.json"
This reverts commit c9df2ef9be.
2018-07-11 15:46:26 -07:00
Qiang Gu c9df2ef9be Update configfile.json 2018-07-10 14:21:39 -07:00
mvdbeek 88132f9d16 Test dumping multiple="false" data_column param as json
Tests https://github.com/galaxyproject/galaxy/pull/6389
2018-06-30 09:11:42 -07:00
Marius van den Beek 1b50504678 Merge pull request #6066 from jmchilton/apply_rules_tutorials
Rules - test case for apply rules tutorial.
2018-06-12 11:11:56 +02:00
Pierrick Roger 87cdd2156d Start writing upload test for isa-tab.
Do not know how to read zip file content and submit it to uploader for a
composite type.
2018-06-07 12:07:35 +01:00
John Chilton 03a815a2c3 Some more upload/sniff tests. 2018-05-24 10:31:28 -04:00
John Chilton 050c9e99c6 Rules - test case for apply rules tutorial.
Demonstrates using the Apply Rules collection operation tool against existing collections to:

 - Use grouping to build nested lists from flat ones.
 - Invert nested collections.
 - Filter collections.
 - Filter while also grouping to build nested collections.

Based on count data used in the DESeq2 tutorial (http://bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html), originally from the Bioconductor Pasilla package (http://bioconductor.org/packages/release/data/experiment/html/pasilla.html). Citation: Huber W, Reyes A (2018). pasilla: Data package with per-exon and per-gene read counts of RNA-seq samples of Pasilla knock-down by Brooks et al., Genome Research 2011.. R package version 1.8.0.
2018-05-05 16:52:02 -04:00
John Chilton 09fcf13aaf Merge pull request #5872 from abretaud/filter_sanitize
Filter tool: fix too strict sanitizing
2018-04-20 07:17:55 -04:00
Anthony Bretaudeau dc4902353f add test case for fixed bug 2018-04-20 09:44:27 +02:00
John Chilton 145903eae3 Merge remote-tracking branch 'jmchilton/dev' into sort_header 2018-04-19 12:57:18 -04:00
John Chilton b3f589cc93 For rule builder, use Python-like regular expressions in-browser.
Leverages the [pyre-to-regexp](https://github.com/jmchilton/pyre-to-regexp) that I recently published for this purpose.
2018-04-07 09:17:37 -04:00
John Chilton 083bdcbdd8 Rule-based Collection Builder
Vue-based component for defining collections by applying rules to a list of files or more general spreadsheet style information (e.g. sample sheets or tabular data from data sources containing URL or FTP file paths for files along with metadata). The widget is fairly complex but very broadly is broken into two panes - one to preview how rules are applied to build up tabular data defining collections (each row corresponding to a file with columns for metadata and such) and one that displays defined rules and allows for editing of these rules and creation of new ones.

The goal behind defining rules this way instead of allowing the user to interact with the spreadsheet display directly is to enable scaling up collection creation. If a user wishes to upload hundreds of datasets - interacting with a widget directly for each input doesn't scale well and would be error prone. If a user wishes to upload hundreds of thousands of datasets - even loading this information in the GUI may not scale (though I've been impressed with the performance so far of this approach) and so we can potentially just display a preview of some of the rows and process the final set of rules on the backend.

Since we can handle an arbitrary number of columns this way, we can define multiple list identifiers per file and so we can easily construct nested lists. Hence this allows creation of not just potentially larger collections but arbitrarily complex lists as well. Paired identifiers via indicator columns are also implemented.

In order to operate over lists of datasets directly - the multi-select history widget now has a new option "Build Collection from Rules" along side the other collection builders. This mode uses the well established dataset collection API to build collections from HDAs.

In order to operate on lists of FTP files or URLs - the upload widget has a new tab "Rule-based" tab that allows users to paste in tabular data or select a history dataset and then send this tabular data to the new builder widget. This will be extended to include FTP directories for instance over time. This mode uses the new data fetch API to build collections and handle uploads of arbitrary collections of files.

The preview of the tabular data generated via rules is done via [Handsontable](https://handsontable.com/) - a JavaScript spreadsheet widget with a VueJS [wrapper component](https://github.com/handsontable/vue-handsontable-official). This turns out to be a fairly nice application for reactive components - as rules are added or modified the spreadsheet just naturally updates. In my hands the widget scales very nicely - I've uploaded files with tens of thousands of rows and rules modifying the data and changing the spreadsheet do not seem to cause siignificant delays in the web browser.
2018-03-29 11:07:06 -04:00
John Chilton d651348da6 More upload tests and fixes. 2018-03-08 10:33:42 -05:00
John Chilton 1c6cc02415 Hierarchical upload API optimized for folders & collections.
Allows describing hierarchical data in JSON or inferring structure from archives or directories.

Datasets or archive sources can be specified via uploads, URLs, paths (if admin && allow_path_paste), library_import_dir/user_library_import_dir, and/or FTP imports. Unlike existing API endpoints, a mix of these on a per file basis is allowed and they work seemlessly between libraries and histories.

Supported "archives" include gzip, zip, bagit directories, bagit achives (with fetching and validations of downloads).

The existing upload API endpoint is quite rough to work with both in terms of adding parameters (e.g. the file type and dbkey hanlding in 4563 was difficult to implement, terribly hacky, and should seemingly have been trivial) and in terms of building requests (one needs to build a tool form - not describe sensible inputs in JSON). This API is built to be intelligable from an API standpoint instead of being constrained to the older style tool form. Additionally it built with hierarchical data in mind in a way that would not be easy at all enhancing the tool form components we don't even render.

This implements 5159 though much simpler YAML descriptions of data libraries should be possible basically as the API descriptions. We can replace the data library script in Ephemeris https://github.com/galaxyproject/ephemeris/blob/master/ephemeris/setup_data_libraries.py with one that converts a simple YAML file into an API call and allows many new options for free.

In future PRs I'll add filtering options to this and it will serve as the backend to 4733.
2018-03-08 10:33:36 -05:00
Nicola Soranzo 1118e6f1be Merge branch 'release_18.01' into dev
Conflicts:
	lib/galaxy/datatypes/binary.py
2018-03-05 19:03:30 +00:00
mvdbeek bb19c7e448 Add queryname sorted and input sorted datatypes
The queryname sorted datatype (BamQuerynameSorted) ensures that the file is
queryname ordered.  The BamInputSorted datatype can be used to describe the
output of aligners, which usually keep mate pairs adjacent. The BamInputSorted
datatype allows using tools that require mates to be adjacent, without
requiring an explicit sorting step.  This can reduce the time and space
required for duplicate marking tools, HiC tools and structural variant
detection tools that require mates to be grouped together in an alignment file.

The BamQuerynameSorted has a converter that works for all datatypes that can be
consumed by samtools. There is no converter for BamInputSorted, since
BamQuerynameSorted is valid input for tools requiring BamInputSorted
input.

I'm targeting 18.01 since I think it would be very unfortunate if we start
annotating aligners with the very loose BamNative datatype, since this datatype
does not make any promises about sort order at all.

This closes https://github.com/galaxyproject/galaxy/issues/5497, goes
a long way towards the problems mentioned in https://github.com/galaxyproject/galaxy/issues/5496
and would make https://github.com/galaxyproject/tools-iuc/pull/1732 and https://github.com/galaxyproject/tools-iuc/pull/1591 better
2018-02-22 19:59:55 +01:00
mvdbeek d14bae73f7 Flush once per tag
Not sure this is the right thing to do (maybe there is a better way to get an ID?), but it avoids
```
IntegrityError: (psycopg2.IntegrityError) duplicate key value violates unique constraint "tag_name_key"
DETAIL:  Key (name)=(group) already exists.
 [SQL: 'INSERT INTO tag (type, parent_id, name) VALUES (%(type)s, %(parent_id)s, %(name)s) RETURNING tag.id'] [parameters: {'parent_id': None, 'type': 0, 'name': u'group'}]
galaxy.tools.execute WARNING 2018-02-06 15:22:38,808 [p:2122,w:1,m:0] [uWSGIWorker1Core1] There was a failure executing a job for tool [__TAG_FROM_FILE__] - Error executing tool: (psycopg2.IntegrityError) duplicate key value violates unique constraint "tag_name_key"
```
2018-02-07 10:58:58 +01:00