The jpredapi API Reference

jpredapi Python library

The RESTful API allows JPred users to submit jobs from the command-line.

Usage example for command-line:

python3 -m jpredapi --help
python3 -m jpredapi --version
python3 -m jpredapi submit --mode=single --format=raw --seq=MQVWPIEGIKKFETLSYLPP
python3 -m jpredapi status --job_id=jp_K46D05A
python3 -m jpredapi get_results --job_id=jp_K46D05A --results_dir=jpred_sspred/results
python3 -m jpredapi quota --email=name@domain.com

Usage example for interactive Python shell:

>>> import jpredapi
>>>
>>> jpredapi.submit(mode="single", user_format="raw", seq="MQVWPIEGIKKFETLSYLPP")
>>>
>>> jpredapi.status(job_id="jp_K46D05A")
>>>
>>> jpredapi.get_results(job_id="jp_K46D05A", results_dir_path="jpred_sspred/results")
>>>
>>> jpredapi.quota(email="name@domain.com")
>>>
jpredapi.api.submit(mode, user_format, file=None, seq=None, skipPDB=True, email=None, name=None, silent=False)[source]

Submit job to Jpred server.

Parameters:
  • mode (str) – Submission mode, possible values: single, batch, msa.
  • user_format (str) – Submission format, possible values: raw, fasta, msf, blc.
  • file (str) – Filename of a file with the job input (sequence or msa).
  • seq (str) – Amino acid sequence passed as string of single-letter code without spaces, e.g. –seq=ATWFGTHY
  • skipPDB (True or False) – PDB check will not be performed (True), otherwise perform PDB check (False).
  • email (str) – E-mail address.
  • name (str) – Job name.
  • silent (True or False) – Print information about job submission.
Returns:

None

Return type:

None

jpredapi.api.status(*args, **kw)[source]

Check status of submitted job.

Parameters:
  • job_id (str) – Job id.
  • results_dir_path (str) – Directory path where to save results if job is finished.
  • extract (True or False) – Extract (True) or not (False) results into directory.
  • silent (True or False) – Print information about job status.
Returns:

None

Return type:

None

jpredapi.api.get_results(job_id, results_dir_path=None, extract=False, silent=False)[source]

Download results from Jpred server.

Parameters:
  • job_id (str) – Job id.
  • results_dir_path (str) – Path where to save results.
  • extract (True or False) – Extract from tar.gz archive.
  • silent (True or False) – Print information.
Returns:

None

Return type:

None

jpredapi.api.quota(email, host='http://www.compbio.dundee.ac.uk/jpred4/cgi-bin/rest', suffix='quota')[source]

Check how many jobs you have already submitted on a given day (out of 1000 maximum allowed jobs per user per day).

Parameters:
  • email (str) – E-mail address.
  • host (str) – Jpred host address.
  • suffix (str) – Host address suffix.
Returns:

None

Return type:

None