# Every key is optional. Explicit CLI arguments override values in preferences.
preferences:
  flank: 0
  # Batch regions render sequentially by default; increase for independent workers.
  threads: 1
  layout: pack
  display_mode: expand
  track_display: pack
  primary_isoforms: all
  sort_by: gap_length
  # Used when sort_by is base; omit it to sort at the window midpoint.
  # sort_base_position: 101867542
  sort_order: desc
  max_alignment_depth: 100
  # Set false for track-only figures such as normalized ChIP-seq profiles.
  show_alignments: true
  show_legend: true
  # none, major, major_minor, or bands
  grid_mode: major
  # Highlight intervals use the same 1-based inclusive syntax as --region.
  # highlight: ["chr1:100100-100250", "chr1:100500-100600"]
  highlight_color: "#ffd54f"
  highlight_alpha: 0.20
  # Horizontal placement of the figure title and subtitle.
  title_align: left
  long_gap_threshold: 10
  min_mapq: 0
  include_secondary: false
  include_supplementary: true
  include_duplicates: false
  min_softclip: 1
  insert_size_sigma: 3.0
  pair_colors: true
  mapq_shading: true
  mapq_cap: 60
  max_reference_span: 250
  show_ideogram: true
  genome: auto
  # Auto-detect hg19/GRCh37 or hg38/GRCh38 and load its cached RefSeq GFF.
  refseq: auto
  # refseq_dir: /path/to/shared/refseq-cache
  show_coverage: true
  coverage_vaf_threshold: 0.20
  min_baseq: 0
  min_variant_mapq: 0
  show_variant_counts: false
  haplotype_view: none
  haplotype_tag: HP
  phase_set_tag: PS
  # Generic scalar SAM tags can colour reads or split them into lanes.
  # group_by_tag: RG
  # color_by_tag: CB
  # tag_filter: [Library_A, Library_B, untagged]
  # tag_label: Library
  # tag_color: ["Library_A=#377eb8", "Library_B=#e6862d"]
  # ONT/PacBio preset; enables strand colours and MM/ML display when available.
  long_read_mode: false
  base_modifications: false
  # modification_code: [5mC, 6mA]
  min_mod_probability: 0.50
  # Collapse positional MI/RX/UB families before layout, depth, and VAF.
  molecule_mode: false
  molecule_tag: auto
  min_family_size: 1
  molecule_position_tolerance: 2
  molecule_consensus_fraction: 0.60
  view_as_pairs: false
  center_guide: false
  sashimi: false
  min_junction_reads: 1
  sashimi_strand: combined
  # Rich RNA preset: classified junctions plus clustered fusion evidence.
  rna_mode: false
  min_junction_anchor: 0
  rna_strandness: alignment
  junction_labels: count
  rna_fusions: false
  min_fusion_reads: 2
  fusion_breakpoint_tolerance: 10
  fusion_min_distance: 100000
  min_fusion_mapq: 20
  mate_view: false
  mate_window_source: discordant
  annotate_gap: true
  show_indel_lengths: false
  fig_width: 14.0
  # Omit output_format to infer it from output_name, falling back to PNG.
  # output_format: png
  dpi: 150

alignment_colors:
  normal: "#b0b0b0"
  large_insert: "#e34948"
  # A slightly darker shade of the RR blue keeps the pair categories related.
  small_insert: "#1029a8"
  # Exact IGV pair-orientation colours: FF maps to IGV LL for an FR library.
  ff: "#009696"
  rr: "#1432c8"
  everted: "#008300"
  # null uses IGV's chromosome-specific mate colours below.
  interchrom: null

# Exact IGV colours used for inter-chromosomal pairs, keyed by mate chromosome.
# Additional contigs are allowed and otherwise receive a deterministic fallback.
chromosome_colors:
  chr1: "#5050ff"
  chr2: "#ce3d32"
  chr3: "#749b58"
  chr4: "#f0e685"
  chr5: "#466983"
  chr6: "#ba6338"
  chr7: "#5db1dd"
  chr8: "#802268"
  chr9: "#6bd76b"
  chr10: "#d595a7"
  chr11: "#924822"
  chr12: "#837b8d"
  chr13: "#c75127"
  chr14: "#d58f5c"
  chr15: "#7a65a5"
  chr16: "#e4af69"
  chr17: "#3b1b53"
  chr18: "#cddeb7"
  chr19: "#612a79"
  chr20: "#ae1f63"
  chr21: "#e7c76f"
  chr22: "#5a655e"
  chrX: "#cc9900"
  chrY: "#99cc00"
  chrUn: "#404040"

