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

Does merqury output phased block NG50 ? #60

Open
HaploKit opened this issue Oct 1, 2021 · 2 comments
Open

Does merqury output phased block NG50 ? #60

HaploKit opened this issue Oct 1, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@HaploKit
Copy link

HaploKit commented Oct 1, 2021

Hi, may I ask a question: merqury provides phased block N50, it seems it does not provide phased block NG50, is it right or I missed something? Thanks in advance.

@arangrhie
Copy link
Contributor

Hello @HaploTookit ,

No, there is no direct way to get the NG50 from merqury.
I use the *.phased_block.sizes to get the NG50 and associated continuity plots.

Rscript $MERQURY/plot/plot_block_N.R -b asm1.100_20000.phased_block.sizes -o asm1.phased_blocks -g 3100000000
Rscript $MERQURY/plot/plot_block_N.R -b asm2.100_20000.phased_block.sizes -o asm2.phased_blocks -g 3100000000

Each line of the phased_block.sizes contains
2nd column: haplotype of each block
3rd column: block size

They are sorted by size, should be easy to get the haplotype NG50 from there.
I use faiCalcNGStats.jar to get the NG values; but should be trivial to calculate the NG50s in other ways.

cut -f2-3 asm1.100_20000.phased_block.sizes | java -jar -Xmx256m $tools/vgp-assembly/pipeline/stats/faiCalcNGStats.jar - 3100000000

I'll make a feature request for that in merqury. Would be handy to have it in.

@arangrhie arangrhie added the enhancement New feature or request label Dec 1, 2021
@HaploKit
Copy link
Author

HaploKit commented Dec 1, 2021

Many thanks for your help.

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

No branches or pull requests

2 participants