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

Implement class structure #14

Open
Tonylac77 opened this issue Mar 16, 2024 · 0 comments
Open

Implement class structure #14

Tonylac77 opened this issue Mar 16, 2024 · 0 comments
Assignees
Milestone

Comments

@Tonylac77
Copy link
Contributor

I've analyzed the Python scripts within the scripts folder of your repository. Here are some suggestions on how you can refactor these scripts into classes suitable for object-oriented programming (OOP):

Clustering Functions (clustering_functions.py):

Create a class Clusterer with methods for different clustering algorithms like kmedoids_clustering and affinity_propagation_clustering. This class can hold common attributes needed for clustering, such as the input DataFrame and any hyperparameters for the algorithms.
Clustering Metrics (clustering_metrics.py):

Consider a class ClusteringMetrics with static methods for each metric calculation like simpleRMSD_calc, spyRMSD_calc, espsim_calc, etc. This approach groups all related metric functions and makes it clear that these functions are closely related and perform similar roles.
Consensus Methods (consensus_methods.py):

A class ConsensusCalculator can encapsulate methods like ECR_best, ECR_avg, avg_ECR, etc. This class can also manage common resources or shared data needed across these methods, improving data encapsulation and reusability.
Docking Functions:

Since the content wasn't provided, I recommend structuring docking-related functions into a class that might be named DockingProcessor. This class could manage docking operations, including preparing ligands and proteins, performing the docking process, and analyzing the results.
DoGSiteScorer Integration (dogsitescorer.py):

A class DoGSiteScorerAPI could encapsulate all functionalities required to interact with the DoGSiteScorer API, including submitting jobs, uploading PDB files, and fetching results. This class would act as an API client dedicated to DoGSiteScorer.
Pocket Detection (get_pocket.py):

A PocketDetector class can encapsulate functionalities for detecting and processing pockets in protein structures, leveraging the methods already defined in the script.
Library Preparation (library_preparation.py):

Consider a class LibraryPreparer that includes methods for molecule standardization, conformer generation, and any preprocessing steps required before docking simulations. This class centralizes the preprocessing steps into a single, reusable component.
Performance Calculation (performance_calculation.py):

A class PerformanceEvaluator could contain methods for calculating various performance metrics for docking or virtual screening results. This class would provide a structured way to assess the effectiveness of the docking process.
Utilities (utilities.py):

While utilities often remain as a collection of standalone functions, consider grouping related utilities into classes if they share common data or are used together frequently.

@Tonylac77 Tonylac77 self-assigned this May 3, 2024
@Tonylac77 Tonylac77 added this to the DockM8 V2 milestone May 3, 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

1 participant