[Version]
  version = 1.8
  name = svrank_model

[Categories]
 [[allele_frequency]]
   category_aggregation = min

 [[clinical_significance]]
   category_aggregation = sum

 [[consequence]]
   category_aggregation = max

 [[gene_intolerance_prediction]]
   category_aggregation = sum

 [[inheritance_models]]
   category_aggregation = min

 [[variant_call_quality_filter]]
   category_aggregate = sum

 [[variant_length]]
    category_aggregation = min

 [[variant_type]]
    category_aggregation = min

[gnomad_sv]
  category = allele_frequency
  data_type = float
  description = Gnomad sv genomes frequency
  field = INFO
  info_key = gnomad_svAF
  record_rule = max
  separators = ',',

  [[not_reported]]
    score = 6

  [[common]]
    score = -12
    lower = 0.02
    upper = 1.1

  [[intermediate]]
    score = 1
    lower = 0.005
    upper = 0.02

 [[rare]]
    score = 2
    lower = 0.0005
    upper = 0.005

 [[very_rare]]
    score = 4
    lower = 0
    upper = 0.0005

[swegen]
  category = allele_frequency
  data_type = float
  description = Swegen genomes frequency
  field = INFO
  info_key = swegenAF
  record_rule = max
  separators = ',',

  [[not_reported]]
    score = 6

  [[common]]
    score = -12
    lower = 0.02
    upper = 1.1

  [[intermediate]]
    score = 1
    lower = 0.005
    upper = 0.02

 [[rare]]
    score = 2
    lower = 0.0005
    upper = 0.005

 [[very_rare]]
    score = 4
    lower = 0
    upper = 0.0005

[sv_len]
  category = variant_length
  data_type = integer
  description = The length of the structural variant
  field = INFO
  info_key = SVLEN
  record_rule = min
  separators = ',',

  [[not_reported]]
    score = 0

  [[long_pos]]
    score = 3
    lower = 1000001
    upper = 100000000

  [[long_neg]]
    score = 3
    lower = -100000000
    upper = -1000001

  [[medium_pos]]
    score = 3
    lower = 50001
    upper = 1000000

  [[medium_neg]]
    score = 3
    lower = -1000000
    upper = -50001

[gene_intolerance_score]
  category = gene_intolerance_prediction
  data_type = float
  description = Gnomad gene intolerance prediction
  field = INFO
  info_key = most_severe_pli
  record_rule = max
  separators = None

  [[not_reported]]
    score = 0

  [[low_intolerance]]
    score = 0
    lower = 0
    upper = 0.90

  [[medium_intolerance]]
    score = 2
    lower = 0.90
    upper = 0.99

  [[high_intolerance]]
    score = 4
    lower = 0.99
    upper = 1.1

[genetic_models]
  data_type = string
  description = The inheritance models followed for the variant
  category = inheritance_models
  field = INFO
  info_key = GeneticModels
  record_rule = max
  separators = ',', ':', '|',

  [[ad]]
    priority = 1
    score = 3
    string = 'AD'

  [[ad_dn]]
    priority = 1
    score = 3
    string = 'AD_dn'

  [[ar]]
    priority = 1
    score = 3
    string = 'AR_hom'

  [[ar_dn]]
    priority = 1
    score = 3
    string = 'AR_hom_dn'

  [[ar_comp]]
    priority = 1
    score = 3
    string = 'AR_comp'

  [[ar_comp_dn]]
    priority = 1
    score = 3
    string = 'AR_comp_dn'

  [[xr]]
    priority = 1
    score = 3
    string = 'XR'

  [[xr_dn]]
    priority = 1
    score = 3
    string = 'XR_dn'

  [[xd]]
    priority = 1
    score = 3
    string = 'XD'

  [[xd_dn]]
    priority = 1
    score = 3
    string = 'XD_dn'

  [[not_reported]]
    score = 0

[model_score]
  category = variant_call_quality_filter
  data_type = integer
  description = The inheritance model score
  field = INFO
  info_key = ModelScore
  record_rule = min
  separators = ',',':',

  [[not_reported]]
    score = 0

  [[low_qual]]
    score = -5
    lower = 0
    upper = 20

  [[high_qual]]
    score = 0
    lower = 20
    upper = 300

[most_severe_consequence]
  category = consequence
  data_type = string
  description = The most severe consequence for this variant
  field = INFO
  info_key = most_severe_consequence
  record_rule = max
  separators = ',', ':', '|',

  [[transcript_ablation]]
    score = 10
    priority = 6
    string = 'transcript_ablation'

  [[initiator_codon_variant]]
    score = 9
    priority = 5
    string = 'initiator_codon_variant'

  [[frameshift_variant]]
    score = 8
    priority = 5
    string = 'frameshift_variant'

  [[stop_gained]]
    score = 8
    priority = 5
    string = 'stop_gained'

  [[start_lost]]
    score = 8
    priority = 5
    string = 'start_lost'

  [[stop_lost]]
    score = 8
    priority = 5
    string = 'stop_lost'

  [[splice_acceptor_variant]]
    score = 8
    priority = 5
    string = 'splice_acceptor_variant'

  [[splice_donor_variant]]
    score = 8
    priority = 5
    string = 'splice_donor_variant'

  [[coding_sequence_variant]]
    score = 7
    priority = 4
    string = 'coding_sequence_variant'

  [[inframe_deletion]]
    score = 5
    priority = 4
    string = 'inframe_deletion'

  [[transcript_amplification]]
    score = 5
    priority = 4
    string = 'transcript_amplification'

  [[splice_region_variant]]
    score = 5
    priority = 4
    string = 'splice_region_variant'

  [[missense_variant]]
    score = 5
    priority = 4
    string = 'missense_variant'

  [[protein_altering_variant]]
    score = 5
    priority = 4
    string = 'protein_altering_variant'

  [[inframe_insertion]]
    score = 5
    priority = 4
    string = 'inframe_insertion'

  [[incomplete_terminal_codon_variant]]
    score = 5
    priority = 4
    string = 'incomplete_terminal_codon_variant'

 [[non_coding_transcript_exon_variant]]
    score = 3
    priority = 2
    string = 'non_coding_transcript_exon_variant'

  [[synonymous_variant]]
    score = 2
    priority = 2
    string = 'synonymous_variant'

  [[mature_mirna_variant]]
    score = 1
    priority = 2
    string = 'mature_mirna_variant'

  [[non_coding_transcript_variant]]
    score = 1
    priority = 2
    string = 'non_coding_transcript_variant'

  [[regulatory_region_variant]]
    score = 1
    priority = 2
    string = 'regulatory_region_variant'

  [[upstream_gene_variant]]
    score = 1
    priority = 2
    string = 'upstream_gene_variant'

  [[regulatory_region_amplification]]
    score = 1
    priority = 2
    string = 'regulatory_region_amplification'

  [[tfbs_amplification]]
    score = 1
    priority = 2
    string = 'tfbs_amplification'

  [[5_prime_utr_variant]]
    score = 1
    priority = 2
    string = '5_prime_utr_variant'

  [[intron_variant]]
    score = 1
    priority = 2
    string = 'intron_variant'

  [[3_prime_utr_variant]]
    score = 1
    priority = 2
    string = '3_prime_utr_variant'

  [[feature_truncation]]
    score = 1
    priority = 2
    string = 'feature_truncation'

  [[TF_binding_site_variant]]
    score = 1
    priority = 2
    string = 'TF_binding_site_variant'

  [[stop_retained_variant]]
    score = 1
    priority = 2
    string = 'stop_retained_variant'

  [[feature_elongation]]
    score = 1
    priority = 2
    string = 'feature_elongation'

  [[regulatory_region_ablation]]
    score = 1
    priority = 2
    string = 'regulatory_region_ablation'

  [[tfbs_ablation]]
    score = 1
    priority = 2
    string = 'tfbs_ablation'

  [[downstream_gene_variant]]
    score = 1
    priority = 2
    string = 'downstream_gene_variant'

  [[NMD_transcript_variant]]
    score = 1
    priority = 2
    string = 'NMD_transcript_variant'

  [[intergenic_variant]]
    score = 0
    priority = 0
    string = 'intergenic_variant'

  [[not_reported]]
    score = 0

[filter]
  category = variant_call_quality_filter
  data_type = string
  description = The filters for the variant
  field = FILTER
  record_rule = min
  separators = ';',

  [[not_reported]]
    score = 0

  [[pass]]
    score = 3
    priority = 1
    string = 'PASS'
