Commit Graph
189 Commits
Author SHA1 Message Date
Dannon Baker 03351d2a9f Apply black to tools as well 2022-02-03 09:12:13 -05:00
Dannon Baker 623a5e165a Apply black formatting.
Apply isort.
2022-02-03 07:42:20 -05:00
John Chilton 54e8d22fa7 Check types of modules without type annotations in the their signatures on new modules.
https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-check-untyped-defs

> it type checks the body of every function, regardless of whether it has type annotations. (By default the bodies of functions without annotations are not type checked.)
2021-10-11 16:08:26 -04:00
Dave B 4023806080 Open input file in read mode 2021-05-21 18:15:14 +02:00
John ChiltonandNicola Soranzo 652f700962 Update tools/extract/liftOver_wrapper.py
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
2021-04-23 14:51:29 -04:00
John Chilton 2a0474730b Rev mypy. 2021-04-23 14:49:53 -04:00
Nicola Soranzo d26b3d9848 Fix all E203, E741 and W504 flake8 errors 2021-01-18 10:35:41 +00:00
mvdbeek ccdb6c3f10 Replace usage of mkstemp with NamedTemporaryFile 2020-12-07 22:31:53 +01:00
mvdbeek 53f8215d56 Fix unclosed file descriptors returned by mkstemp 2020-12-04 18:49:13 +01:00
cat-bro 45382b6308 import Comment, Header from bx.tabular.io instead of bx.intervals.io 2020-05-09 19:49:48 +10:00
mvdbeek d649338297 Fix TwoBitFile handle not opened in binary mode
Fixes https://sentry.galaxyproject.org/sentry/main/issues/501741/:
```
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd7 in position 77: invalid continuation byte
  File "galaxy/web/framework/middleware/sentry.py", line 43, in __call__
    iterable = self.application(environ, start_response)
  File "/cvmfs/main.galaxyproject.org/venv/lib/python3.6/site-packages/paste/recursive.py", line 85, in __call__
    return self.application(environ, start_response)
  File "galaxy/web/framework/middleware/statsd.py", line 34, in __call__
    req = self.application(environ, start_response)
  File "/cvmfs/main.galaxyproject.org/venv/lib/python3.6/site-packages/paste/httpexceptions.py", line 640, in __call__
    return self.application(environ, start_response)
  File "galaxy/web/framework/base.py", line 143, in __call__
    return self.handle_request(environ, start_response)
  File "galaxy/web/framework/base.py", line 222, in handle_request
    body = method(trans, **kwargs)
  File "galaxy/web/framework/decorators.py", line 57, in call_and_format
    rval = func(self, trans, *args, **kwargs)
  File "galaxy/webapps/galaxy/api/genomes.py", line 41, in show
    region = self.app.genomes.reference(trans, dbkey=id, chrom=chrom, low=low, high=high)
  File "galaxy/visualization/genomes.py", line 395, in reference
    twobit = TwoBitFile(open(twobit_file_name))
  File "bx/seq/twobit.py", line 56, in __init__
    strng = file.read(TWOBIT_MAGIC_SIZE)
  File "python3.6/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
```
2020-02-25 12:13:17 +01:00
John Chilton bf550da2af Merge pull request #6684 from nsoranzo/deprecate_param_size
Deprecate `size` attribute of `<param/>` and remove it from tools
2018-12-12 10:51:28 -05:00
Nicola Soranzo f4203ca051 Fix errors reported by flake8 3.6.0
Ignore W504.
2018-10-24 23:22:19 +01:00
Nicola Soranzo f865e8359f Deprecate size attribute of <param/> and remove it from tools
Also:
- dos2unix test/functional/tools/for_workflows/head.xml
- Single-quote text and data params in `<command/>`
- Remove deprecated `interpreter` attribute of `<command />`
2018-09-10 11:34:37 +01:00
Nicola Soranzo 2515267ca5 Add version attribute to tool requirements
instead of relying on `lib/galaxy/tools/deps/resolvers/default_conda_mapping.yml` .
Follow-up on https://github.com/galaxyproject/galaxy/pull/5544 .

See https://github.com/galaxyproject/galaxy/pull/5544/files#r183909746 for
an explanation why that's preferrable for future-proof reproducibility.

