I'm pretty new to Google genomics APIs. I'm trying to create an annotation. I used both web version and Python API call:
service.annotations().create(body={ 'annotationSetId': '101', 'name': 'TestAnnotation', 'referenceName': 'chrM', 'start': '1', 'end': '1'}, fields='id')
Here is a sample annotation:
{
"annotationSetId": "101",
"name": "TestAnnotation",
"referenceName": "chrM",
"start": "1",
"end": "1",
}
I get the following error for both cases:
500 Internal Server Error
{
"error": {
"code": 500,
"message": "Unknown Error.",
"status": "UNKNOWN"
}
}
Any Suggestion?
One more observation.
We can add a variant set by only submitting datasetId and name; no need to specify referenceId, but we cannot create an annotation set w/o referenceId. Why?
400 HTTP/2.0 400
- SHOW HEADERS -
{
"error": {
"code": 400,
"message": "Invalid value for field \"annotationSet.referenceSetId\": empty or not specified",
"status": "INVALID_ARGUMENT"
}
}
BTW, how can I set the WRITE permission for the caller?
Caller must have WRITE permission for the associated annotation set.
Thank you in advance!