From e8947ff0f9b4433927945693c1d527e22ebfaa22 Mon Sep 17 00:00:00 2001 From: zhengzhenxian <920596906@qq.com> Date: Mon, 22 May 2023 14:19:14 +0800 Subject: [PATCH] copy pileup vcf to merge_output vcf if no full-alignment candidate --- preprocess/SelectCandidates.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/preprocess/SelectCandidates.py b/preprocess/SelectCandidates.py index 2ebfcfe..80b5f06 100644 --- a/preprocess/SelectCandidates.py +++ b/preprocess/SelectCandidates.py @@ -273,11 +273,11 @@ def SelectCandidates(args): ['\t'.join([contig_name, str(x[0] - 1), str(x[1] - 1), ]) for x in split_output]) + '\n') # bed format - if len(all_full_aln_regions) > 0: - all_full_aln_regions_path = os.path.join(split_folder, 'FULL_ALN_FILE_{}'.format(contig_name)) - with open(all_full_aln_regions_path, 'w') as output_file: - output_file.write('\n'.join(all_full_aln_regions) + '\n') - else: + + all_full_aln_regions_path = os.path.join(split_folder, 'FULL_ALN_FILE_{}'.format(contig_name)) + with open(all_full_aln_regions_path, 'w') as output_file: + output_file.write('\n'.join(all_full_aln_regions) + '\n') + if len(all_full_aln_regions) == 0: print_calling_step(output_fn=pileup_vcf_fn) return