Also, small fixes to `tools/evolution/codingSnps.xml` .
2018-04-25 15:50:35 +01:00
John Chilton 7712f69b69 Rev tool versions for tools with updated ucsc tool requirements. 2018-04-24 14:40:28 -04:00
Nate Coraor 4b09027ebb Update all tools/converters using UCSC binaries to depend only on the
binary they are using.
2018-02-15 10:54:04 -05:00
Nicola Soranzo 9b4de72ca6 Fix all E722 errors and ignore E741
Introduced in flake8 3.5.0
Fix import order.
2017-10-24 11:29:09 +01:00
mvdbeek 3dbdf7d474 Make liftover tool use data table 2017-09-19 16:09:36 +02:00
Nicola Soranzo 21b44bf348 Fix all E201 and E202 style errors
using the following command:
```
autopep8 -i -r --exclude $(sed -e 's|^|./|' -e 's|/$||' .ci/flake8_blacklist.txt | paste -sd,) --select E201,E202 .
```
2017-08-17 11:35:39 +01:00
Nicola Soranzo 03a807e374 Lint some tools 2017-01-23 21:11:43 +00:00
Nicola Soranzo 1d17a29c79 Fixes for pycodestyle 2.2.0 2016-11-15 16:56:50 +00:00
Nicola Soranzo 11b4f3a60c Fix import order and Python3 compatibility for tools/
xref #1715
2016-09-29 19:26:22 +01:00
Nicola Soranzo 6ba6f798ec Fix more E203 flake8 errors 2016-05-17 23:53:16 +01:00
Nicola Soranzo 8a43b2b492 Python 3: use "as" instead of comma in except clause 2016-05-17 23:53:16 +01:00
Nicola Soranzo ed4132d9c0 Python3: Use open() instead of file() 2016-05-17 23:53:16 +01:00
Nicola Soranzo 69cda48690 Remove remaining references to galaxy.eggs . flake8 some files in tools/ . 2015-10-26 19:29:13 +00:00
yhoogstrate 6a38e0bda7 Update liftOver_wrapper.xml
version++
2015-08-12 10:57:42 +02:00
youri 83bc5b74ff liftOver.loc was not accessible from local data 2015-08-11 10:58:06 +02:00
y.hoogstrate@erasmusmc.nl 6ce94ce7e6 Fixed comments 2015-07-30 13:12:51 +02:00
y.hoogstrate@erasmusmc.nl 91a29d8a6a extract_genomic_dna support for 2bit files from Local data 2015-07-30 12:06:07 +02:00
Nicola Soranzo 22d4a1d8c3 dos2unix of tools/ directory. Some whitespace and PEP-8 fixes. 2015-05-15 12:40:52 +01:00
John Chilton 77b167bbd1 Comment out broken liftOver tests.
liftOver loc file handling is problematic (https://trello.com/c/A6I6zQvF). If it weren't this wouldn't be a problem. I could fix the API functional test framework to mimic the older form driven approach but it would take a week and would be rendered moot by fixing liftOver. Unfortunately, fixing liftOver would likely break a lot of existing workflows and tool reruns so I am not fixing that either.

Only option left, admittedly a crappy one, is to comment out the tests.
2015-02-23 23:09:19 -05:00
Daniel Blankenberg 8ccf8287b4 Quote commandline arguments for extract genomic DNA tool. 2014-09-02 13:15:17 -04:00
Nate Coraor 9c64fc123e Remove broken and/or obsolete tools. 2014-01-27 13:58:31 -05:00
John Chilton 32b07c04f3 Rev slightly the tool version of extract_genomic_dna.xml since output is slightly different.
Update tool help to reflect new output format.
2013-10-25 00:06:14 -04:00
John Chilton 54a3dba91e Update hg17 test case for extract_genomic_dna.xml tor reflect recent changes.
Cannot delete or modify previous output file - it is used as input for another tool. Use assertion testing to weaken test case. As this tool is migrated to the tool shed the hg17 test cases should probably be eliminated completely.
2013-10-25 00:03:57 -04:00
Bjoern Gruening f444f30235 bugfix and one test fix 2013-10-24 18:13:18 +02:00
Bjoern Gruening 11b74295d2 Add the value (nameCol) in a given BED file to the FASTA header. 2013-10-18 18:31:44 +02:00
John Chilton 0d3922850e Add ucsc_tools requirement for extract_genomic_dna.xml tool. 2013-09-03 12:32:02 -05:00
Dave Clements f706f34948 Replaced "query" with "dataset" in a number of tool definition XML files.
I got tired of coming across "query" when doing workshops.
2013-01-14 16:13:54 -08:00
Jeremy Goecks 2ebe0eb774 Clean up temp files. 2012-03-09 16:11:21 -05:00
Ross Lazarus d5bd7132c1 remove validator from input genome - as Jeremy pointed out it will prevent the use of an unspecified build local genome. 2012-02-25 08:48:03 +11:00
Ross Lazarus 4c23088864 Add a validator type="unspecified_build"
to extract genomic dna tool
2012-02-24 18:27:34 +11:00
Jeremy Goecks 08cfd112cd (1) GFF parsing improvements; and (2) output improvements for extract genomic dna tool. 2011-08-14 19:49:26 -04:00
Peter Cock 29bc117ac1 Add missing requirement and fix incorrect help text in extract sequence tool 2011-08-12 10:33:26 +01:00
Jeremy Goecks 92e2f4f48b Remove unspecified build validator from extract_genomic_dna tool because it can work with a custom fasta. 2011-08-11 09:53:14 -04:00
Guruprasad Anada feb0b91aba Added additional options to the liftOver tool. It now supports GFF and GTF formats and allows multiple output regions and related options. 2011-07-26 16:14:31 -04:00
Jeremy Goecks 108e3f8494 Fix bug in extract_genomic_dna to handle non-GFF files when interpret features is true. Tweak functional test to cover new behavior. 2011-02-16 21:46:23 -05:00
Jeremy Goecks ae6cb82e01 Bug fix: do not fix strand in extract_genomic_dna tool. 2011-02-16 12:56:18 -05:00