
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
gnomic-grammar
Advanced tools
Gnomic is a grammar for describing genotypes and phenotypes of microbial strains. It is designed to provide an unambiguous, human and machine readable genotype definition notation with flexibility in the level of detail of the definition. The gnomic-grammar NodeJS package contains methods for parsing and analysis of genotype definitions written in gnomic.
Install the gnomic-grammar package via NPM:
npm install gnomic-grammar
The grammar consists of a space- or *comma-*separated list of genotype or phenotype designations described using the following nomenclature:
| Designation | Grammar expression |
|---|---|
feature deleted | -feature |
feature inserted | +feature |
site replaced with feature | site>feature |
multiple integration site replaced with feature | site>>feature |
feature of organism | organism/feature |
feature with mutation designation | feature(mutation-designation) |
feature with accession number | feature#GB:123456 |
feature from accession number | #GB:123456 |
fusion of feature1 and feature2 | feature1:feature2 |
fusion inserted at site using marker | site>fusion::marker+ |
| phenotype: wild-type | phene+ or phene(wild-type) |
| phenotype: mutant | phene- or phene or phene(mutant) |
| selection marker: used (wild-type) | marker+ |
| selection marker: available (missing/mutant) | marker- |
| a non-integrated plasmid | plasmid{} or plasmid{feature, [...]} |
| plasmid with selection marker | plasmid{feature, [...]}::marker+ |
| integrated vector/plasmid with mandatory integration site | site>vector{feature, [...]} |
nucleotide range of a feature | feature[startBase_endBase] |
coding nucleotide range of a gene | gene[c.startBase_endBase] |
protein amino-acid range of a gene | gene[p.startAA_endAA] |
protein amino-acid of a gene | gene[p.AA] |
feature of type promoter | promoter.promoterName |
| Term | Description |
|---|---|
gene | a feature that is a gene |
feature | a named DNA sequence such as a gene, promoter, or terminator |
site | a feature (such as a gene) with a specific location inside the genome of the original strain |
phene | an identifier for a feature that comes with a variant definition. |
marker | a phenotype important for its role as a selection marker |
| Example code | Description |
|---|---|
X1>{abcD defG}::M2+, XII2>hijK::M2+, M3- | integrate vector containg abcD and defG at X1 using M1 marker, insert hijK at XII2 using M2 marker, state that M3 marker is available (mutant) in strain |
#SGD:YOR202W | insertion of yeast gene 'YOR202W' referenced in the Saccharomyces Genome Database (SGD) |
-CAB5#SGD:YDR196C | deletion of yeast gene 'YDR196C' with standard name 'CAB5' referenced in SGD |
+E.coli/abcD::Leu2+ | insertion of E.coli gene 'abcD' using 'Leu2' selection marker |
-abcD | deletion of feature 'abcD' in the parent strain |
+abcD::His5+ | insertion of feature 'abcD' using the 'His5' selection marker |
efgH>abcD | insertion of feature 'abcD' at the location of 'efgH', substituting (deleting) 'efgH' |
abcD(cr) | presence of gene 'abcD' with 'cr' (i.e. cold-resistant) mutation |
+Pmtr:abcD:Trmt | insertion of the fusion of features 'Pmtr', 'abcD', 'Trmt' |
+promoter.Pmtr:abcD:terminator.Trmt | insertion of the fusion of features 'Pmtr', 'abcD', 'Trmt' with explicit types |
+abcD:efgH:His5+ | insertion of genes 'abcD' and 'efgH' next to each other using the 'His5' selection marker |
Abc+ | Abc wild-type phenotype |
Abc- | Abc mutant phenotype |
p123{} | Plasmid p123 present |
X1>p123{geneA geneB}::KanMX+ | Integration of p123 containing geneA and geneB at X1 using KanMX marker |
Contributions are very welcome. Please create an issue or contact the author (Lars Schöning) if you would like to propose any significant/breaking changes. Let us know if you want to help us out with a Python version of the grammar.
FAQs
A grammar for describing microbial genotypes and phenotypes.
We found that gnomic-grammar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.