diff --git a/bin/ivar_variants_to_vcf.py b/bin/ivar_variants_to_vcf.py index 1322e39e..d3f126ea 100755 --- a/bin/ivar_variants_to_vcf.py +++ b/bin/ivar_variants_to_vcf.py @@ -175,8 +175,8 @@ def ivar_variants_to_vcf(file_in, file_out, pass_only=False, min_allele_frequenc '##INFO=' ] header_filter = [ - '##FILTER=', - '##FILTER= 0.05">' + '##FILTER=', + '##FILTER= 0.05">' ] header_format = [ '##FORMAT=', @@ -185,7 +185,7 @@ def ivar_variants_to_vcf(file_in, file_out, pass_only=False, min_allele_frequenc '##FORMAT=', '##FORMAT=', '##FORMAT=', - '##FORMAT=', + '##FORMAT=', '##FORMAT=', ] header_cols = [ @@ -196,7 +196,7 @@ def ivar_variants_to_vcf(file_in, file_out, pass_only=False, min_allele_frequenc '##INFO=' ] header_filter += [ - '##FILTER=' + '##FILTER=' ] header = header_source + header_info + header_filter + header_format + header_cols @@ -250,17 +250,17 @@ def ivar_variants_to_vcf(file_in, file_out, pass_only=False, min_allele_frequenc if pass_test == "TRUE": FILTER = "PASS" else: - FILTER = "FAIL" + FILTER = "ft" else: ## Add SB in the FILTER field if strand-bias p-value is significant if pvalue < 0.05 and pass_test == "TRUE": - FILTER = "SB" + FILTER = "sb" elif pvalue > 0.05 and pass_test == "TRUE": FILTER = "PASS" elif pvalue <= 0.05 and pass_test == "FALSE": - FILTER = "FAIL,SB" + FILTER = "ft;sb" else: - FILTER = "FAIL" + FILTER = "ft" INFO += f":SB_PV={str(round(pvalue, 5))}" FORMAT = "GT:REF_DP:REF_RV:REF_QUAL:ALT_DP:ALT_RV:ALT_QUAL:ALT_FREQ"