Package: gnomic
Gnomic is a human– and computer–readable representation of microbial genotypes and phenotypes. ThegnomicPython package contains a parser for the Gnomic grammar able to interpret changes over multiple generations.The first formal guidelines for microbial genetic nomenclature were drawn up in the 1960s. These traditional nomenclatures are too
ambiguous to be useful for modern computer-assisted genome engineering. Thegnomicgrammar is an improvement over existing nomenclatures, designed to be clear, unambiguous, computer–readable and describe genotypes at various levels of detail.InstallationpipinstallgnomicLanguage grammarThe grammar consists of a list of genotype or phenotype designations, separated by
spaces and/or commas. The designations are described using the following nomenclature:DesignationGrammar expressionfeaturedeleted-featurefeatureatlocusdeleted-feature@locusfeatureinserted+featuresitereplaced withfeaturesite>featuresite(multiple integration) replaced withfeaturesite>>featuresiteatlocusreplaced withfeaturesite@locus>featurefeatureoforganismorganism/featurefeaturewithtypetype.featurefeaturewith variantfeature(variant)featurewith list of variantsfeature(var1, var2)orfeature(var1; var2)featurewith accession numberfeature#GB:123456featureby accession number#GB:123456accession number#database:idor#idfusion offeature1andfeature2feature1:feature2insertion of two fused features+feature1:feature2insertion of a list of features or fusions+{..insertables}fusion of a list and a feature{..insertables}:featurea non-integrated plasmid(plasmid)or(plasmid...insertables)integrated plasmid vector with required insertion sitesite>(vector..insertables)Feature variantsFeatures may have one or more variants, separated by colon “;” or comma “,”.For example:geneX(cold-resistant;heat-resistant)Variants can either be identifiers (using the characters a-z, 0-9, “-” and “_”) or be sequence variants following
the HGVSSequence Variant Nomenclature.For example:geneY(c.123G>T)Example usageIn this example, we parse“EcGeneA ΔsiteA::promoterB:EcGeneB ΔgeneC”and“ΔgeneA”ingnomicsyntax:>>>fromgnomicimportGenotype>>>g1=Genotype.parse('+Ec/geneA(variant) siteA>P.promoterB:Ec/geneB -geneC')>>>g1.added_features{Feature(organism='Ec',name='geneA',variant=('variant',)),Feature(organism='Ec',name='geneB'),Feature(type='P',name='promoterB')}>>>g1.removed_features{Feature(name='geneC'),Feature(name='siteA')}>>>g2=Genotype.parse('-geneA',parent=g1)>>>g2.added_features{Feature(type='P',name='promoterB'),Feature(name='geneB',organism='Ec')}>>>g2.removed_features{Feature(name='siteA'),Feature(name='geneC')}>>>g2.changes()(Change(multiple=False,after=Fusion(annotations=(Feature(type='P',name='promoterB'),Feature(organism='Ec',name='geneB'))),before=Feature(name='siteA')),Change(multiple=False,before=Feature(name='geneC')))>>>g2.format()'ΔsiteA→P.promoterB:Ec/geneB ΔgeneC'DevelopmentTo rebuild the gnomic parser usinggrako(version 3.18.1), run:grako gnomic-grammar/genotype.enbf -o gnomic/grammar.py -m GnomicReferencesWikipedia — Bacterial genetic nomenclatureJournal of Bacteriology — Instructions to AuthorsHuman Genome Variation Society — Recommendations for the description of sequence variantsDatabases cross-referenced in UniProtKB