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 IndexError in set_vsc_parameters() due to misplaced right parenthesis in string's format method. #228

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

ProsperP
Copy link

@ProsperP ProsperP commented Aug 1, 2024

Fix IndexError in set_vsc_parameters() due to misplaced right parenthesis in string's format method.

Issue:
When the VSG FASTA file (VSG.fna) was missing, or compressed in the .bz2 format, the program failed to output proper error messages and instead raised an "IndexError: Replacement index 1 out of range for positional args tuple."

Resolution:
The right parenthesis has been correctly placed to ensure the .format method is properly closed. Additionally, added support for bz2-compressed VSG fasta file as input since the corresponding file downloaded from metaphlan database is actually a bz2-compressed file (http://cmprod1.cibio.unitn.it/biobakery4/metaphlan_databases/, as of version vJun23_202403).

…thesis in string's format method.

Issue:
When the VSG FASTA file was missing, or compressed in the .bz2 format, the program failed to output proper error messages and instead raised an "IndexError: Replacement index 1 out of range for positional args tuple."

Resolution:
The right parenthesis has been correctly placed to ensure the format method is properly closed. Additionally, added support for bz2-compressed VSG fasta file as input since the corresponding file downloaded from metaphlan database is actually a bz2-compressed file (http://cmprod1.cibio.unitn.it/biobakery4/metaphlan_databases/, as of version vJun23_202403).
@Cengoni
Copy link
Collaborator

Cengoni commented Sep 24, 2024

Hi @ProsperP
Thank you for spotting the issue with parentheses. Regarding the zipped VSG.fna, it is actually unzipped when the database is installed, so if you could remove that part I will proceed to accept the pull request.
Thank you!

…thesis in string's format method.

Issue:
When the VSG FASTA file was missing, or compressed in the .bz2 format, the program failed to output proper error messages and instead raised an "IndexError: Replacement index 1 out of range for positional args tuple."

Resolution:
The right parenthesis has been correctly placed to ensure the format method is properly closed.
@ProsperP
Copy link
Author

Hi @Cengoni,
Thanks for your reply. I've made the change accordingly and hope that I'm doing it in the right way.

@Cengoni Cengoni merged commit 0009254 into biobakery:master Sep 24, 2024
1 check passed
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.

2 participants