Cannot access vocabulary of a metadata controlled by vocabulary
Hi @romin.benfer,
I faced an issue when wanting to upload data on a S3 resource with the Application Profile FASTA. A metadata field that is controlled by a vocabulary (see https://git.rwth-aachen.de/coscine/graphs/applicationprofiles/-/blob/master/profiles/fasta/index.ttl#L43), but this is not displayed in the SDK.
client = coscine.Client(token)
prj = client.project("AG_CLAVEL_HiBC")
genomes = prj.resource("genomes")
new_fasta = genomes.metadata_form()
print(new_fasta)
which gives the following:
+---+------------------------------------------------+-------+
| C | Property | Value |
+---+------------------------------------------------+-------+
| | FASTQ accession* | |
| | Marker for taxonomic identification* | |
| X | Assembly Quality* | |
| | Assembly Software* | |
| | Coverage* | |
| | Number of Contigs* | |
| | N50 | |
| | Large ribosomal Sub-Unit (e.g. 23S) recovered* | |
| | LSU Recover Software* | |
| | Small ribosomal Sub-Unit (e.g. 16S) recovered* | |
| | SSU Recover Software* | |
| | Number of tRNAs* | |
| | tRNAs Extraction Software* | |
| | Completeness* | |
| | Completeness Software* | |
| | Contamination* | |
+---+------------------------------------------------+-------+
However, querying the vocabulary fails with KeyError
:
new_fasta.vocabulary("Assembly Quality")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/cpauvert/miniconda3/envs/coscine/lib/python3.11/site-packages/coscine/form.py", line 613, in vocabulary
raise KeyError(f"Key '{key}' is not controlled by a vocabulary!")
KeyError: "Key 'Assembly Quality' is not controlled by a vocabulary!"
Could this be related to the Application Profile itself, as with the issue #23 (closed) ? Best, Charlie