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

autometa-coverage doesn't accept gzipped input #125

Closed
jason-c-kwan opened this issue Mar 12, 2021 · 0 comments · Fixed by #129
Closed

autometa-coverage doesn't accept gzipped input #125

jason-c-kwan opened this issue Mar 12, 2021 · 0 comments · Fixed by #129
Assignees
Labels
enhancement New feature or request

Comments

@jason-c-kwan
Copy link
Collaborator

Current Behavior

When giving autometa-coverage a gzipped input fasta, we get an error. Users might do this if they are trying to work on the example datasets and they feel like skipping the length-filtering step or just want to use the filtered fasta we provide.

Steps to Reproduce

autometa-coverage --from-spades --assembly metagenome.filtered.fna.gz --out coverage_table.tsv

Traceback (most recent call last):
  File "/opt/conda/bin/autometa-coverage", line 33, in <module>
    sys.exit(load_entry_point('Autometa==2.0a0', 'console_scripts', 'autometa-coverage')())
  File "/opt/conda/lib/python3.8/site-packages/Autometa-2.0a0-py3.8.egg/autometa/common/coverage.py", line 296, in main
    records = [rec for rec in SeqIO.parse(args.assembly, "fasta")]
  File "/opt/conda/lib/python3.8/site-packages/Autometa-2.0a0-py3.8.egg/autometa/common/coverage.py", line 296, in <listcomp>
    records = [rec for rec in SeqIO.parse(args.assembly, "fasta")]
  File "/opt/conda/lib/python3.8/site-packages/Bio/SeqIO/Interfaces.py", line 73, in __next__
    return next(self.records)
  File "/opt/conda/lib/python3.8/site-packages/Bio/SeqIO/FastaIO.py", line 198, in iterate
    for title, sequence in SimpleFastaParser(handle):
  File "/opt/conda/lib/python3.8/site-packages/Bio/SeqIO/FastaIO.py", line 47, in SimpleFastaParser
    for line in handle:
  File "/opt/conda/lib/python3.8/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte

Expected Behavior

We should get no errors, and the file should be read zipped.

Environment Information

autometa --check-dependencies --debug


Run Information

cat path/to/your/input/metagenome.config


cat path/to/your/outdir/metagenome.config


Log information generated by autometa. If you have run autometa with the --log flag, e.g. autometa --log then use the contents of the logfile.


@jason-c-kwan jason-c-kwan added the bug Something isn't working label Mar 12, 2021
@evanroyrees evanroyrees added enhancement New feature or request and removed bug Something isn't working labels Mar 12, 2021
@evanroyrees evanroyrees linked a pull request Mar 12, 2021 that will close this issue
@evanroyrees evanroyrees self-assigned this Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants