Skip to content

Commit 2cb337c

Browse files
committed
analyze.php: Added parameter to enable DRAGEN ML model
1 parent 5b509ef commit 2cb337c

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

src/IMGAG/copy_sample.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ function get_md5_line($file)
671671
//check count
672672
if(count($fastq_files) != count($sample_infos["ps_lanes"]) * 2)
673673
{
674-
trigger_error("ERROR: Number of FastQ files for sample {$sample} doesn't match number of lanes in run info! (expected: ".(count($sample_infos["ps_lanes"]) * 2).", found: ".count($fastq_files).")", E_USER_ERROR);
674+
trigger_error("ERROR: Number of FastQ files for sample {$sample} doesn't match number of lanes in run info! (expected: ".(count($sample_infos["ps_lanes"]) * 2).", found in {$fastq_folder}: ".count($fastq_files).")", E_USER_ERROR);
675675
}
676676

677677
$move_cmd = "mv ".($overwrite ? "-f " : "");

src/Pipelines/analyze.php

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
$parser->addFlag("somatic", "Set somatic single sample analysis options (i.e. correction_n, clip_overlap).");
2828
$parser->addFlag("annotation_only", "Performs only a reannotation of the already created variant calls.");
2929
$parser->addFlag("use_dragen", "Use Illumina DRAGEN server for mapping, small variant and structural variant calling.");
30+
$parser->addFlag("use_dragen_ML", "Use ML model in small variant calling of Illumina DRAGEN.");
3031
$parser->addFlag("use_deepvariant", "Use Deepvariant instead of freebayes for small variant calling.");
3132
$parser->addFlag("no_sync", "Skip syncing annotation databases and genomes to the local tmp folder (Needed only when starting many short-running jobs in parallel).");
3233
$parser->addFlag("no_splice", "Skip SpliceAI scoring of variants that are not precalculated.");
@@ -244,6 +245,7 @@
244245
if($correction_n) $args[] = "-correction_n";
245246
if(!empty($files_index)) $args[] = "-in_index " . implode(" ", $files_index);
246247
if($use_dragen) $args[] = "-use_dragen";
248+
if($use_dragen_ML) $args[] = "-use_dragen_ML";
247249
if($somatic) $args[] = "-somatic_custom_map";
248250
$used_bam_or_cram = $parser->tempFolder("local_bam")."/".$name.".bam"; //local copy of BAM file to reduce IO over network when mapping is done
249251
$parser->execTool("Tools/mapping.php", "-in_for ".implode(" ", $files1)." -in_rev ".implode(" ", $files2)." -system $system -out_folder $folder -out_name $name -local_bam $used_bam_or_cram ".implode(" ", $args)." -threads $threads");

src/Tools/mapping.php

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
$parser->addFlag("correction_n", "Use Ns for barcode correction.");
2626
$parser->addFlag("filter_bam", "Filter alignments prior to barcode correction.");
2727
$parser->addFlag("use_dragen", "Use Illumina DRAGEN server for mapping, small variant and structural variant calling.");
28+
$parser->addFlag("use_dragen_ML", "Use ML model in small variant calling of Illumina DRAGEN.");
2829
$parser->addFlag("bam_output", "Output is BAM instead of CRAM.");
2930
$parser->addFlag("somatic_custom_map", "Calculate mapping QC metrics for somatic custom subpanel");
3031
$parser->addInt("min_mapq", "The minimum mapping quality for reads to be considered for barcode correction (cfDNA only).", true, 0);
@@ -315,6 +316,7 @@
315316
$args[] = "-sample ".$out_name;
316317
$args[] = "-build ".$build;
317318
$args[] = "--log ".$dragen_log_file;
319+
if($use_dragen_ML) $args[] = "-use_dragen_ML";
318320
if ($sys['shotgun'] && !$barcode_correction && $sys['umi_type']!="ThruPLEX") $args[] = "-dedup";
319321
if ($sys['type']=="WGS") $args[] = "-enable_cnv";
320322
$cmd_mapping = "php ".realpath(repository_basedir())."/src/Tools/mapping_dragen.php ".implode(" ", $args);

src/Tools/mapping_dragen.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
$parser->addOutfile("out_sv", "Output VCF.GZ file for structural variants (indexed).", false);
1919
$parser->addOutfile("out_cnv", "Output VCF.GZ file for copy-number variants (indexed).", false);
2020
$parser->addOutfile("out_cnv_raw", "Output BW file for copy-nubmer raw data.", false);
21+
$parser->addFlag("use_dragen_ML", "Use ML model in small variant calling of Illumina DRAGEN.");
2122
//optional
2223
$parser->addString("build", "The genome build to use. The genome must be indexed for BWA!", true, "GRCh38");
2324
$parser->addString("sample", "Sample name to use in BAM header. If unset the basename of the 'out' file is used.", true, "");
@@ -85,7 +86,7 @@
8586
$dragen_parameter[] = "--RGID $sample";
8687
$dragen_parameter[] = "--RGSM $sample";
8788
$dragen_parameter[] = "--RGDT ".date("c");
88-
$dragen_parameter[] = "--vc-ml-enable-recalibration=false"; //disabled because it leads to a sensitivity drop for Twist Exome V2 SNVs of 0.5% (see /mnt/storage2/users/ahsturm1/scripts/2023_08_01_megSAP_performance/)
89+
if (!$use_dragen_ML) $dragen_parameter[] = "--vc-ml-enable-recalibration=false"; //disabled because it leads to a sensitivity drop for Twist Exome V2 SNVs of 0.5% (see /mnt/storage2/users/ahsturm1/scripts/2023_08_01_megSAP_performance/)
8990
$dragen_parameter[] = "--enable-rh=false"; //disabled RH special caller because this leads to variants with EVENTTYPE=GENE_CONVERSION that have no DP and AF entry and sometimes are duplicated (same variant twice in the VCF).
9091
if ($enable_cnv)
9192
{

0 commit comments

Comments
 (0)