From f86068046a22319dfddf1daf55cb2e5f39873c4e Mon Sep 17 00:00:00 2001 From: Ahsan Date: Tue, 14 Mar 2023 21:43:56 -0400 Subject: [PATCH] minor warning for empty list fixed --- nanocaller_src/generate_SNP_pileups.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nanocaller_src/generate_SNP_pileups.py b/nanocaller_src/generate_SNP_pileups.py index 0df719a..ac09ab3 100644 --- a/nanocaller_src/generate_SNP_pileups.py +++ b/nanocaller_src/generate_SNP_pileups.py @@ -162,6 +162,7 @@ def ex_bed(tree, pos): pos_list=output.keys() current_depth=[] + depth=0 output_pos,output_ref,output_mat,output_dp,output_freq=[],[],[],[],[] if pos_list: @@ -232,5 +233,6 @@ def ex_bed(tree, pos): output_dp=np.array(output_dp) output_freq=np.array(output_freq) + depth=np.mean(current_depth) - return (output_pos,output_ref,output_mat,output_dp,output_freq,np.mean(current_depth)) \ No newline at end of file + return (output_pos,output_ref,output_mat,output_dp,output_freq,depth) \ No newline at end of file