Page tree
Skip to end of metadata
Go to start of metadata

DBFetch (Data Retrieval)

Switch to the directory containing the downloaded client program - dbfetch.pl

cd webservice-clients/perl

Run the script without specifying any parameters to print a brief help message :

perl dbfetch.pl

To display a list of the databases supported by DBFetch

perl dbfetch.pl getSupportedDBs

To display a list of the available databases:

perl dbfetch.pl getSupportedFormats

To fetch single entry, provide the db name and the id as given below:

perl dbfetch.pl fetchData <dbname:id> <format> <style>
Example:
perl dbfetch.pl fetchData uniprotkb:WAP_RAT fasta raw

To fetch multiple entries, use fetchBatch method as given below:

perl dbfetch.pl fetchBatch <dbname> <id1,id2,id3> <format> <style>
Example:

perl dbfetch.pl fetchBatch uniprotkb 2SS_RICCO,ALBU_HUMAN fasta raw

NCBI BLAST+ (SSS)

Switch to the directory containing the downloaded client program - ncbiblast.pl

cd webservice-clients/perl

Run the script without specifying any parameters to print a brief help message :

perl  ncbiblast.pl

To display all parameters of the tool, run:

perl ncbiblast.pl --params

To see further details of the parameter, run:

ncbiblast.pl --paramDetail <ParameterName>

Example:

perl ncbiblast.pl --paramDetail program

To run the Blast for a single sequence:

perl ncbiblast.pl --email <email@example.org> --stype protein --program blastp --database mpro sp:wap_pig

To run the job for a batch of sequences use the argument "--multifasta": 

perl ncbiblast.pl --email <email@example.org> --stype protein --program blastp --database mpro --multifasta --maxJobs 5 SeqFile.fasta

If the user wants to retrieve a result later, run jobs in asynchronous mode using the argument “–async”:

perl ncbiblast.pl --async --email <email@example.org> --program blastp -- database uniprotkb --stype protein SeqFile.fasta

If the job submission is successful, the client will provide the job identifier (JobId) in STDOUT. The user has to use the JobId in the result retrieval.

To check the job status before getting the results, run: 

perl ncbiblast.pl --status --jobid <JobId>

The client will tell if the job is RUNNING, ERROR, FAILURE OR FINISHED.

If the job status is FINISHED, get the result types: 

perl ncbiblast.pl --resultTypes –jobid <JobId>

The NCBI BLAST+ web services provide result types of plain output (out), plain input (sequence), alignment identifiers (ids), XML result (xml) and other visualization images in SVG and PNG formats.

If the user wants to retrieve the result of a specific result type, for example, the plain text output (out):

perl ncbiblast.pl –polljob –outformat out -- jobid <JobId> 

To retrieve all available results:

perl ncbiblast.pl --polljob -- jobid <JobId>

Note that the results are stored only for 7 days.

Clustal Omega (MSA)

Switch to the directory containing the downloaded client program - clustalo.pl

cd webservice-clients/perl

Run the script without specifying any parameters to print a brief help message :

perl clustalo.pl

To run the Clustal Omega:

 perl clustalo.pl --email <email@example.org> SeqFile.fasta

Emboss Matcher (PSA)

Switch to the directory containing the downloaded client program - emboss_matcher.pl

cd webservice-clients/perl

Run the script without specifying any parameters to print a brief help message :

perl emboss_matcher.pl

To run the Emboss Matcher:

perl emboss_matcher.pl --asequence sp:WAP_RAT --bsequence sp:WAP_MOUSE --email <email@example.org>

Hmmer3 hmmscan (PFA)

Switch to the directory containing the downloaded client program - hmmer3_hmmscan.pl

cd webservice-clients/perl

Run the script without specifying any parameters to print a brief help message :

perl hmmer3_hmmscan.pl

To run the service:

perl hmmer3_hmmscan.pl inputseq.txt --email <email@example.org>--database pfam

Example for Perl REST Web Services Client Using Docker

You can prefer to run the Perl Sample Clients with Docker. We provide a docker container at https://hub.docker.com/r/ebiwp/webservice-clients/.

For that first Pull the webservice-clients container from Docker Hub:

docker pull ebiwp/webservice-clients

Then run the Perl Clients (Here, dbfetch.pl client as an example) :

docker run --rm -it ebiwp/webservice-clients dbfetch.pl --help


docker run --rm -it ebiwp/webservice-clients dbfetch.pl fetchData uniprotkb:WAP_RAT fasta raw
  • No labels