1. What were you trying to do?
Inject a sam file into gam format. The sam file is the output of minimap2 mapping against the output of vg paths -F so the paths in the sam file ought to be exactly the same as the paths in the graph.
2. What did you want to happen?
For the inject command to output the alignments in gam format.
3. What actually happened?
Inject crashed with the error
[vg::alignment.cpp] error: alignment references path not present in graph:
(no text after the ":" giving the path name)
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:
N/A
5. What data and command can the vg dev team use to make the problem happen?
I made two toy example sam files from the actual sam file I was trying to run through. Each of them had a single non-header line from the original sam file. One of them was a mapped read (i.e., RNAME != "") and the other was an unmapped read (i.e. RNAME == ""). The sam file containing a single mapped read successfully converted to gam but the sam file containing a single unmapped read gave the same error as running on the whole file.
Therefore, it appears that the problem is that vg inject doesn't know how to handle unmapped reads, at least in sam format.
1. What were you trying to do? Inject a sam file into gam format. The sam file is the output of minimap2 mapping against the output of
vg paths -F
so the paths in the sam file ought to be exactly the same as the paths in the graph.2. What did you want to happen? For the inject command to output the alignments in gam format.
3. What actually happened? Inject crashed with the error
(no text after the ":" giving the path name)
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:N/A
5. What data and command can the vg dev team use to make the problem happen?
I made two toy example sam files from the actual sam file I was trying to run through. Each of them had a single non-header line from the original sam file. One of them was a mapped read (i.e., RNAME != "") and the other was an unmapped read (i.e. RNAME == ""). The sam file containing a single mapped read successfully converted to gam but the sam file containing a single unmapped read gave the same error as running on the whole file.
Therefore, it appears that the problem is that
vg inject
doesn't know how to handle unmapped reads, at least in sam format.To be more exact, here are the commands I used:
6. What does running
vg version
say?