Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The command of Methphaser N50 #24

Open
Humonex opened this issue Aug 21, 2024 · 4 comments
Open

The command of Methphaser N50 #24

Humonex opened this issue Aug 21, 2024 · 4 comments

Comments

@Humonex
Copy link

Humonex commented Aug 21, 2024

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.

@Fu-Yilei
Copy link
Collaborator

get_genome_n50

should be this one I guess. Forgot the details.

@Humonex
Copy link
Author

Humonex commented Aug 22, 2024

Yes, I have seen the get_genome_n50 in the [post_processing_script.ipynb], do I need to fully run this .ipynb every time if want to get the Methphaser N50?

@Fu-Yilei
Copy link
Collaborator

Not really. I think it takes the middle csv files as input.

@Humonex
Copy link
Author

Humonex commented Aug 22, 2024

Thank you, I know this, I think it would be more convenient for people to use the software and promote the popularity of Methphaser N50 if the get_genome_n50 could be added to [methphasing] or have a command to call the function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants