Closed whelixw closed 1 month ago
Your string is too long to map with vg map
, at least with default parameters. It gives a warning
vg map -s $(< mitogenome_str) -V MF925712.1 -g graph_circ.gcsa -x graph_circ.xg > MF925712.1.gam
warning: Thread 0 encountered sequence of length 16504, which is longer than the non-chunked limit of 256. Alignments may be discontiguous. To adjust this behavior, change the band width parameter. Suppressing further warnings.
which should be an error here, because the GAM that comes out is invalid
vg validate MW534270.1_graph_circ.vg -a MF925712.1.gam
Invalid Alignment:
{"name": "MF925712.1", "path": {"mapping": [{"edit": [{"sequence": "GTTAATGTAGCTTAATAAT....
Node 0 not found in graph
alignment: invalid
graph: valid
If you listen to the warning and add -w 16505
to vg map
, everything will run through (though I don't make any claims about the quality of the alignment -- vg map
is a short read aligner).
Changing the band width does indeed fix the issue. (note: The band width does not need to be increased to avoid this behavior, just changed. It runs fine with "-w 128") I wonder why longer sequences don't have the same behavior. I assume it is dependant on the alignment? NC_008143.1.fasta.txt As an example, this works:
vg construct -r MW534270.1.fasta > MW534270.1_initial_graph.vg
vg circularize -p MW534270.1 MW534270.1_initial_graph.vg > MW534270.1_graph_circ.vg
vg stats -z MW534270.1_graph_circ.vg
vg index -x graph_circ.xg MW534270.1_graph_circ.vg
vg prune -k 48 MW534270.1_graph_circ.vg > MW534270.1_graph_circ_pruned.vg
vg index -g graph_circ.gcsa -Z 400 MW534270.1_graph_circ_pruned.vg
tail -n +2 NC_008143.1.fasta.txt | tr -d '\n' > mitogenome_str
vg map -s $(< mitogenome_str) -V NC_008143.1 -g graph_circ.gcsa -x graph_circ.xg > NC_008143.1.gam
vg augment MW534270.1_graph_circ.vg NC_008143.1.gam -i -S > NC_008143.1_graph_circ.vg
For the record, I am using vg map as I want my augmented graphs to be circular. I've tested giraffe for this, but it does not produce circular graphs after augmentation.
1. What were you trying to do? I am trying to map and augment one fasta to a graph made by vg construct. The graph is circularized by vg circularize.
2. What did you want to happen? I expected the mapping and augmentation to succeed and produce a vg file containing two paths. These exact commands have worked with other inputs.
3. What actually happened? vg augment throws an error.
4. If you got a line like
Stack trace path: /somewhere/on/your/computer/stacktrace.txt
, please copy-paste the contents of that file here:5. What data and command can the vg dev team use to make the problem happen? wd.zip
The following commands should be run inside the extracted wd directory:
6. What does running
vg version
say?