A genome file may be submitted to CoGe for viewing within their genome viewer. This endpoint will share the given genome files with the CoGe user, then submit those paths to their “genome load” service. This service will return a URL where the authenticated user may view the genome viewer’s progress, and the genome visualization once processing is done.
URL Path: /coge/genomes/load
HTTP Method: POST
Error Codes: ERR_NOT_A_USER, ERR_BAD_OR_MISSING_FIELD, ERR_DOES_NOT_EXIST, ERR_NOT_OWNER
Request Query Parameters:
Request Body:
{
"paths": [
"/iplant/home/ipctest/simple.fasta"
]
}
Response Body:
{
"coge_genome_url": "http://bit.ly/CoGeSample"
}
Curl Command:
curl -sH "$AUTH_HEADER" -d '{"paths":["/iplant/home/ipctest/simple.fasta"]}' http://127.0.0.1:3000/coge/genomes/load
A user may search for genome information in CoGe in order to retrieve a text representation of that genome for use in DE analyses.
URL Path: /coge/genomes
HTTP Method: GET
Error Codes: ERR_REQUEST_FAILED
Request Query Parameters:
Response Body:
{
"genomes": [
{
"chromosome_count": 35,
"description": null,
"id": 9716,
"info": "Actinomyces coleocanis strain DSM 15436 (v1, id9716): unmasked",
"link": null,
"name": null,
"organism": {
"description": "Bacteria; Actinobacteria; Actinobacteridae; Actinomycetales; Actinomycineae; Actinomycetaceae; Actinomyces",
"id": 23534,
"name": "Actinomyces coleocanis strain DSM 15436"
},
"organism_id": 23534,
"restricted": false,
"sequence_type": {
"description": "unmasked sequence data",
"id": "1",
"name": "unmasked"
},
"version": "1"
},
...
}
}
Note: the response body from CoGe is passed back to the caller without modification.
Curl Command:
$ curl -sH "$AUTH_HEADER" "http://127.0.0.1:3000/coge/genomes?search=canis" | python -mjson.tool
Once a user has found an interesting genome, he or she may request a text representation of the genome to be stored in the iPlant Data Store for processing in the DE.
URL Path: /coge/genomes/{genome-id}/export-fasta
HTTP Method: POST
Error Codes: ERR_REQUEST_FAILED
Request Query Parameters:
Response Body:
{
"id": 30702,
"success": true
}
Note: the response body from CoGe is passed back to the caller without modification.