Skip to content

Error with mash screen + download_fasta (AssertionError: Response status is 500) #5

Description

@CSouque

Hi!

I cloned plsdbapi from the repo and followed the recommendation to change the code as you explain in #4, but I am running into errors both when screening and downloading fasta:

25:10:26 15:14:10 - plsdbapi_logger - INFO - START sequence search
---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
Cell In[2], line 3
      1 plasmid = 'po_1.fasta'
----> 3 df = query.query_plasmid_sequence('mash_screen', ifile=plasmid, mash_max_v=0, mash_min_i=0.999)

File ~/miniforge3/envs/analysis/lib/python3.14/site-packages/plsdbapi/query.py:231, in query_plasmid_sequence(search_type, ifile, iseq, seqname, mash_max_v, mash_max_d, mash_min_i, mash_screen_w, mash_dist_i, blastn_min_i, blastn_min_c, tblastn_min_c)
    228 while data['label'] != 'finished':
    229     if data['label'] in errors:
    230         # error occurred on server side
--> 231         raise Exception("Returned response: " + data['label'] + ' Please check again your input file and the input specifications as well as the chosen search_type.')
    232     if data['label'] == 'invalid post':
    233         raise Exception("Submission failed. " + data['error'])

Exception: Returned response: error Please check again your input file and the input specifications as well as the chosen search_type.

And similarly when I try to download a file:

--------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
Cell In[3], line 1
----> 1 query.download_fasta(['NC_011102.1', 'NC_01110'])

File ~/miniforge3/envs/analysis/lib/python3.14/site-packages/plsdbapi/query.py:69, in download_fasta(ids)
     67 # send first request to start preparing fasta file
     68 response = requests.post(url=URL + 'fasta', data=PARAMS)
---> 69 assert response.status_code == 200, "Response status is %s" % response.status_code
     70 d = response.json()
     71 if 'job_id' in d:

AssertionError: Response status is 500

Thanks in advance! This package looks like it could be very useful :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions