preamble:
   input_reference_genome: hg38/genomes/GRCh38-hg38
   summary: Clinical Annotation Pipeline 
   description: This is a pipeline to annotate with Clinical resources  


annotators:
    
- normalize_allele_annotator:
    genome: hg38/genomes/GRCh38-hg38

- allele_score:
    resource_id: hg38/scores/dbSNP
    input_annotatable: normalized_allele    
    
- allele_score:
    resource_id: hg38/variant_frequencies/gnomAD_4.1.0/exomes/ALL
    input_annotatable: normalized_allele

- allele_score:
    resource_id: hg38/variant_frequencies/gnomAD_4.1.0/genomes/ALL
    input_annotatable: normalized_allele

- allele_score:
    resource_id: hg38/scores/ClinVar_20240730
    input_annotatable: normalized_allele

- liftover_annotator:
    chain: liftover/hg38ToHg19
    source_genome: hg38/genomes/GRCh38-hg38
    target_genome: hg19/genomes/GATK_ResourceBundle_5777_b37_phiX174
    attributes:
    - source: liftover_annotatable
      name: hg19_annotatable
      internal: true

- allele_score:
    resource_id: hg19/scores/MPC
    input_annotatable: hg19_annotatable
    
- allele_score: hg38/scores/CADD_v1.4

- allele_score: hg38/scores/AlphaMissense
        
- effect_annotator:
    gene_models: hg38/gene_models/GENCODE/48/basic/ALL
    genome: hg38/genomes/GRCh38.p13
    attributes:
    - worst_effect
    - gene_effects
    - effect_details
    - name: gene_list 
      internal: true

- effect_annotator:
    gene_models: hg38/gene_models/MANE/1.3 
    genome: hg38/genomes/GRCh38.p13
    attributes:
    - name: worst_effect_MANE_1.3
      source: worst_effect 
    - name: effect_details_MANE_1.3
      source: effect_details 
    - name: gene_effects_MANE_1.3
      source: gene_effects 

- gene_score_annotator:
    resource_id: gene_properties/gene_scores/pLI
    input_gene_list: gene_list
    attributes:
    - name: pLI_rank_all
      source: pLI_rank
    - name: pLI_rank_min
      source: pLI_rank
      gene_aggregator: min 
      
- gene_score_annotator:
    resource_id: gene_properties/gene_scores/LOEUF
    input_gene_list: gene_list
    attributes:
    - name: LOEUF_rank_all
      source: LOEUF_rank
    - name: LOEUF_rank_min
      source: LOEUF_rank
      gene_aggregator: min 

- gene_score_annotator:
    resource_id: gene_properties/gene_scores/Satterstrom_Buxbaum_Cell_2020 
    input_gene_list: gene_list

- gene_score_annotator:
    resource_id: gene_properties/gene_scores/Iossifov_Wigler_PNAS_2015 
    input_gene_list: gene_list

- gene_score_annotator:
    resource_id: gene_properties/gene_scores/SFARI_gene_score_2024_Q1
    input_gene_list: gene_list

- gene_score_annotator:
    resource_id: gene_properties/gene_scores/SFARI_gene_score_2024_Q1
    input_gene_list: gene_list
    attributes:
    - name: SFARI_gene_score
      source: gene-score

- gene_set_annotator:
    resource_id: gene_properties/gene_sets/autism
    input_gene_list: gene_list
    attributes:
    - "autism candidates from Iossifov PNAS 2015"
    - "autism candidates from Sanders Neuron 2015"
    - "Yuen Scherer Nature 2017"
    - "Turner Eichler ajhg 2019"
    - "Satterstrom Buxbaum Cell 2020 top" 

- cnv_collection:
    resource_id: hg38/cnv_collections/Iossifov_Lab_SSC_AGRE_2021
    cnv_filter: >
        cnv.attributes["affected_status"] == "affected" and
        cnv.attributes["variant"] == "deletion"
    attributes:
    - name: number_of_deletions_in_SSC_affected
      source: count

- cnv_collection:
    resource_id: hg38/cnv_collections/Iossifov_Lab_SSC_AGRE_2021
    cnv_filter: >
        cnv.attributes["affected_status"] == "affected" and
        cnv.attributes["variant"] == "duplication"
    attributes:
    - name: number_of_duplications_in_SSC_affected
      source: count


- cnv_collection:
    resource_id: hg38/cnv_collections/SFARI_gene_CNV
    attributes:
    - name: in_a_SFARI_gene_CNV
      source: count


