Closed kimh11 closed 3 years ago
Hi!
I'm trying to use
vk primer
to design some primers and running into an importError with Bio.Alphabet:vk primer snip --ref=WBcel235 data/test.vcf.gz Traceback (most recent call last): File "/anaconda3/envs/vcf-kit/lib/python3.7/site-packages/vcfkit/primer.py", line 26, in <module> from vcfkit.utils.primer_vcf import primer_vcf File "/anaconda3/envs/vcf-kit/lib/python3.7/site-packages/vcfkit/utils/primer_vcf.py", line 11, in <module> from vcfkit.utils.primer3 import primer3 File "/anaconda3/envs/vcf-kit/lib/python3.7/site-packages/vcfkit/utils/primer3.py", line 9, in <module> from Bio.Alphabet.IUPAC import IUPACAmbiguousDNA as DNA_SET File "/anaconda3/envs/vcf-kit/lib/python3.7/site-packages/Bio/Alphabet/__init__.py", line 21, in <module> "Bio.Alphabet has been removed from Biopython. In many cases, the alphabet can simply be ignored and removed from scripts. In a few cases, you may need to specify the ``molecule_type`` as an annotation on a SeqRecord for your script to work correctly. Please see https://biopython.org/wiki/Alphabet for more information." ImportError: Bio.Alphabet has been removed from Biopython. In many cases, the alphabet can simply be ignored and removed from scripts. In a few cases, you may need to specify the ``molecule_type`` as an annotation on a SeqRecord for your script to work correctly. Please see https://biopython.org/wiki/Alphabet for more information.
I tried simply commenting out the Bio.Alphabet line from the files, but then I get a core dump instead of an output. Do you have suggestions on a better way to get around this error? I installed vcf-kit using the instructions on the GitHub front page.
Thank you!
Since biopython 1.78, Bio.Alphabet was removed, I think downgrade biopython to an older version will solve this.
@SilenWang @kimh11 -
I recommend using the dockerized version of vcf-kit:
docker run -it andersenlab/vcf-kit vk primer
Unfortunately I cannot always keep up with changing python dependencies, but the docker image is much more static and should work.
Please let me know if you run into issues.
Thank you both for your helpful replies!
I ended up using the Docker container with singularity and it's been working great.
singularity pull docker://andersenlab/vcf-kit
singularity run --fakeroot --writable vcf-kit_latest.sif
Hi!
I'm trying to use
vk primer
to design some primers and running into an importError with Bio.Alphabet:I tried simply commenting out the Bio.Alphabet line from the files, but then I get a core dump instead of an output. Do you have suggestions on a better way to get around this error? I installed vcf-kit using the instructions on the GitHub front page.
Thank you!