katholt / srst2

Short Read Sequence Typing for Bacterial Pathogens
Other
125 stars 65 forks source link

getmlst.py crashes with a cryptic error message when downloading "Campylobacter fetus" #19

Closed ppcherng closed 9 years ago

ppcherng commented 9 years ago

When I run this command:

getmlst.py --species "Campylobacter fetus"

I get this error:

For SRST2, remember to check what separator is being used in this allele database Traceback (most recent call last): File "/usr/local/bin/getmlst.py", line 183, in main() File "/usr/local/bin/getmlst.py", line 173, in main m = re.match('>(.)([-])(\d_)',head).groups() AttributeError: 'NoneType' object has no attribute 'groups'

It seems like everything downloaded though, but cfetus.txt doesn't seem to contain any profiles

root@ac486a86e05b:/home# ls C_fe_tkt.tfa Campylobacter_fetus.fasta Cfe_aspA.tfa Cfe_glnA.tfa Cfe_gltA.tfa Cfe_glyA.tfa Cfe_pgm.tfa Cfe_uncA.tfa cfetus.txt mlst_data_download_Campylobacter_fetus_2014-11-29.log

root@ac486a86e05b:/home# cat cfetus.txt Scheme 9 is not available.

This probably isn't something that can be fixed on the SRST2 side since this species doesn't even have any profiles, but it would be nice to have a more meaningful error message when encountering this error mode.

katholt commented 9 years ago

Fixed. Available now in master, will be in release 0.1.5.

ppcherng commented 9 years ago

Sorry, can you point me to the commit in master where this was fixed? The last commit I see for getmlst.py is the fix for issue 18 that deals with slashes (https://github.com/katholt/srst2/issues/18), but I think this is a different error. I might just be looking in the wrong place though...

katholt commented 9 years ago

Oops sorry, closed the wrong one!

You are right, this is not something we can fix.

It looks like the MLST definitions and allele sequence files linked to pubmlst.org are all empty for this new scheme. The MLST scheme website does have alleles & profiles defined though, so if you want to use this scheme immediately you'll need to download the allele files individually and concatenate them, and download the profiles separately.