We noticed that your N50 is different from Whatshap N50, and the Methphaser N50 is more reasonable. Could you please provide a command to call the N50 calculation method in the code or provide a script to calculate N50?
for example the code in the [post_processing_script.ipynb]
get_methphase_n50(block_relationships_df_30x_high_acc),
get_methphase_n50(block_relationships_df_60x_high_acc),
get_methphase_n50(block_relationships_df_LSK60x_high_acc),
get_methphase_n50(block_relationships_df_LSK30x_high_acc),
get_methphase_n50(block_relationships_df_80x_high_acc)
or the code in the file [meth_phaser_post_processing]
def get_n50(final_block_dict):
chrom_n50 = {}
for chrom in final_block_dict.keys():
block_len_list = []
for i in final_block_dict[chrom]:
block_len_list.append(i[1] - i[0])
sum_block_len = 0
for i in sorted(block_len_list, reverse=False):
sum_block_len += i
if sum_block_len > sum(block_len_list) / 2:
chrom_n50.update({chrom: i})
break
return chrom_n50
But it seems that this function has not been called.
We noticed that your N50 is different from Whatshap N50, and the Methphaser N50 is more reasonable. Could you please provide a command to call the N50 calculation method in the code or provide a script to calculate N50?
for example the code in the [post_processing_script.ipynb]
get_methphase_n50(block_relationships_df_30x_high_acc),
get_methphase_n50(block_relationships_df_60x_high_acc),
get_methphase_n50(block_relationships_df_LSK60x_high_acc),
get_methphase_n50(block_relationships_df_LSK30x_high_acc),
get_methphase_n50(block_relationships_df_80x_high_acc)
or the code in the file [meth_phaser_post_processing]
def get_n50(final_block_dict):
chrom_n50 = {}
for chrom in final_block_dict.keys():
block_len_list = []
for i in final_block_dict[chrom]:
block_len_list.append(i[1] - i[0])
sum_block_len = 0
for i in sorted(block_len_list, reverse=False):
sum_block_len += i
if sum_block_len > sum(block_len_list) / 2:
chrom_n50.update({chrom: i})
break
return chrom_n50
But it seems that this function has not been called.