From 5eb4c2a943641dae9c1c7685eaed83bd4ccfa5d9 Mon Sep 17 00:00:00 2001 From: Marc Sturm Date: Tue, 10 Sep 2024 12:45:54 +0200 Subject: [PATCH] fixed typos --- doc/settings.md | 2 +- settings_nightly.ini | 4 ++-- src/Common/genomics.php | 2 +- src/NGS/an_vep.php | 6 +++--- src/NGS/vcf2gsvar.php | 10 +++++----- src/NGS/vcf2gsvar_somatic.php | 2 +- src/Pipelines/annotate.php | 4 ++-- src/Tools/bedpe2somatic.php | 2 +- test/tool_test_an_vep.php | 6 +++--- test/tool_test_vcf2gsvar.php | 6 +++--- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/doc/settings.md b/doc/settings.md index 36370a421..28ab4572a 100644 --- a/doc/settings.md +++ b/doc/settings.md @@ -50,7 +50,7 @@ This section contains general settings: * `cnv_bin_size_longread_wgs` - Bin size used for CNV analysis of long-read WGS samples. * `use_bwa1` - Flag (true/false) that indicates if BWA mem should be used for mapping instead of BWA mem 2 (BWA mem 2 is faster, but needs more RAM). * `annotate_refseq_consequences` - Flag (true/false) that indicates if variant consequences based on RefSeq transcripts should be annotated in addition to variant consequences based on Ensembl transcripts. -* `custom_colums` - Used to add custom annotations to the output VCF/GSvar file. Each entry consists of a colon-speparated list of VCF file, INFO field name in the source VCF (prefixed with `CUSTOM_` in the annotated VCF) and column description. Provide the annotation using the dictionary syntax of PHP, e.g. `custom_colums['NGSD_counts'] = "/mnt/data/dbs/NGSD/NGSD_germline.vcf.gz;COUNTS;NGSD counts"`. +* `custom_columns` - Used to add custom annotations to the output VCF/GSvar file. Each entry consists of a colon-speparated list of VCF file, INFO field name in the source VCF (prefixed with `CUSTOM_` in the annotated VCF) and column description. Provide the annotation using the dictionary syntax of PHP, e.g. `custom_columns['NGSD_counts'] = "/mnt/data/dbs/NGSD/NGSD_germline.vcf.gz;COUNTS;NGSD counts"`. ## Section 'dragen' diff --git a/settings_nightly.ini b/settings_nightly.ini index 15cda8eca..8b548ea9a 100644 --- a/settings_nightly.ini +++ b/settings_nightly.ini @@ -92,8 +92,8 @@ cnv_bin_size_longread_wgs = 10000 use_bwa1 = false file_access_group = f_ad_bi_l_medgen_access_storages annotate_refseq_consequences = false -custom_colums_test['ngsd_counts'] = "/mnt/storage2/users/ahsturm1/megSAP/test/data/an_vep_custom.vcf.gz;COUNTS;NGSD counts" -custom_colums_test['ngsd_nervous_system'] = "/mnt/storage2/users/ahsturm1/megSAP/test/data/an_vep_custom.vcf.gz;GSC08;NGSD nervous system counts" +custom_columns_test['ngsd_counts'] = "/mnt/storage2/users/ahsturm1/megSAP/test/data/an_vep_custom.vcf.gz;COUNTS;NGSD counts" +custom_columns_test['ngsd_nervous_system'] = "/mnt/storage2/users/ahsturm1/megSAP/test/data/an_vep_custom.vcf.gz;GSC08;NGSD nervous system counts" [dragen] ; transfer folder diff --git a/src/Common/genomics.php b/src/Common/genomics.php index 4a45be952..b1fed7619 100644 --- a/src/Common/genomics.php +++ b/src/Common/genomics.php @@ -692,7 +692,7 @@ function load_vcf_normalized($filename) else { $parts = explode("\t", $line); - if (count($parts)<10) trigger_error("VCF file $filename has line with less than 10 colums: $line", E_USER_ERROR); + if (count($parts)<10) trigger_error("VCF file $filename has line with less than 10 columns: $line", E_USER_ERROR); list($chr, $pos, $id, $ref, $alt, $qual, $filter, $info, $format) = $parts; diff --git a/src/NGS/an_vep.php b/src/NGS/an_vep.php index 4d36419ea..6940a7be7 100644 --- a/src/NGS/an_vep.php +++ b/src/NGS/an_vep.php @@ -127,10 +127,10 @@ function annotation_file_path($rel_path, $is_optional=false) //custom annotation using VcfAnnotateFromVcf if ($custom!="") { - $custom_colums = get_path($custom, false); - if (is_array($custom_colums)) + $custom_columns = get_path($custom, false); + if (is_array($custom_columns)) { - foreach($custom_colums as $key => $tmp) + foreach($custom_columns as $key => $tmp) { list($vcf, $col, $desc) = explode(";", $tmp, 3); fwrite($config_file, "{$vcf}\tCUSTOM\t{$col}\t\n"); diff --git a/src/NGS/vcf2gsvar.php b/src/NGS/vcf2gsvar.php index 7aa54bad5..af54d47e7 100644 --- a/src/NGS/vcf2gsvar.php +++ b/src/NGS/vcf2gsvar.php @@ -19,11 +19,11 @@ $parser->addFlag("test", "Run in test mode. Skips replacing sample headers with NGSD information."); extract($parser->parse($argv)); -$custom_colums = []; +$custom_columns = []; if ($custom!="") { $tmp = get_path($custom, false); - if (is_array($tmp)) $custom_colums = $tmp; + if (is_array($tmp)) $custom_columns = $tmp; } //skip common MODIFIER variants in WGS mode @@ -359,7 +359,7 @@ function load_hgnc_db() ); $column_desc_custom = []; -foreach($custom_colums as $key => $tmp) +foreach($custom_columns as $key => $tmp) { list($vcf, $col, $desc) = explode(";", $tmp, 3); $column_desc_custom[] = [$key, $desc]; @@ -1530,7 +1530,7 @@ function load_hgnc_db() $cosmic = implode(",", collapse($tag, "COSMIC", $cosmic, "unique")); //custom columns - foreach($custom_colums as $key => $tmp) + foreach($custom_columns as $key => $tmp) { list($vcf, $col, $desc) = explode(";", $tmp, 3); $custom_column_data[$key] = isset($info["CUSTOM_".$col]) ? $info["CUSTOM_".$col] : ""; @@ -1595,7 +1595,7 @@ function load_hgnc_db() fwrite($handle_out, "\t".$in_short_read_sample); } - foreach($custom_colums as $key => $tmp) + foreach($custom_columns as $key => $tmp) { fwrite($handle_out, "\t".$custom_column_data[$key]); } diff --git a/src/NGS/vcf2gsvar_somatic.php b/src/NGS/vcf2gsvar_somatic.php index 08cf134f4..cb7ecb99f 100644 --- a/src/NGS/vcf2gsvar_somatic.php +++ b/src/NGS/vcf2gsvar_somatic.php @@ -25,7 +25,7 @@ $tmp = $parser->tempFile(".GSvar"); $args = array("-in $in", "-out $tmp", "-genotype_mode skip"); if ($updown) $args[] = "-updown"; -$args[] = "-custom custom_colums"; +$args[] = "-custom custom_columns"; $parser->execTool("NGS/vcf2gsvar.php", implode(" ", $args)); $gsvar = Matrix::fromTSV($tmp); diff --git a/src/Pipelines/annotate.php b/src/Pipelines/annotate.php index b0bec596a..23828a338 100644 --- a/src/Pipelines/annotate.php +++ b/src/Pipelines/annotate.php @@ -67,7 +67,7 @@ if ($somatic) $args[] = "-somatic"; if ($somatic) $args[] = "-somatic"; if (get_path("annotate_refseq_consequences", false)) $args[] = "-annotate_refseq_consequences"; -$args[] = "-custom custom_colums"; +$args[] = "-custom custom_columns"; if ($no_splice) $args[] = "-no_splice"; $parser->execTool("NGS/an_vep.php", implode(" ", $args)); @@ -157,7 +157,7 @@ if ($multi) $args[] = "-genotype_mode multi"; if ($sys['type']=="WGS") $args[] = "-wgs"; if ($sys['type']=="lrGS") $args[] = "-wgs -longread"; - $args[] = "-custom custom_colums"; + $args[] = "-custom custom_columns"; $parser->execTool("NGS/vcf2gsvar.php", implode(" ", $args)); //annotate variant allele frequency and depth from related RNA sample, if available diff --git a/src/Tools/bedpe2somatic.php b/src/Tools/bedpe2somatic.php index dca617ae2..c43f318e5 100644 --- a/src/Tools/bedpe2somatic.php +++ b/src/Tools/bedpe2somatic.php @@ -111,7 +111,7 @@ function get_info_fields($comments) return $info_col_description; } -//Extracts certain fields from INFO column and returns results as associative array containing the colums. +//Extracts certain fields from INFO column and returns results as associative array containing the columns. //The function returns the keys "flags", "somaticscore" and "junction_somaticscore" function expand_info_col($info_col) { diff --git a/test/tool_test_an_vep.php b/test/tool_test_an_vep.php index a3436c240..c29c2f41f 100644 --- a/test/tool_test_an_vep.php +++ b/test/tool_test_an_vep.php @@ -36,11 +36,11 @@ check_file($out_file_dragen, data_folder().$name."_out_dragen.vcf", true); //DRAGEN and custom annotations -$custom_colums_test = get_path("custom_colums_test"); -if (is_array($custom_colums_test)) +$custom_columns_test = get_path("custom_columns_test"); +if (is_array($custom_columns_test)) { $out_file_dragen2 = output_folder().$name."_out_dragen2.vcf"; - check_exec("php ".src_folder()."/NGS/{$name}.php -test -in ".data_folder().$name."_in_dragen.vcf -out $out_file_dragen2 --log ".output_folder().$name."_out_dragen2.log -custom custom_colums_test"); + check_exec("php ".src_folder()."/NGS/{$name}.php -test -in ".data_folder().$name."_in_dragen.vcf -out $out_file_dragen2 --log ".output_folder().$name."_out_dragen2.log -custom custom_columns_test"); remove_lines_containing($out_file_dragen2, array("##VEP=\"v", "##VEP-command-line='", "##INFO=