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

The default_seq argument is not supported with using BGZF compression. #140

Closed
UnkindPartition opened this issue Jun 19, 2018 · 4 comments
Closed
Assignees
Labels

Comments

@UnkindPartition
Copy link

I tried to use faidx to create the chromosome sizes file as recommended here.

My command was

faidx hg38.fa.gz -i chromsizes -o hg38.chromsizes

In response I got an error:

Traceback (most recent call last):
  File "/mnt/fls01-home01/mbmhtrcb/miniconda3/bin/faidx", line 6, in <module>
    sys.exit(pyfaidx.cli.main())
  File "/mnt/fls01-home01/mbmhtrcb/miniconda3/lib/python3.6/site-packages/pyfaidx/cli.py", line 197, in main
    write_sequence(args)
  File "/mnt/fls01-home01/mbmhtrcb/miniconda3/lib/python3.6/site-packages/pyfaidx/cli.py", line 16, 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 "/mnt/fls01-home01/mbmhtrcb/miniconda3/lib/python3.6/site-packages/pyfaidx/__init__.py", line 962, in __init__
    rebuild=rebuild)
  File "/mnt/fls01-home01/mbmhtrcb/miniconda3/lib/python3.6/site-packages/pyfaidx/__init__.py", line 382, in __init__
    "The default_seq argument is not supported with using BGZF compression. Please decompress your FASTA file and try again."
pyfaidx.FetchError: The default_seq argument is not supported with using BGZF compression. Please decompress your FASTA file and try again.

The error is either confusing or wrong because I didn't specify anything similar to a "default_seq argument".

This is pyfaidx version 0.5.3 build py36_0.

@mdshw5 mdshw5 self-assigned this Jun 20, 2018
@mdshw5 mdshw5 added the bug label Jun 20, 2018
@mdshw5
Copy link
Owner

mdshw5 commented Jun 20, 2018

Looks like this file is bgzip compressed, and I'll add this as a supported use case for the faidx cli script. This was an oversight on my part it seems.

mdshw5 added a commit that referenced this issue Jun 20, 2018
Fixes behavior in #140 when BGZF compressed files are passed to `faidx` script
mdshw5 added a commit that referenced this issue Jun 20, 2018
@mdshw5
Copy link
Owner

mdshw5 commented Jun 20, 2018

I've just released a new version (0.5.4.1) that should fix this bug. I'm not sure how you installed pyfaidx, but you can grab the latest version right now using pip install --upgrade pyfaidx or if you installed from bioconda you can wait until my pull request is merged (bioconda/bioconda-recipes#9482)

@mdshw5 mdshw5 closed this as completed Jun 20, 2018
@UnkindPartition
Copy link
Author

Thanks!

@mdshw5
Copy link
Owner

mdshw5 commented Jun 20, 2018

Let me know if you have any further issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants