Skip to content

Class: Contig (Contig)

A reference sequence, chromosome, scaffold, or contig that features are located on.

URI: bfs:class/Contig

 classDiagram
    class Contig
    click Contig href "../../classes/Contig/"
      Contig : contig_id

      Contig : generated_by

      Contig : length_bp

      Contig : lineage_confidence

      Contig : member_of





        Contig --> "*" ContigCollection : member_of
        click ContigCollection href "../../classes/ContigCollection/"



      Contig : source_files

      Contig : taxonomic_lineage

      Contig : topology





        Contig --> "0..1" TopologyEnum : topology
        click TopologyEnum href "../../enums/TopologyEnum/"



      Contig : translation_table

Slots

Name Cardinality and Range Description Inheritance
contig_id 1
String
Native NMDC or source-system identifier for the contig or scaffold direct
member_of *
ContigCollection
Contig collections this contig belongs to, for example its isolate genome, or... direct
length_bp 0..1
Integer
Contig length in base pairs direct
topology 0..1
TopologyEnum
Declared reference topology; circular locations also require length_bp direct
translation_table 0..1
Integer
NCBI genetic code used to translate coding features on this contig, such as 1... direct
taxonomic_lineage *
String
Ranked lineage path, domain to strain, one string per rank direct
lineage_confidence 0..1
Float
Confidence value reported alongside the lineage call direct
generated_by 0..1
String
The workflow execution (or tool run) that produced this ContigCollection, Con... direct
source_files *
uri
Source artifact URLs supporting this record, including any annotation sidecar... direct

Usages

used by used in type used
Dataset contigs range Contig
SequenceFeature seqid any_of[range] Contig
LocationPart seqid range Contig
LocationPart seqid any_of[range] Contig

Identifier and Mapping Information

Schema Source

Mappings

Mapping Type Mapped Value
self bfs:Contig
native bfs:Contig

LinkML Source

Direct

name: Contig
description: A reference sequence, chromosome, scaffold, or contig that features are
  located on.
title: Contig
from_schema: https://w3id.org/ber-data/feature-schemas
slots:
- contig_id
- member_of
- length_bp
- topology
- translation_table
- taxonomic_lineage
- lineage_confidence
- generated_by
- source_files

Induced

name: Contig
description: A reference sequence, chromosome, scaffold, or contig that features are
  located on.
title: Contig
from_schema: https://w3id.org/ber-data/feature-schemas
attributes:
  contig_id:
    name: contig_id
    description: Native NMDC or source-system identifier for the contig or scaffold.
    title: Contig ID
    from_schema: https://w3id.org/ber-data/feature-schemas
    rank: 1000
    identifier: true
    owner: Contig
    domain_of:
    - Contig
    range: string
    required: true
  member_of:
    name: member_of
    description: Contig collections this contig belongs to, for example its isolate
      genome, or both its assembly and its MAG bin.
    title: Member of
    notes:
    - Multivalued because one metagenome contig belongs to its assembly and can also
      be binned into a MAG. Membership in a bin is a statement by the binning workflow,
      so the bin's own generated_by names that workflow rather than the assembly.
    from_schema: https://w3id.org/ber-data/feature-schemas
    rank: 1000
    owner: Contig
    domain_of:
    - Contig
    range: ContigCollection
    multivalued: true
  length_bp:
    name: length_bp
    description: Contig length in base pairs.
    title: Length (bp)
    notes:
    - Compute directly from the contig's own FASTA record where there is one, not
      from a summary statistics file, so it is exact rather than an average.
    - gff3-contig 4.0.0 also takes it from a GFF3 sequence-region directive, under
      the ncbi metadata profile only and only from a single region starting at 1,
      because NCBI writes one region per record from 1 to the record's length (https://github.com/turbomam/feature-table-corpus/issues/46).
      GFF3 lets a region cover part of a sequence, so no other producer's regions
      are used; https://github.com/turbomam/feature-table-corpus/issues/126 tracks
      measuring them.
    from_schema: https://w3id.org/ber-data/feature-schemas
    rank: 1000
    owner: Contig
    domain_of:
    - Contig
    range: integer
    minimum_value: 1
  topology:
    name: topology
    description: Declared reference topology; circular locations also require length_bp.
    from_schema: https://w3id.org/ber-data/feature-schemas
    rank: 1000
    owner: Contig
    domain_of:
    - Contig
    range: TopologyEnum
  translation_table:
    name: translation_table
    description: NCBI genetic code used to translate coding features on this contig,
      such as 11 for bacteria and archaea or 4 for Mycoplasma.
    title: Translation table
    notes:
    - Added for https://github.com/turbomam/feature-table-corpus/issues/46. NMDC writes
      it per CDS as a translation_table attribute, and Prodigal also writes transl_table
      in its per-sequence Model Data comments (docs/source-documents.md). A CDS attribute
      stays in attributes; this slot records the table the contig was translated with.
    - The upper bound is the highest NCBI genetic code identifier in use, 33, as listed
      at https://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi (read 2026-09-25).
      Codes 7, 8 and 17 to 20 are unassigned; scripts/validate_closed.py rejects them.
    from_schema: https://w3id.org/ber-data/feature-schemas
    rank: 1000
    owner: Contig
    domain_of:
    - Contig
    range: integer
    minimum_value: 1
    maximum_value: 33
  taxonomic_lineage:
    name: taxonomic_lineage
    description: Ranked lineage path, domain to strain, one string per rank.
    title: Taxonomic lineage
    notes:
    - Left as a list rather than named rank slots (domain, phylum, class, ...), because
      forcing a fixed depth breaks on any lineage reported at a different resolution.
      Confirmed 2026-09-18 on one real run, per-contig lineage (Scaffold Lineage tsv)
      and per-gene lineage (Gene Phylogeny tsv) for the same organism were reported
      at different depths, 2 ranks versus 8.
    from_schema: https://w3id.org/ber-data/feature-schemas
    rank: 1000
    list_elements_ordered: true
    owner: Contig
    domain_of:
    - Contig
    - ContigCollection
    range: string
    multivalued: true
  lineage_confidence:
    name: lineage_confidence
    description: Confidence value reported alongside the lineage call.
    title: Lineage confidence
    notes:
    - Meaning unverified against any pipeline's own documentation; treat the name
      as descriptive, not confirmed.
    from_schema: https://w3id.org/ber-data/feature-schemas
    rank: 1000
    owner: Contig
    domain_of:
    - Contig
    range: float
  generated_by:
    name: generated_by
    description: The workflow execution (or tool run) that produced this ContigCollection,
      Contig or SequenceFeature.
    title: Generated by
    notes:
    - Confirmed 2026-09-18 against a real biosample's full sequencing, a Contig and
      the Features on it typically come from two DIFFERENT workflow executions, not
      one. A metagenome assembly workflow (e.g. nmdc:wfmgas-11-19jh9v28.1) produces
      the Contig; a separate annotation workflow run against that assembly (e.g. nmdc:wfmgan-11-5xxrm214.2)
      produces the SequenceFeature rows on it. Do not assume one workflow execution
      id covers both.
    from_schema: https://w3id.org/ber-data/feature-schemas
    rank: 1000
    owner: Contig
    domain_of:
    - Contig
    - ContigCollection
    - SequenceFeature
    range: string
  source_files:
    name: source_files
    description: Source artifact URLs supporting this record, including any annotation
      sidecars used.
    title: Source files
    notes:
    - A sidecar may come from a different workflow than generated_by, for example
      annotation lineage on an assembled Contig. Preserve each artifact's workflow
      in its URL or manifest.
    from_schema: https://w3id.org/ber-data/feature-schemas
    rank: 1000
    owner: Contig
    domain_of:
    - Contig
    - ContigCollection
    - SequenceFeature
    range: uri
    multivalued: true