Skip to content
New issue

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

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

Already on GitHub? # to your account

Version in APT doesn't have correct dependenceis #187

Closed
CholoTook opened this issue Feb 17, 2022 · 2 comments
Closed

Version in APT doesn't have correct dependenceis #187

CholoTook opened this issue Feb 17, 2022 · 2 comments

Comments

@CholoTook
Copy link

Hi,

I ran sudo apt install python3-pyfaidx and it created the faidx python script in my path. However, when I run:

faidx Homo_sapiens.GRCh37.dna.primary_assembly.fa.gz

I get the following error:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pyfaidx/__init__.py", line 344, in __init__
    from Bio import bgzf
ModuleNotFoundError: No module named 'Bio'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/faidx", line 11, in <module>
    load_entry_point('pyfaidx==0.5.8', 'console_scripts', 'faidx')()
  File "/usr/lib/python3/dist-packages/pyfaidx/cli.py", line 195, in main
    write_sequence(args)
  File "/usr/lib/python3/dist-packages/pyfaidx/cli.py", line 19, in write_sequence
    fasta = Fasta(args.fasta, default_seq=args.default_seq, key_function=eval(args.header_function), strict_bounds=not args.lazy, split_char=args.delimiter, filt_function=filt_function, read_long_names=args.long_names, rebuild=not args.no_rebuild)
  File "/usr/lib/python3/dist-packages/pyfaidx/__init__.py", line 991, in __init__
    self.faidx = Faidx(
  File "/usr/lib/python3/dist-packages/pyfaidx/__init__.py", line 350, in __init__
    raise ImportError(
ImportError: BioPython >= 1.73 must be installed to read block gzip files.
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_faidx.1000.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pyfaidx/__init__.py", line 344, in __init__
    from Bio import bgzf
ModuleNotFoundError: No module named 'Bio'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/faidx", line 11, in <module>
    load_entry_point('pyfaidx==0.5.8', 'console_scripts', 'faidx')()
  File "/usr/lib/python3/dist-packages/pyfaidx/cli.py", line 195, in main
    write_sequence(args)
  File "/usr/lib/python3/dist-packages/pyfaidx/cli.py", line 19, in write_sequence
    fasta = Fasta(args.fasta, default_seq=args.default_seq, key_function=eval(args.header_function), strict_bounds=not args.lazy, split_char=args.delimiter, filt_function=filt_function, read_long_names=args.long_names, rebuild=not args.no_rebuild)
  File "/usr/lib/python3/dist-packages/pyfaidx/__init__.py", line 991, in __init__
    self.faidx = Faidx(
  File "/usr/lib/python3/dist-packages/pyfaidx/__init__.py", line 350, in __init__
    raise ImportError(
ImportError: BioPython >= 1.73 must be installed to read block gzip files.

When I hit apt search BioPython, I see:

p   python3-biopython Python3 library for bioinformatics                                                                    

So that package should be a dep for python3-pyfaidx I think...

Many thanks for your work on this software!

Sincerely,
Dan

@mdshw5
Copy link
Owner

mdshw5 commented Feb 19, 2022

Thanks Dan. This would be something to refer to the Debian Med project, who do the debian packaging for this module. As far as I'm concerned though, I would opt to keep biopython as a recommendation, not a dependency. This is the reason I don't have biopython as a dependency for the python package. My reasoning for this used to be that I was supporting python versions that biopython doesn't support, but now I would imagine this is less of an issue. If I make more progress on #164 and #153 I may consider adding explicit dependency.

@CholoTook
Copy link
Author

CholoTook commented Feb 21, 2022 via email

@mdshw5 mdshw5 closed this as completed May 18, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants