Skip to content

Convert Emedgene reports to TSV

convert_emedgene reads an Emedgene (Illumina) Excel report and writes every variant to a TSV file via export_variants, stamping a required sample_name onto each row so outputs from multiple cases can be merged without losing provenance.

CLI

iris-genomics emedgene convert EMG40524006481.xlsx --sample-name Paciente_001

By default the output is written next to the input file as <sample_name>.emedgene.tsv. Override the destination and the Excel sheet read (Emedgene always exports Sheet1, the default):

iris-genomics emedgene convert EMG40524006481.xlsx \
    --sample-name Paciente_001 \
    --output resultados/paciente_001.tsv \
    --sheet Sheet1

Python

from pathlib import Path
from iris.applications.genomics.use_cases.convert_emedgene import convert_emedgene

n = convert_emedgene(
    Path("EMG40524006481.xlsx"),
    sample_name="Patient_001",
    output=Path("patient_001.tsv"),
)
print(f"{n} variants exported")

Requires openpyxl (uv pip install 'iris[genomics]') to read the .xlsx report. Raises FileNotFoundError if the input path does not exist and ValueError if sheet_name is not present in the workbook.

Exporting variants from any pipeline

export_variants is the underlying, format-agnostic use case — convert_emedgene is a thin wrapper around it plus EmedgeneReader. Use it directly whenever you already have a list of VariantAnnotation objects from any source (a pipeline, ZarrVariantStore.fetch(), another reader) and need to write them out:

from pathlib import Path
from iris.adapters.driven.exporters.tsv import TsvVariantExporter
from iris.applications.genomics.use_cases.export_variants import export_variants

export_variants(variants, output=Path("results.tsv"), exporter=TsvVariantExporter())

exporter defaults to TsvVariantExporter() when omitted. An empty variants sequence is a valid no-op — no file is created or truncated.