base_colors:
  # IGV desktop's default alignment/mismatch nucleotide colours.
  A: "#00ff00"
  C: "#0000ff"
  G: "#d17105"
  T: "#ff0000"
  N: "#898781"

track_colors:
  bed: "#000000"
  gene: "#17217a"
  vcf: "#7a1f5c"
  cnv: "#555555"
  baf: "#7a1f5c"
  peak: "#7b3294"
  signal: "#2c7fb8"
  # Rao-style white-to-red Hi-C defaults. A per-track custom colour replaces
  # the high-contact red while hic_contact_low remains the low-intensity end.
  tad: "#a50f15"
  hic_loop: "#b2182b"
  hic_contact_low: "#fff5f0"

visual_colors:
  # CIGAR insertion events remain distinct from paired-end small inserts.
  insertion: "#4a3aa7"
  deletion: "#0b0b0b"
  reference_skip: "#898781"
  softclip: "#1baf7a"
  coverage: "#a3a3a3"
  gridline: "#e1e0d9"
  gridline_minor: "#eeede8"
  grid_band: "#f4f4f1"
  axis: "#898781"
  primary_text: "#0b0b0b"
  secondary_text: "#52514e"
  legend_edge: "#cfcec8"
  legend_background: "#f5f5f2"
  contrast_edge: "#ffffff"
  label_background: "#ffffff"
  cytoband_edge: "#9a9a9a"
  ideogram: "#c4c4c4"
  ideogram_window: "#d62728"
  centromere: "#b84b4b"
  center_guide: "#52514e"
  breakpoint_link: "#7a1f5c"
  cnv_gain: "#d73027"
  cnv_loss: "#2878b5"
  sashimi_combined: "#24557f"
  sashimi_plus: "#24557f"
  sashimi_minus: "#8b3f73"
  junction_annotated: "#24557f"
  junction_novel: "#e6862d"
  junction_noncanonical: "#a50f15"
  fusion_split: "#7a1f5c"

haplotype_colors:
  "1": "#3b6fb6"
  "2": "#e6862d"
  untagged: "#9b9b96"

# Default and named colours for arbitrary --group_by_tag/--color_by_tag values.
# Unknown values use the deterministic chromosome_palette below.
tag_colors:
  untagged: "#9b9b96"
  # Library_A: "#377eb8"
  # Library_B: "#e6862d"

long_read_colors:
  forward: "#4c78a8"
  reverse: "#e45756"
  supplementary: "#8a60a8"

# Common SAM MM codes receive familiar labels; arbitrary labels may be added.
modification_colors:
  5mC: "#7a1f5c"
  5hmC: "#2c7fb8"
  6mA: "#e6862d"
  other: "#555555"

# Molecule mode distinguishes singletons, multi-read consensus families, and
# duplex families containing evidence from both alignment strands.
molecule_colors:
  singleton: "#a8a8a8"
  consensus: "#4c78a8"
  duplex: "#a50f15"

cytoband_colors:
  gneg: "#ffffff"
  gpos25: "#c8c8c8"
  gpos50: "#969696"
  gpos75: "#646464"
  gpos100: "#1f1f1f"
  gvar: "#dddddd"
  stalk: "#b8d8d8"
  acen: "#d95f5f"

chromosome_palette:
  - "#2a78d6"
  - "#eb6834"
  - "#1baf7a"
  - "#eda100"
  - "#e87ba4"
  - "#008300"
  - "#4a3aa7"
  - "#e34948"

