Skip to content

Commit 7099dc6

Browse files
committed
black
1 parent d6801e7 commit 7099dc6

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

bu_isciii/templates/IRMA/ANALYSIS/ANALYSIS01_FLU_IRMA/04-irma/create_irma_vcf.py

+6-19
Original file line numberDiff line numberDiff line change
@@ -794,10 +794,12 @@ def combine_indels(vcf_dictionary):
794794
combined_vcf_dict[sample_found]["REF"] += value["ALT"]
795795
combined_vcf_dict[sample_found]["ALT"] = value["ALT"]
796796
else:
797-
NEW_REF = value["REF"][len(value["ALT"]):]
797+
NEW_REF = value["REF"][len(value["ALT"]) :]
798798
combined_vcf_dict[sample_found]["REF"] += NEW_REF
799799
if minority:
800-
combined_vcf_dict[sample_found]["SAMPLE_POS"] += value["SAMPLE_POS"]
800+
combined_vcf_dict[sample_found]["SAMPLE_POS"] += value[
801+
"SAMPLE_POS"
802+
]
801803
combined_vcf_dict[sample_found]["DP"] += value["DP"]
802804
combined_vcf_dict[sample_found]["TOTAL_DP"] += value["TOTAL_DP"]
803805
combined_vcf_dict[sample_found]["AF"] += value["AF"]
@@ -901,13 +903,7 @@ def create_vcf(variants_dict, out_vcf, alignment):
901903
else:
902904
TOTAL_DP = "NA"
903905

904-
INFO = (
905-
"TYPE="
906-
+ value["TYPE"]
907-
+ ";"
908-
+ "DP="
909-
+ TOTAL_DP
910-
)
906+
INFO = "TYPE=" + value["TYPE"] + ";" + "DP=" + TOTAL_DP
911907
ALT_QUAL_list = []
912908
for number in value["QUAL"]:
913909
if number != "NA":
@@ -935,15 +931,7 @@ def create_vcf(variants_dict, out_vcf, alignment):
935931
else:
936932
AF = "NA"
937933

938-
SAMPLE = (
939-
GT
940-
+ ":"
941-
+ ALT_DP
942-
+ ":"
943-
+ ALT_QUAL
944-
+ ":"
945-
+ AF
946-
)
934+
SAMPLE = GT + ":" + ALT_DP + ":" + ALT_QUAL + ":" + AF
947935
oline = (
948936
CHROM
949937
+ "\t"
@@ -989,4 +977,3 @@ def main(args=None):
989977

990978
if __name__ == "__main__":
991979
sys.exit(main())
992-

0 commit comments

Comments
 (0)