ekg / seqwish

alignment to variation graph inducer
MIT License
143 stars 18 forks source link

Seqwish graph underaligned #111

Closed cgroza closed 1 year ago

cgroza commented 1 year ago

Hi,

I am looking for your advice on building a pangenome graph among primates. I am trying to build a primate pangenome using the macaque, gorilla, orangutan, chimp and human genomes (2x assemblies each + references, n = 14). I have produced wfmash alignments using -p 90 and -s 20k. I then inspected these alignments manually (with awk) to see how much each primate assembly covers the other assemblies. For macaque assemblies on human assemblies, I get around 2.6 gigabases, which is pretty good.

I then after run seqwish on these PAFs with -k 79. However, when I run odgi similarity on the graph, the path intersection stats do not reflect the expected results. Genomes of same species have high estimated similarity (>0.90). However, the macaque genomes show poor similarity to the other primates (only 0.07). This is despite wfmash recognizing that 2.6 gigabses should be at least 90% similar to human genomes.

So far I think -k is too high, making the macaque paths separate too much. I have lowered to -k 19 and -k 31, but now the graphs are too complex and og build takes 20+ days until completion. This high estimated runtime occurs at the building edges step.

Here is how the number of edges changes with -k:

seqwish -k Number of edges
19 1202117586
31 921320697
41 755884122
79 422097450

Is there another parameter I could modify to make the macaque paths merge with the rest of the primates?

AndreaGuarracino commented 1 year ago

Wops, I've missed this issue @cgroza, apologize!

When did you check the alignment, do you check the number of matches/mismatches?

A low Jaccard similarity might make sense in the seqwish graph. We usually do not use it for downstream analysis, but rely on smoothxg on "filling the holes" seqwish introduces.

Have you confirmed which was the problem? How did you solve or, at least, address it?

cgroza commented 1 year ago

Hi,

Yes, three rounds of smoothing brought the estimated identity to 70%. Thanks, I dove deeper into the PGGB paper and learned a lot!

On Mon, May 22, 2023 at 22:55, Andrea Guarracino @.***(mailto:On Mon, May 22, 2023 at 22:55, Andrea Guarracino < wrote:

Wops, I've missed this issue @.***(https://github.com/cgroza), apologize!

When did you check the alignment, do you check the number of matches/mismatches?

A low Jaccard similarity might make sense in the seqwish graph. We usually do not use it for downstream analysis, but rely on smoothxg on "filling the holes" seqwish introduces.

Have you confirmed which was the problem? How did you solve or, at least, address it?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>