Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encode hash result in hash_starts_numeric #85

Merged
merged 1 commit into from Aug 25, 2020

Conversation

nileshpatra
Copy link
Contributor

run_filter.sh ends up with the following:

Traceback (most recent call last):
  File "/usr/bin/seqmagick", line 11, in <module>
    load_entry_point('seqmagick==0.0.0', 'console_scripts', 'seqmagick')()
  File "/usr/lib/python3/dist-packages/seqmagick/scripts/cli.py", line 29, in main
    return action(arguments)
  File "/usr/lib/python3/dist-packages/seqmagick/subcommands/convert.py", line 354, in action
    transform_file(src, dest, arguments)
  File "/usr/lib/python3/dist-packages/seqmagick/subcommands/convert.py", line 318, in transform_file
    SeqIO.write(records, destination_file, destination_file_type)
  File "/usr/lib/python3/dist-packages/Bio/SeqIO/__init__.py", line 556, in write
    for record in sequences:
  File "myfunctions.py", line 17, in hash_starts_numeric
    seq_hash = hashlib.sha1(str(record.seq)).hexdigest()
TypeError: Unicode-objects must be encoded before hashing

This is an attempt to fix it.

@nileshpatra
Copy link
Contributor Author

nileshpatra commented Aug 16, 2020

The travis test failures are not due to this PR, but due to deprecated biopython triefind.
cc: #84

@nileshpatra
Copy link
Contributor Author

@jgallowa07 could you please review this?
The test fail because of missing Biopython trie forwhich you just merged my other PR on.
On re-triggering the build, this would pass. But probably only you could do that.

@jgallowa07
Copy link
Collaborator

@nileshpatra This looks great. However, I assume you're going to need to merge/rebase this branch with the new master so we get the

- "pip install -q biopython nose pygtrie"
in the build/travis for this to pass.

@nileshpatra
Copy link
Contributor Author

@jgallowa07 Done. Please Merge :-)

@jgallowa07 jgallowa07 merged commit 84e1895 into fhcrc:master Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants