ntLink
ntLink copied to clipboard
output in gfa2
Adding tests shortly.
I am playing around with gfaviz
and gfatools
to make sure gfa files I output are correct.
Seems like we should keep the segment (node) without any orientation when storing the node (only one instance per node instead of two in ntLink's dot format), and then orientation is the gap/edge line obviously.
But there is something I still cannot understand. I have this toy example:
$ cat /projects/btl_scratch/aafshinfard/projects/ntlink/ntlink-gfa2/tests/alaki3.gfa
H VN:Z:2.0
graph [scaf_num=None]
S 189231 49057 *
S 188266 33803 *
S 181818 22222 *
G * 188266+ 189231- 4541 * FC:i:11
G * 189231+ 188266- 200 * FC:i:11
G * 189231+ 181818- 400 * FC:i:6
and when I visualize it using gfaviz I see the following:
From top to bottom we have nodes 188266, 189231, and 181818. There are two edges from 188266 to 189231 and I was expecting one of them to connect the other side of 1st node to the other side of the second node, right? but it did not...
Hmm.. But these edges:
G * 188266+ 189231- 4541 * FC:i:11
G * 189231+ 188266- 200 * FC:i:11
Are just reverse complements of each other, right? So they're basically describing the same edge? Like if you made those edges directional, you'd see the arrows pointing in opposite directions?
Right right. so we're good then. Also, just pushed the changes you suggested.
I just added the correct gfa
file for doing testing:
tests/ntLink scaffolds_1.fa.k32.w250.z1000.n1.scaffold.gfa reads=long_reads_1.fa prefix=scaffolds_1.fa.k32.w250.z1000 n=1 w=250 z=1000 k=32 target=scaffolds_1.fa
and was about to touch test_installation.sh
and I figured out it's for users to tests their installation,
so should I add the tests in the azure-pipelines
or the ntlink_pytest.py
, and I am a bit confused how to do so.
I know if I run
ntLink scaffolds_1.fa.k32.w250.z1000.n1.scaffold.gfa reads=long_reads_1.fa prefix=scaffolds_1.fa.k32.w250.z1000 n=1 w=250 z=1000 k=32 target=scaffolds_1.fa
it will generate the same file as the correct file mentioned above.
Yes, the ntlink_pytest.py
is the right place to put the test - so you can run it and then also verify the output is as expected as well. Those tests are run in a step of the azure-pipelines.yml
workflow
Seems like working fine now.