# oncosplice/__init__.py
from .variants import Mutation, MutationalEvent, MutationLibrary

from .splicing import (
    sai_predict_probs,
    run_spliceai_seq,
    run_splicing_engine,
    predict_splicing,
    adjoin_splicing_outcomes,
    TranscriptLibrary,
    SpliceSimulator,
)

from .oncosplice import Oncosplice

from .pipelines import (
    oncosplice_pipeline,
    oncosplice_top_isoform,
    max_splicing_delta,
    oncosplice_pipeline_single_transcript,  # backwards compat
    # TIS pipelines
    tis_pipeline,
    tis_quick_check,
    combined_pipeline,
    # Unified pipeline
    mutation_pipeline,
    MutationResult,
)

from .folding import (
    # Configuration
    set_folding_data_dir,
    get_folding_data_dir,
    # Core folding
    fold,
    fold_full,
    fold_available,
    compute_delta_mfe,
    compute_folding_profile,
    FoldingProfile,
    WindowResult,
    # Precomputation
    precompute_transcript_deltas,
    precompute_batch,
    # Query
    DeltaTableIndex,
    query_mutation as folding_query_mutation,
    folding_query_batch,
    # Pipeline
    folding_pipeline,
    # Data loading
    load_cds_sequences,
    load_mrna_sequences,
    parse_fasta_metadata,
    select_transcripts,
    load_cds_genome_map,
    load_step1_results,
    ConservedPositionIndex,
)

from .transcription import (
    set_borzoi_model,
    get_borzoi_model_name,
    set_borzoi_device,
    get_borzoi_device,
    predict_transcription_effect,
    transcription_pipeline,
)

from .transcript_tools import run_splicing, run_tis, run_folding, TSSContextLibrary

from .engine import Geney

from .splicing import (
    set_openspliceai_model_dir,
    get_openspliceai_model_dir,
    set_splicing_device,
    get_splicing_device,
)

from .tis import (
    # Configuration
    set_titer_model_dir,
    get_titer_model_dir,
    set_titer_device,
    get_titer_device,
    # Codon prior
    get_codon_score,
    # Low-level prediction
    predict_context_score,
    predict_context_scores_batch,
    predict_tis_score,
    predict_tis_probability,
    predict_tis_probabilities_batch,
    extract_tis_context,
    find_all_atg_positions,
    # Analysis
    analyze_tis_candidates,
    predict_alternative_tis,
    compute_tis_shift_metrics,
    get_tis_summary,
    analyze_transcript_tis,
    TISShiftResult,
    # Visualization
    plot_tis_comparison,
    plot_tis_probability_landscape,
    # Model conversion
    convert_all_models_to_pytorch,
)

__all__ = [
    # Variants
    "Mutation",
    "MutationalEvent",
    "MutationLibrary",
    # Splicing engines
    "sai_predict_probs",
    "run_spliceai_seq",
    "run_splicing_engine",
    "predict_splicing",
    "adjoin_splicing_outcomes",
    # Transcripts and splicing
    "TranscriptLibrary",
    "SpliceSimulator",
    # Pipelines
    "oncosplice_pipeline",
    "oncosplice_top_isoform",
    "max_splicing_delta",
    "oncosplice_pipeline_single_transcript",
    # TIS pipelines
    "tis_pipeline",
    "tis_quick_check",
    "combined_pipeline",
    # Unified pipeline
    "mutation_pipeline",
    "MutationResult",
    # Engine
    "Geney",
    # TITER TIS prediction
    "set_titer_model_dir",
    "get_titer_model_dir",
    "set_titer_device",
    "get_titer_device",
    "get_codon_score",
    "predict_context_score",
    "predict_context_scores_batch",
    "predict_tis_score",
    "predict_tis_probability",
    "predict_tis_probabilities_batch",
    "extract_tis_context",
    "find_all_atg_positions",
    "analyze_tis_candidates",
    "predict_alternative_tis",
    "compute_tis_shift_metrics",
    "get_tis_summary",
    "analyze_transcript_tis",
    "TISShiftResult",
    "plot_tis_comparison",
    "plot_tis_probability_landscape",
    "convert_all_models_to_pytorch",
    # Transcript-level tools
    "run_splicing",
    "run_tis",
    "run_folding",
    "TSSContextLibrary",
    # Splicing configuration
    "set_openspliceai_model_dir",
    "get_openspliceai_model_dir",
    "set_splicing_device",
    "get_splicing_device",
    # mRNA Folding
    "set_folding_data_dir",
    "get_folding_data_dir",
    "fold",
    "fold_full",
    "fold_available",
    "compute_delta_mfe",
    "compute_folding_profile",
    "FoldingProfile",
    "WindowResult",
    "precompute_transcript_deltas",
    "precompute_batch",
    "DeltaTableIndex",
    "folding_query_mutation",
    "folding_query_batch",
    "folding_pipeline",
    "load_cds_sequences",
    "load_mrna_sequences",
    "parse_fasta_metadata",
    "select_transcripts",
    "load_cds_genome_map",
    "load_step1_results",
    "ConservedPositionIndex",
    # Transcription (Borzoi)
    "set_borzoi_model",
    "get_borzoi_model_name",
    "set_borzoi_device",
    "get_borzoi_device",
    "predict_transcription_effect",
    "transcription_pipeline",
]


mut_id = 'KRAS:12:25227343:G:T'
epistasis_id = 'KRAS:12:25227343:G:T|KRAS:12:25227344:A:T'
