Pipeline Steps:

Call Somatic Structural Variants - DELLY workflow:

1. Calling Single Sample Somatic Structural Variants

delly call --genome hg38.fa --exclude hg38.excl --map-qual 20 --min-clique-size 5 --mad-cutoff 15 --outfile t1.bcf tumor1.bam normal1.bam

This step performs somatic variant calling using DELLY. The stringent filters (--map-qual 20 --min-clique-size 5 --mad-cutoff 15) are added, which can drastically reduce the runtime, especially when the input BAMs are big. In the pipeline, these filters are specified in the NextFlow input parameters config file. If need be, these stringent filters can be adjusted in the config file.

2. Query the generated bcfs to get the sample names, which will be used in step 3.

echo -e "tumor\ncontrol" > samples_type
bcftools query -l t1.bcf > samples_name
paste samples_name samples_type > samples.tsv

3. Somatic Filtering

delly filter -f somatic -o t1.pre.bcf -s samples.tsv t1.bcf

This step applies somatic filtering against the .bcf file generated in Step 1.

Note: cohort based false positive filtering is compuationally heavy and not implemented in this pipeline.

Call Somatic Structural Variants - Manta workflow:

1. Calling Single Sample Somatic Structural Variants

configManta.py --normalBam "${normal_bam}" --tumorBam "${tumor_bam}" --referenceFasta "${reference_fasta}" --runDir MantaWorkflow
MantaWorkflow/runWorkflow.py

This step performs somatic variant calling using Manta.

Call Somatic Structural Variants - GRIDSS2 workflow:

1. Preprocess input BAMs

gridss -r gridss2_reference.fasta -j gridss.jar -s preprocess input.bam

This step preprocesses input tumor/normal BAMs.

2. Breakend Assembly

gridss -r gridss2_reference.fasta -j gridss.jar -s assemble -b gridss2_blacklist.bed -a tumor_breakend_assembly.bam normal.bam tumor.bam

This step performs GRIDSS2 breakend assembly to produce a tumor_breakend_assembly.bam. The preprocessed input tumor/normal BAMs need to be in the same directory while running breakend assembly, although the preprocced BAMs are not explicitly defined as input arguments here.

3. Calling Single Sample Somatic Structural Variants

gridss -r gridss2_reference.fasta -j gridss2.jar -s call -b gridss_blacklist.bed -a tumor_breakend_assembly.bam --output gridss2_tumor.vcf normal.bam tumor.bam

This step performs GRIDSS2 somatic variant calling.

4. Somatic Filtering

gridss_somatic_filter --pondir gridss2_pon_dir/ --scriptdir gridss_script_dir/ --input gridss2_tumor.vcf --output gridss2_high-confidence-somatic.vcf --fulloutput gridss2_high-low-confidence-somatic.vcf --normalordinal 1 --tumourordinal 2

This step performs somatic filtering to retain only somatic SVs in the filtered outputs, gridss2_high-confidence-somatic.vcf and gridss2_high-low-confidence-somatic.vcf.