The command line tools offer a number of interesting features that can be used to help setup and retrieve data from the application.
The command line tools are located in docs/web_services/examples, and they are mostly small scripts that automate the usage of the the web services API.
Example:
get_gff3.groovy -organism Amel_4.5 -username [email protected] \
-password admin_password -url http://localhost:8080/apollo > my output.gff3
This command can accept an -output argument to output to file, or the stdout can be redirected.
The -username and -password can be specified via the command line or if omitted, the user will be prompted.
Example:
get_fasta.groovy -organism Amel_4.5 -username [email protected] \
-password admin_password -seqtype cds/cdna/peptide -url http://localhost:8080/apollo > output.fa
This command can accept an -output argument to output to file, or the stdout can be redirected.
The -username and -password can be specified via the command line (similar to get_gff3.groovy
) or if omitted, the user
will be prompted.
Example:
add_users.groovy -username [email protected] -password admin_password \
-newuser [email protected] -newpassword newuserpass \
-destinationurl http://localhost:8080/apollo
The -username and -password refer to the admin user, and they can also be specified via stdin instead of the command line if they are omitted.
A list of users specified in a csv file can also be used as input.
Example:
add_organism.groovy -name yeast -url http://localhost:8080/apollo/ \
-directory /opt/apollo/yeast -username [email protected] -password admin_password
The -directory refers to the jbrowse data directory containing the output from prepare-refseqs.pl, flatfile-to-json.pl, etc. The -blatdb is optional, -genus, and -species are optional.
The -username and -password refer to the admin user, and they can also be specified via stdin instead of the command line if they are omitted.
Example:
docs/web_services/examples/groovy/delete_annotations_from_organism.groovy -destinationurl http://localhost:8080/apollo\
-organismname honeybee2
This script will delete any annotations associated with a given organism.