Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/views/names/_nomenclatural_type.json.jbuilder
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
json.class(object ? object.class.to_s : 'unknown')
json.class(object&.respond_to?(:type_of_type) ? object.type_of_type : 'unknown')
json.id(object.try(:id))
json.url(object ? polymorphic_url(object, format: :json) : nil)
json.uri object.try(:uri)
json.display(object.try(:display, false))
json.display(object.try(:display, false))
66 changes: 66 additions & 0 deletions docs/api_glossary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
# API Glossary

This glossary defines the enums, objects, and special fields used in the SeqCode Registry API.

---

## Enums

### `status_name`
The status of a name in the registry. Possible values:

- **`public`**: Publicly available.
- **`automated`**: Automatically generated.
- **`SeqCode`**: Valid under the SeqCode.
- **`ICNP`**: Valid under the International Code of Nomenclature of Prokaryotes.
- **`ICNafp`**: Valid under the International Code of Nomenclature for algae, fungi, and plants.
- **`valid`**: Valid under any code.

---

### `kind` (for genomes)
The kind of genome. Possible values:

- **`isolate`**: Genome from a single isolate.
- **`enrichment`**: Enriched community genome.
- **`mag`**: Metagenome-assembled genome.
- **`sag`**: Single-cell amplified genome.
- **`null`**: Unknown or not applicable.

---

### `rank`
The taxonomic rank of a name. Possible values:

- **`domain`**
- **`kingdom`**
- **`phylum`**
- **`class`**
- **`order`**
- **`family`**
- **`genus`**
- **`species`**
- **`subspecies`**

---

## Special Fields

### `nomenclatural_type` (Object)
The nomenclatural type associated with a name. This is a **hash (object)** with the following structure:

| Key | Type | Description | Example Value |
|-----------|--------|-------------------------------------------------------------------------------------------------|-----------------------------------|
| `class` | string | The **type** of the nomenclatural type. Possible values: `Name`, `Genome`, `Strain`, `Other`, `unknown`. | `"Name"`, `"Genome"`, `"Other"`, `"unknown"` |
| `id` | int | The unique identifier of the nomenclatural type (if applicable). | `26160` |
| `url` | string | The URL to the nomenclatural type resource (if applicable). | `"https://api.seqco.de/v1/names/26160.json"` |
| `uri` | string | The URI of the nomenclatural type (if applicable). | `"https://seqco.de/i:26160"` |
| `display` | string | A human-readable display name for the nomenclatural type (if applicable). | `"Desulfogranum mediterraneum"` |

##### Possible Values for `class`:
- **`"Name"`**: The nomenclatural type is another **Name** (e.g., a type species for a genus).
- **`"Genome"`**: The nomenclatural type is a **Genome** (e.g., a type genome for a species).
- **`"Strain"`**: The nomenclatural type is a **Strain** (e.g., a type strain for a species).
- **`"Other"`**: The nomenclatural type is a **GenericTypeMaterial** (e.g., any other type of material).
- **`"unknown"`**: The nomenclatural type is **not defined** or **unknown**.
Loading