Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

output in gfa2 #80

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

output in gfa2 #80

wants to merge 10 commits into from

Conversation

aafshinfard
Copy link
Member

No description provided.

@aafshinfard
Copy link
Member Author

Adding tests shortly.

@aafshinfard aafshinfard added the enhancement New feature or request label Feb 6, 2023
@aafshinfard aafshinfard self-assigned this Feb 6, 2023
Copy link
Member

@lcoombe lcoombe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for this Amirhossein! Know you're still finalizing, just added some commands while I was thinking about it.

bin/ntlink_pair.py Outdated Show resolved Hide resolved
bin/ntlink_pair.py Outdated Show resolved Hide resolved
bin/ntlink_pair.py Outdated Show resolved Hide resolved
bin/ntlink_pair.py Show resolved Hide resolved
bin/ntlink_pair.py Outdated Show resolved Hide resolved
@aafshinfard
Copy link
Member Author

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:

@aafshinfard
Copy link
Member Author

image

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...

@lcoombe
Copy link
Member

lcoombe commented Feb 9, 2023

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?

@aafshinfard
Copy link
Member Author

Right right. so we're good then.
Also, just pushed the changes you suggested.

@aafshinfard
Copy link
Member Author

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.

@lcoombe
Copy link
Member

lcoombe commented Feb 9, 2023

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

@aafshinfard aafshinfard requested a review from lcoombe February 15, 2023 07:28
@aafshinfard
Copy link
Member Author

Seems like working fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants