Skip to content

Output Formats

The primary output of eris is a tabular TSV report detailing the evolutionary context of every assembled locus.

Represents a single structural variant or passenger gene record in the eris TSV report.

Attributes:

Name Type Description
locus_id str

Unique identifier for the assembled structural variant locus.

target str

The mobile genetic element(s) or query sequences found in this locus.

gene_id str

The identifier of the contextual passenger or flanking gene.

context str

The spatial relationship (e.g., INSIDE, UPSTREAM) of the gene to the target.

dist_bp int

Distance in base pairs between the gene and the target element.

topo_hops int

Number of graph nodes traversed to find this gene (0 if on the same contig).

orientation str

Strand orientation of the gene relative to the target (same or opposite).

effect str

Biological impact of the insertion on the gene (e.g., TRUNCATED, NONE).

fractional_depth float

The relative read depth of the variant path compared to the source contig, indicating sub-clonal abundance.

Source code in src/eris/io.py
@dataclass(slots=True, frozen=True)
class ReportRow:
    """
    Represents a single structural variant or passenger gene record in the eris TSV report.

    Attributes:
        locus_id: Unique identifier for the assembled structural variant locus.
        target: The mobile genetic element(s) or query sequences found in this locus.
        gene_id: The identifier of the contextual passenger or flanking gene.
        context: The spatial relationship (e.g., INSIDE, UPSTREAM) of the gene to the target.
        dist_bp: Distance in base pairs between the gene and the target element.
        topo_hops: Number of graph nodes traversed to find this gene (0 if on the same contig).
        orientation: Strand orientation of the gene relative to the target (same or opposite).
        effect: Biological impact of the insertion on the gene (e.g., TRUNCATED, NONE).
        fractional_depth: The relative read depth of the variant path compared to the source contig, indicating sub-clonal abundance.
    """
    locus_id: str
    target: str
    gene_id: str
    context: str
    dist_bp: int
    topo_hops: int
    orientation: str
    effect: str
    fractional_depth: float

    @classmethod
    def header(cls) -> str:
        """Returns the TSV header string dynamically generated from the dataclass fields."""
        return "\t".join(cls.__annotations__.keys()) + "\n"

    def to_tsv(self) -> str:
        """Formats the row data into a tab-separated string."""
        return f"{self.locus_id}\t{self.target}\t{self.gene_id}\t{self.context}\t{self.dist_bp}\t{self.topo_hops}\t{self.orientation}\t{self.effect}\t{self.fractional_depth}\n"