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

Restructuring PANDORA's files #164

Merged
merged 9 commits into from
Sep 7, 2022
Merged

Conversation

gcroci2
Copy link
Collaborator

@gcroci2 gcroci2 commented Aug 19, 2022

No description provided.

@gcroci2 gcroci2 linked an issue Aug 19, 2022 that may be closed by this pull request
2 tasks
@gcroci2 gcroci2 mentioned this pull request Aug 19, 2022
2 tasks
@gcroci2 gcroci2 requested a review from DarioMarzella August 19, 2022 13:52
@@ -7,7 +7,7 @@
:meta hide-value:
'''

PANDORA_data = os.path.join(os.path.dirname(PANDORA_path), 'PANDORA_files', 'data')
PANDORA_data = os.path.join(os.path.dirname(PANDORA_path), 'Databases', 'default')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hi @gcroci2 , I have a question.
By defining PANDORA_data like this, PANDORA will always use the default database also, for instance, for blasting the MHC sequence (Modelling_functions.py, line 847). Will this prevent a user from using their own generated database when blasting? If I am not wrong, there is not an option to select the blast db.
Any idea on how to solve this issue? Maybe just redefining PANDORA_data at the beginning of the user's script will be enough?

Copy link
Collaborator Author

@gcroci2 gcroci2 Aug 31, 2022

Choose a reason for hiding this comment

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

PANDORA_data now is a global variable (in the package namespace) that is used internally in functions and classes, and the structure of the code does not take into account such a possibility for the user. We could either a) make PANDORA_data an attribute of the Database class, and then modify methods and functions accordingly or b) create a config file (.py, .yml, .toml, ...) in which we put the default folder path, that can be modified by the user. The init of the package then is just going to read out this config file, assigning PANDORA_data to the path that finds there.

@DarioMarzella DarioMarzella merged commit 99e155e into development Sep 7, 2022
@DarioMarzella DarioMarzella deleted the restructuring_db branch September 7, 2022 14:37
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.

Wrap up database in a single folder
2 participants