Skip to content

Commit

Permalink
fixed typos
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-sturm committed Sep 10, 2024
1 parent b148ff9 commit 5eb4c2a
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion doc/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
4 changes: 2 additions & 2 deletions settings_nightly.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Common/genomics.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;


Expand Down
6 changes: 3 additions & 3 deletions src/NGS/an_vep.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
10 changes: 5 additions & 5 deletions src/NGS/vcf2gsvar.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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] : "";
Expand Down Expand Up @@ -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]);
}
Expand Down
2 changes: 1 addition & 1 deletion src/NGS/vcf2gsvar_somatic.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/Pipelines/annotate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Tools/bedpe2somatic.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
6 changes: 3 additions & 3 deletions test/tool_test_an_vep.php
Original file line number Diff line number Diff line change
Expand Up @@ -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=<ID=NGSD_GENE_INFO,"));
check_file($out_file_dragen2, data_folder().$name."_out_dragen2.vcf", true);
}
Expand Down
6 changes: 3 additions & 3 deletions test/tool_test_vcf2gsvar.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@
check_file($out_file_dragen, data_folder().$name."_out_dragen.GSvar", true);

//genotype_mode=single, DRAGEN + custom colunns
$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.GSvar";
check_exec("php ".src_folder()."/NGS/{$name}.php -in ".data_folder().$name."_in_dragen2.vcf -out $out_file_dragen2 --log ".output_folder().$name."_out_dragen2.log -custom custom_colums_test -test");
check_exec("php ".src_folder()."/NGS/{$name}.php -in ".data_folder().$name."_in_dragen2.vcf -out $out_file_dragen2 --log ".output_folder().$name."_out_dragen2.log -custom custom_columns_test -test");
remove_lines_containing($out_file_dragen2, "#CREATION_DATE=");
check_file($out_file_dragen2, data_folder().$name."_out_dragen2.GSvar", true);
}
Expand Down

0 comments on commit 5eb4c2a

Please sign in to comment.