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

fix: error with gfa export of fully duplicated paths #19

Merged
merged 1 commit into from Mar 3, 2022

Conversation

mmolari
Copy link
Collaborator

@mmolari mmolari commented Mar 3, 2022

Fixes an error that would come up when exporting to gfa format with the --no-duplications flag, if one of the paths is composed of only duplicated blocks.
In this case the list of exported nodes is empty, and I would hit the error in line 151 of the old version, when nodes[1] was called.
I fixed it by simply avoid defining the path if no nodes are exported, and later avoid writing a path to file if undefined.

@mmolari mmolari requested a review from nnoll March 3, 2022 19:04
Copy link
Collaborator

@nnoll nnoll left a comment

Choose a reason for hiding this comment

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

Looks great. Correctly handles the empty case now.

@nnoll nnoll merged commit ca646a1 into master Mar 3, 2022
@nnoll nnoll deleted the fix/export-duplicated-paths branch March 3, 2022 19:24
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

Successfully merging this pull request may close these issues.

None yet

2 participants