gjeunen / reference_database_creator

creating reference databases for amplicon sequencing
MIT License
24 stars 8 forks source link

db_download error #42

Open fang9319 opened 11 months ago

fang9319 commented 11 months ago

System: MacOS Ventura, Python version:3.9.1 crabs:0.1.4

Code: crabs db_download --source ncbi --database nucleotide --query '12S[All Fields] AND ("1"[SLEN] : "50000"[SLEN])' --species zhuangjiang_fish.csv --output zhujiang_fish_ncbi.fasta --keep_original yes --email myemail --batchsize 500000

error report: Traceback (most recent call last): File "/Users/liuzifang/reference_database_creator/crabs", line 1428, in main() File "/Users/liuzifang/reference_database_creator/crabs", line 1425, in main args.func(args) File "/Users/liuzifang/reference_database_creator/crabs", line 80, in db_download speciesTempFileList = wget_ncbi_species(QUERY, DATABASE, EMAIL, BATCHSIZE, OUTPUT, speciesName) File "/Users/liuzifang/reference_database_creator/function/module_db_download.py", line 111, in wget_ncbi_species print(f'downloading {seqcount} sequences from NCBI using the searchterm: {speciesSearchTerm}') UnboundLocalError: local variable 'seqcount' referenced before assignment

I changed the script in module_db_download.py by adding seqcount=0 at line 102, also tried seqcount='', and both worked. When I used the newest version of Crabs on an Ubuntu desktop, I didn't encounter the same error. So I guess it's possibly just happened in the older version of crabs, but I just think it could be helpful for people who encounter similar problems using the old versions.

fang9319 commented 10 months ago

Hi Fabio,

It happened to me after I updated the crabs to v0.1.8 too. Try add seqcount=0 at line 102, it will fix the problem roughly.

Best regards, Zifang

On Sat, 25 Nov 2023 at 00:29, FabioGAmaral @.***> wrote:

It's happening the same to me, crabs version: 0.1.8

— Reply to this email directly, view it on GitHub https://github.com/gjeunen/reference_database_creator/issues/42#issuecomment-1825885932, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMK5ZD6OWMBA2BJYWE4GPKDYGDDNPAVCNFSM6AAAAAA66EB7NKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRVHA4DKOJTGI . You are receiving this because you authored the thread.Message ID: @.***>