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

Connected components? #115

Open
tnn111 opened this issue Aug 25, 2022 · 10 comments
Open

Connected components? #115

tnn111 opened this issue Aug 25, 2022 · 10 comments
Milestone

Comments

@tnn111
Copy link

tnn111 commented Aug 25, 2022

Hi,

Is there a way of getting BandageNG to output connected components as separate assembly graphs? I work with metagenomes and it would be extremely useful to be able to do this and then work on the individual graphs.

Thanks, Torben

@asl
Copy link
Owner

asl commented Aug 25, 2022

Are you sure you're having separate components? This is very unusual. Usually metagenomes are just one huge component connected via conservative elements such as ribosomal genes and other that underwent HGT.

Can you post the graph info information here?

@tnn111
Copy link
Author

tnn111 commented Aug 25, 2022 via email

@asl
Copy link
Owner

asl commented Aug 25, 2022

Sorry, no screenshot. Likely you'd need to do this via GitHub website, not email

@tnn111
Copy link
Author

tnn111 commented Aug 25, 2022

Trying again :-)

PastedGraphic-1

@tnn111
Copy link
Author

tnn111 commented Aug 25, 2022 via email

@asl
Copy link
Owner

asl commented Aug 25, 2022

Oh, ok. Looks like a very fragmented one with low complexity. For now I'd just select a node from component and draw on, say, distance 500 around the node.

@asl
Copy link
Owner

asl commented Sep 6, 2022

@tnn111 Will it work if we'd add another possible scope, namely "component containing node(s)"?

@tnn111
Copy link
Author

tnn111 commented Sep 7, 2022 via email

@asl
Copy link
Owner

asl commented Sep 7, 2022

Well, SPAdes has gfa-split tool in the package, that splits GFA into connected components preserving PATHS, etc. :)

Also, you can certainly reuse GFA parser from BandageNG, it's pretty self-contained (and was made such for the purpose of easy reuse).

@rlorigro
Copy link

If you're willing to build this repository it also has the same functionality in the build/split_connected_components executable:
https://github.com/rlorigro/GFAse/blob/main/src/executable/split_connected_components.cpp

This repository also has a subgraph extraction executable, but it will not preserve a path in the output:
https://github.com/vgteam/GetBlunted/blob/master/src/executable/extract_subgraph.cpp

@asl asl added this to the 2022.10 milestone Oct 24, 2022
@asl asl modified the milestones: 2022.10, 2024.08 Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants