# Custom Config Support

## Local App Setup

## Overview

This document describes how to use the **Custom Configuration Support** feature for the pipeline software. This feature allows users to customize a specific set of DRAGEN command-line options to override the default values pre-defined in the pipeline.

## Customization with `customConfig` and `customResourceDir`

Users can customize pipeline behavior and file inputs using:

* `--customConfig` : path to a **custom configuration file** listing customized parameter values.
* `--customResourceDir` : path to a **directory** containing custom resource files.

Both options should be used together if file-based overrides are required.

## Important note for using File Parameters

* For **file parameters** (parameters that require a file), users must specify **relative paths** in the `customConfig` file. The software will join `customResourceDir` and the relative path to form the full file path.
* Additionally, the value assigned to a **file parameter** must be enclosed in single quotes (`''`).

## Examples

### Command Line

```bash
run_Solid_WGS_TN_{version}.sh \
--inputType bcl \
--inputFolder /staging/input-folder \
--customConfig /path/to/solid_custom_param.config \
--customResourceDir /path/to/custom_resources_solid_dir
```

### `solid_custom_param.config` Content

```bash
## custom parameters
somatic_vc_output_evidence_bam = false
germline_vc_output_evidence_bam = false

somatic_qc_detect_contamination = true

somatic_aligner_clip_pe_overhang = 0
germline_aligner_clip_pe_overhang = 0

## custom reference files
somatic_vc_systematic_noise = '/snv/WGS_hg38_v1.0_systematic_noise.snv.bed.gz'
somatic_sv_systematic_noise = '/sv/WGS_FF_solid_hg38_v1.0_systematic_noise.sv.bedpe.gz'
somatic_vc_somatic_hotspots = '/snv/somatic_hotspots_GRCh38.vcf.gz'
```

### `custom_resources_solid_dir` Folder Structure

```
custom_resources_Solid/
├── snv
│   ├── WGS_Solid_hg38_v1.0_systematic_noise.snv.bed.gz
│   └── somatic_hotspots_GRCh38.vcf.gz
└── sv
    └── WGS_Solid_FF_solid_hg38_v1.0_systematic_noise.sv.bedpe.gz
```

## `customConfig` Template (with default value)

```bash

cram_reference = 'genome.fa'

#cram_reference_path ='/testing_data_cram/genome_fasta/hs37d5_chr/'
#tumor normal caller settings
#somatic_msi_coverage_threshold = 40
#somatic_msi_microsatellites_file = ''
#somatic_vc_combine_phased_variants_distance = 2
#somatic_vc_output_evidence_bam = false
#somatic_qc_detect_contamination = true
#somatic_qc_coverage_ignore_overlaps = false
#somatic_aligner_clip_pe_overhang = 0
#somatic_sv_ins_tandup_hotspot_regions_bed = ''
#somatic_sv_systematic_noise = ''
#somatic_vc_somatic_hotspots = ''
#somatic_vc_target_vaf = 0.03
#somatic_vc_sq_filter_threshold = 3
#somatic_vc_systematic_noise = ''
#somatic_vc_excluded_regions_bed = ''

#germline caller settings
#germline_vc_output_evidence_bam = false
#germline_qc_detect_contamination = true
#germline_qc_coverage_ignore_overlaps = false
#germline_aligner_clip_pe_overhang = 0
#germline_vc_combine_phased_variants_distance = 2

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.connected.illumina.com/dragen-clinical-research-apps/readme/dragen-solid-wgs-tn-pipeline/installation/advanced/custom_config.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
