Unfortnately this doens't produce the test-data output on python 3 and
so I added a requiremtn on python 2. (I think the result is probably
correct but not deterministic).
Turns out integers are used as is in `random.seed()`, but strings are
hashed (in the version 1 protocol), and the hashing isn't stable. So
instead we hack around this by using `ord()` on each character and
concatenating the digits. Yucky, but probably better than using numpy
and putting this tool on the list of tools that inherit galaxy's
environment (or adding a requirement tag and resolving with conda ...).
random.seed has changed in python 3, and while there's backwards
compatibility using `version=1`, random.randint and random.sample have
also changed. The most striaghtforward change without adding additional
dependencies then was to copy those methods from the python 2.7 source
code.
Also:
- Remove deprecated `interpreter` attribute of `<command>`
- Single-quote text and data parameters inside the command
- Fix wrong `name` attribute of `output` in 3 tests
- Linting and cleanups
This does undo an attempt that Nate made to auto sniff fastq.gz files when they can't be converted anyway, but that was kind of broken in its own way.
From Gitter:
jmchilton: natefoo "# Link mode can't decompress anyway, so enable sniffing for keep-compressed datatypes even when auto_decompress is enabled" Did you test this hack? I get the thought process but it seems like it results in uploaded fastq.gz files defaulting to fastqcssanger.gz? Maybe it didn't at some point though?
Nate Coraor: ummmmmmmmmmmm maybe probably not
John Chilton: I have four fixes for compressed datatypes that all fall apart because of this hack... can I just use the configured sniff order or do you want me to try to preserve this and write a test case
Nate Coraor: nah go ahead and de-hack
John Chilton: There is a good argument to be made for making the behavior more consistent anyway right? Cool thanks