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

Improve documentation on Methods to access segments, edges, etc. by id #28

Open
nhansen opened this issue Jan 24, 2023 · 7 comments
Open

Comments

@nhansen
Copy link

nhansen commented Jan 24, 2023

Thanks @ggonnella for a great library!

This is more of a question than an issue. I don't see any documentation on how I can access particular segments and edges in my gfa object after I've read it in from a file. Is there a simple way to do something like gfa.get_segment('mysegid')?

Thanks again,
--Nancy

@ggonnella
Copy link
Owner

Hi Nancy,
thank you.

Sure. You can use gfa.segment("mysegid") or gfa.line("mysegid").

Kind regards
GIorgio

@nhansen
Copy link
Author

nhansen commented Jan 26, 2023

Thanks so much! I knew there had to be a way, but couldn't guess it.

--Nancy

@nhansen nhansen closed this as completed Jan 26, 2023
@ggonnella
Copy link
Owner

Have a look to the manual! :)

@nhansen
Copy link
Author

nhansen commented Jan 26, 2023

I actually spent quite a bit of time reading the manual, but I didn't catch the one place that you use the Gfa segment method, in a section titled "Renaming lines." And there you only use the method to illustrate how to rename segments:

g.segment('A').name = 'C'

As far as I can tell, you never give the usage elsewhere. But still, thanks for the library!

@ggonnella
Copy link
Owner

Fair enough

I think it's explained in section 3.2, but maybe not good enough.

Thank you for asking!

@nhansen
Copy link
Author

nhansen commented Jan 26, 2023

Thanks Giorgio. We'll have to agree to disagree then, because all I see in section 3.2 is methods that return strings, when I wanted a method to return the Segment object from the id. I think it would be nice to add a couple of sentences somewhere to introduce these methods, but I fully admit that I'm being picky about an otherwise very useful package. Thanks again for your help!

@ggonnella
Copy link
Owner

You're right

I reopen the issue and improve the docs.

Thank you for pointing this out.

@ggonnella ggonnella reopened this Jan 27, 2023
@ggonnella ggonnella changed the title Methods to access segments, edges, etc. by id? Improve documentation on Methods to access segments, edges, etc. by id Jan 27, 2023
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

2 participants