styles:
  # Normal rows remain readable but avoid wasting height in deep regions.
  row_height_in: 0.06
  # At the default 150 DPI, squish rows occupy about 2.25 pixels each.
  squish_row_height_in: 0.015
  row_margin: 0.08
  squish_row_margin: 0.02
  annotation_row_height_in: 0.30
  cnv_track_height_in: 1.15
  baf_track_height_in: 1.05
  peak_track_height_in: 1.05
  hic_track_height_in: 1.20
  coverage_track_height_in: 1.40
  modification_track_height_in: 1.05
  ideogram_height_in: 0.34
  panel_header_height_in: 0.30
  reference_height_in: 0.38
  alignment_alpha: 0.90
  secondary_alignment_alpha: 0.50
  mapq_alpha_floor: 0.15
  coverage_alpha: 0.85
  modification_track_alpha: 0.88
  modification_stem_alpha: 0.34
  modification_marker_size: 13.0
  modification_read_marker_size: 9.0
  modification_letter_min_px: 8.0
  modification_letter_size: 4.0
  molecule_label_min_px: 22.0
  molecule_label_size: 5.2
  # Wide windows use at most this many mean-depth bins per horizontal pixel.
  coverage_bins_per_pixel: 1.00
  reference_base_alpha: 0.20
  # At close zoom, show the sequence of soft-clipped bases inside each cell.
  softclip_base_letter_min_px: 8.0
  softclip_base_letter_size: 4.2
  # Close-zoom insertions use IGV's narrow purple marker with a white I.
  insertion_marker_width_bp: 0.4
  insertion_symbol_min_px: 6.0
  insertion_symbol_size: 4.2
  cnv_fill_alpha: 0.28
  baf_alpha: 0.90
  peak_fill_alpha: 0.55
  # Continuous ChIP/ATAC/DNase signal profiles use their own opacity.
  signal_fill_alpha: 0.82
  density_fill_alpha: 0.45
  # Called TADs use translucent domain triangles and explicit boundaries.
  tad_fill_alpha: 0.13
  tad_boundary_alpha: 0.72
  # BEDPE Hi-C contacts use score-scaled arcs and visible anchor blocks.
  hic_loop_alpha: 0.72
  hic_anchor_alpha: 0.90
  hic_contact_map_alpha: 0.96
  haplotype_lane_alpha: 0.055
  tag_lane_alpha: 0.055
  # Reads have no rectangular border by default.
  alignment_edge_width: 0.00
  squish_alignment_edge_width: 0.00
  # Annotation blocks retain an independent subtle outline.
  annotation_edge_width: 0.30
  pair_link_width: 0.85
  squish_pair_link_width: 0.40
  # CIGAR deletion connectors are slightly stronger than reference skips.
  deletion_line_width: 0.65
  squish_deletion_line_width: 0.30
  # Solid connectors between RNA-seq blocks separated by a CIGAR N operation.
  split_read_line_width: 0.55
  squish_split_read_line_width: 0.30
  grid_line_width: 0.60
  grid_line_alpha: 1.00
  grid_line_style: "-"
  # major_minor divides every major interval into this many cells.
  grid_minor_divisions: 4
  minor_grid_line_width: 0.40
  minor_grid_line_alpha: 0.90
  minor_grid_line_style: ":"
  grid_band_alpha: 0.55
  gene_line_width: 0.55
  primary_gene_line_width: 0.85
  # Every visible intron gets at least one strand-direction arrow.
  gene_arrow_size: 3.10
  gene_arrow_spacing_px: 32.0
  peak_summit_width: 0.85
  signal_line_width: 0.75
  tad_line_width: 1.00
  hic_loop_min_width: 0.65
  hic_loop_max_width: 3.20
  # Values below 1 make weak contacts more visible; 1 is linear intensity.
  hic_contact_gamma: 0.68
  hic_contact_cell_edge_width: 0.12
  # Zero scales each signal automatically. Set a positive common maximum when
  # comparing normalized samples.
  signal_y_max: 0.0
  center_guide_alpha: 0.65
  center_guide_width: 0.80
  center_guide_line_style: "--"
  breakpoint_link_alpha: 0.75
  breakpoint_link_width: 1.10
  breakpoint_link_marker_size: 3.80
  breakpoint_link_line_style: "--"
  legend_font_size: 6.80
  legend_title_size: 7.30
  legend_compartment_gap: 0.010
  sashimi_track_height_in: 1.25
  sashimi_arc_alpha: 0.85
  sashimi_min_line_width: 0.80
  sashimi_max_line_width: 4.00
  sashimi_arc_height: 0.78
  sashimi_label_size: 6.00
  fusion_arc_alpha: 0.88
  fusion_line_width: 1.10
  fusion_marker_size: 17.0
  fusion_label_size: 5.70
