edawson / svaha2 Goto Github PK
View Code? Open in Web Editor NEWLinear-time, low-memory construction of variation graphs
Linear-time, low-memory construction of variation graphs
Hello,when I use command:
svaha2 -r tgraph.fa -v tgraph.vcf > test.gfa
to generate GFA file,I failed with the error info:
`FASTA index found for tgraph.fa
Parsed fasta index with 1 entries.
Loading variants from tgraph.vcf
Parsed 6 variants.
Created map of contig to breakpoints from variants.
Contig x has 12 breakpoints.
Adding max-node-length breakpoints.
Contig x has 14 breakpoints.
Sorted and uniquified breakpoints
Building reference backbone for x.
terminate called after throwing an instance of 'std::out_of_range'
what(): at: key not present
Aborted`
I need your help,please!
I have repeatedly run into this issue so it's high time I write it down. Variants in a vcf with adjacent positions will cause a segfault, probably because of some sloppy pointer invalidation I coded in mid-thesis.
The right way to fix this is to make a map from genomic position -> a list of alleles/nodes, rather than a single entity. This increases the code complexity but would be a useful improvement.
Because we use a reference genome for input, we can easily generate rGFA. This also gets around the many issues of representing paths in GFA 1 and GFA 2.
We need only three tags to make minigraph-compatible rGFA output:
Tag | Type | Description |
---|---|---|
SN | Z | Name of stable sequence from which the segment is derived |
SO | i | Offset on the stable sequence |
SR | i | Rank. 0 if on a linear reference genome; >0 otherwise |
For reference graphs, this is pretty simple. We'll need to implement pulling some type of VCF name in as well though.
Long vcf lines (such as those with the SV sequence in the ref/alt fields) silently fail parsing. This is standard get_line behavior but is a major issue.
Temporarily, I've fixed this by making the maximum line length really large. This is not an efficient solution. I need to think about how to write a better line-by-line or htslib-style parser (or just htslib) for variants.
The GFA output of svaha2 is currently valid GFA 1. However, minigraph requires GFA overlaps in its output. This means the current output of svaha2 is invalid as minigraph input, which is a real shame.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.