Skip to content

Commit

Permalink
added a further exmaple
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandunn committed Sep 29, 2020
1 parent 2268a28 commit 0a063ef
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/web_services/examples/shell/getGff3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh

url=$1
username=$2
password=$3
uniquename=$4

usage() {
echo "Sample script for exporting features from organism as GFF3 via web services"
echo "Usage: ./exportFeatures.sh <complete_apollo_URL> <username> <password> <export_type>"
echo "Example: ./exportFeatures.sh http://localhost:8080/apollo demo demo peptide"
}

if [[ ! -n "$url" || ! -n "$username" || ! -n "$password" || ! -n "$uniquename" ]]; then
usage
exit
fi

echo curl "${url}/annotationEditor/getGff3" -H 'Content-Type: application/json' --data "{'features':[{'uniquename': '${uniquename}'}], 'username': '${username}', 'password': '${password}'}"
curl "${url}/annotationEditor/getGff3" -H 'Content-Type: application/json' --data "{'features':[{'uniquename': '${uniquename}'}], 'username': '${username}', 'password': '${password}'}"

0 comments on commit 0a063ef

Please sign in to comment.