"""Input/output functions for Phaser."""

from haplophaser.io.assembly import (
    Assembly,
    Contig,
    Scaffold,
    ScaffoldComponent,
    extract_region,
    get_contig_sequence,
    iter_fasta,
    parse_gfa_segments,
    write_fai,
    write_fasta,
)
from haplophaser.io.assembly_export import (
    export_all_painting_formats,
    export_chimeras_bed,
    export_chimeras_tsv,
    export_haplotype_fastas,
    export_painted_agp,
    export_painting_bed,
    export_painting_json,
    export_painting_tsv,
    export_qc_report_json,
    export_qc_report_txt,
    export_subgenome_assignments_tsv,
)
from haplophaser.io.exports import (
    export_all_analysis_formats,
    export_cluster_results,
    export_hmm_posteriors,
    export_hmm_smoothed_proportions,
    export_painting_bed,
    export_painting_matrix,
    export_population_summary,
    export_qc_report,
    export_qc_warnings,
    export_sample_summary,
    export_shared_blocks,
    export_similarity_matrix,
    export_summary_json,
    export_viterbi_path,
)
from haplophaser.io.markers import (
    export_all_marker_formats,
    export_density_bedgraph,
    export_founder_matrix_tsv,
    export_gaps_bed,
    export_markers_bed,
    export_markers_tsv,
    export_markers_vcf,
    export_quality_report,
)
from haplophaser.io.orthofinder import (
    OrthoFinderResults,
    Orthogroup,
    PhylogeneticPlacement,
    load_gene_to_contig_mapping,
)
from haplophaser.io.populations import (
    PopulationSpec,
    PopulationValidationResult,
    get_all_samples,
    get_derived_sample_names,
    get_founder_sample_names,
    get_samples_by_role,
    infer_populations_from_vcf,
    load_populations,
    load_populations_tsv,
    load_populations_yaml,
    validate_populations_against_vcf,
    write_populations_tsv,
    write_populations_yaml,
)
from haplophaser.io.proportions import (
    export_all_proportion_formats,
    export_blocks_bed,
    export_blocks_tsv,
    export_breakpoints_bed,
    export_breakpoints_tsv,
    export_genome_wide_tsv,
    export_proportions_bedgraph,
    export_proportions_json,
    export_proportions_tsv,
)
from haplophaser.io.vcf import (
    MultiallelicMode,
    Region,
    VCFReader,
    VCFStats,
    count_variants,
    get_sample_names,
    get_vcf_contigs,
    get_vcf_stats,
    iter_variants,
    load_regions_from_bed,
    load_vcf,
    read_vcf,
    read_vcf_region,
    validate_vcf_samples,
)

__all__ = [
    # Assembly classes
    "Assembly",
    "Contig",
    "Scaffold",
    "ScaffoldComponent",
    # Assembly functions
    "iter_fasta",
    "get_contig_sequence",
    "extract_region",
    "write_fasta",
    "write_fai",
    "parse_gfa_segments",
    # Assembly painting exports
    "export_painting_tsv",
    "export_painting_bed",
    "export_painting_json",
    "export_chimeras_tsv",
    "export_chimeras_bed",
    "export_subgenome_assignments_tsv",
    "export_haplotype_fastas",
    "export_painted_agp",
    "export_qc_report_txt",
    "export_qc_report_json",
    "export_all_painting_formats",
    # OrthoFinder classes
    "OrthoFinderResults",
    "Orthogroup",
    "PhylogeneticPlacement",
    "load_gene_to_contig_mapping",
    # VCF classes
    "VCFReader",
    "VCFStats",
    "Region",
    "MultiallelicMode",
    # VCF functions
    "read_vcf",
    "load_vcf",
    "iter_variants",
    "read_vcf_region",
    "get_sample_names",
    "get_vcf_contigs",
    "get_vcf_stats",
    "count_variants",
    "load_regions_from_bed",
    "validate_vcf_samples",
    # Population classes
    "PopulationSpec",
    "PopulationValidationResult",
    # Population functions
    "load_populations",
    "load_populations_tsv",
    "load_populations_yaml",
    "write_populations_tsv",
    "write_populations_yaml",
    "validate_populations_against_vcf",
    "infer_populations_from_vcf",
    "get_all_samples",
    "get_samples_by_role",
    "get_founder_sample_names",
    "get_derived_sample_names",
    # Marker export functions
    "export_markers_bed",
    "export_markers_vcf",
    "export_markers_tsv",
    "export_quality_report",
    "export_gaps_bed",
    "export_density_bedgraph",
    "export_founder_matrix_tsv",
    "export_all_marker_formats",
    # Proportion export functions
    "export_proportions_tsv",
    "export_proportions_bedgraph",
    "export_genome_wide_tsv",
    "export_proportions_json",
    "export_blocks_bed",
    "export_blocks_tsv",
    "export_breakpoints_bed",
    "export_breakpoints_tsv",
    "export_all_proportion_formats",
    # Analysis export functions
    "export_hmm_posteriors",
    "export_hmm_smoothed_proportions",
    "export_viterbi_path",
    "export_sample_summary",
    "export_population_summary",
    "export_summary_json",
    "export_painting_matrix",
    "export_painting_bed",
    "export_similarity_matrix",
    "export_cluster_results",
    "export_shared_blocks",
    "export_qc_report",
    "export_qc_warnings",
    "export_all_analysis_formats",
]
