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

gfa view subgraph radius definition #15

Closed
ggonnella opened this issue Sep 4, 2020 · 4 comments
Closed

gfa view subgraph radius definition #15

ggonnella opened this issue Sep 4, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@ggonnella
Copy link

Dear Heng Li,
I recently tried the gfa view command with options -l <SEGMENT_NAME> -r <RADIUS>.

However, the results are not the one which I would expect. Since the tools do not have a very clear documentation yet, I am not sure if I maybe misunderstood completely the commands - or if there is some kind of bug instead.

E.g. when I use the test file included in the repository (MT.gfa). This is the file displayed using my gfaviz tool. I gave a different color to each of what I would expect to be the definition of different radius.
colored-segments
I would expect to extract, when using -l MTh0 -r <radius> the following:

  • r=0 --> red segment only
  • r=1 --> red segment & blue segments and links between them
  • r=2 --> ...& yellow
  • r=3 --> ...& magenta
  • r>=4 --> whole graph.

What I actually get is:

  • r=0 => as expected
  • r=1 => as expected
  • r=2 => as expected
  • r=3 => as expected, BUT:
  • r=4 => same result as r=2, which I do not understand...
  • r=5 => same result as r=3 (unexpected)
@lh3
Copy link
Owner

lh3 commented Sep 4, 2020

Thanks. I have also noticed some weird behavior of subgraph extraction, but I haven't gone into that.

@lh3 lh3 added the bug Something isn't working label Dec 22, 2020
@lh3 lh3 closed this as completed in 53eca7a Dec 22, 2020
@lh3
Copy link
Owner

lh3 commented Dec 22, 2020

Sorry for coming back to this so late. Before 53eca7a, gfatools was using DFS to extract subgraphs. The extraction depends on which node is visited first. I don't understand its behavior sometimes, either. I have changed DFS to BFS. It should match the expectation better.

By the way, what command-line were you using to produce the graph layout? Thanks.

CC @snurk on #8

@lh3
Copy link
Owner

lh3 commented Dec 23, 2020

Never mind about my question. It is gfaviz. Nice visualization. Would you provide precompiled binaries?

@ggonnella
Copy link
Author

Hi Heng Li. I am looking back at some old projects and I see that I never answered this comment, because I actually did not notice it. Sorry for that. Anyway gfaviz is in my Github https://github.com/ggonnella/gfaviz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants