Skip to content

Commit

Permalink
fix convertToStdVCF.py function to skip nonconventional headers
Browse files Browse the repository at this point in the history
  • Loading branch information
kubranarci committed Nov 7, 2024
1 parent d6c94a9 commit 601f6a5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion bin/convertToStdVCF.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,16 @@ def extract_freestanding_columns_into_dict(line_original, col_indices, meta_info
]

cols_as_INFO_dict = {}

for column_name in columns_to_extract:
if column_name not in col_indices:
print("Warning: '{}' not found in column indices.".format(column_name))
continue

column_index = col_indices[column_name]

if column_index >= len(line_original):
print("Warning: Column '{}' index {} is out of bounds in line: {}".format(column_name, column_index, line_original))
continue

old_column_contents = line_original[col_indices[column_name]]
Expand Down Expand Up @@ -548,4 +556,4 @@ def parse_options(argv):
header =False
else:
header = args.raw_vcf
convert(args.input_file, args.output_file, args.sample_id, meta_information,args.withcontrol,header)
convert(args.input_file, args.output_file, args.sample_id, meta_information, args.withcontrol, header)
4 changes: 2 additions & 2 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ manifest {
homePage = 'https://github.com/kubranarci/nf-snvcalling'
description = 'ODCF SNV Calling pipeline'
mainScript = 'main.nf'
nextflowVersion = '!>=23.10.3'
version = '2.0.1'
nextflowVersion = '!>=23.10.1'
version = '2.0.2'
}
// Nextflow plugins
plugins {
Expand Down

0 comments on commit 601f6a5

Please sign in to comment.