Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

1 DrugBank and Drug Design AI for drug design is one of several major research projects being conducted by Biomedical Data Science Laboratory. In these projects, we develop machine learning models...

1 answer below »
1 DrugBank and Drug Design
AI for drug design is one of several major research projects being conducted by Biomedical Data Science
Laboratory. In these projects, we develop machine learning models that capture key knowledge from existing
data and then apply them for prediction or molecular generation. The DrugBank dataset along with other data
are used in our projects. In this assignment, we focus on playing with the DrugBank data. You are expected to
finish the following tasks.
2 Your Tasks (Total: 12 marks)
You should define classes named BinaryNode, Drug, and DrugBank with the following requirements (feel free to
define extra variables, classes, and methods if needed). Please note that, DrugBank is actually a class for binary
search tree.
1. Define the class Drug with data attributes drugBankID, genericName, SMILES, url, drugGroups, and
score. This class has at least one method, named displayDrug to print out the information on the
screen. (0.5 mark)
2. Define the BinaryNode class with an instance of the Drug class as its data attribute. This class has a
method called displayNode. (0.5 mark)
3. Define a method named readData under the DrugBank class to load all the provided information from
the given text file to an a
ay variable (named data which is an attribute of the class). (1 mark)
4. Define an (either iterative or recursive) method named create to insert all drugs in the a
ay into a
inary search tree using drugBankID as the key. The root of the binary search tree is a data attribute
of the class, and is named root of BinaryNode type. Hint: you may define a separate insert method.
(2 marks)
5. Define a recursive method named inOrderTraverse under the DrugBank class to output the in-
formation of each drug (using the same format as the given file) into an output text file (named
dockedApprovedSorted.tab) in the order of the traversal. (2 marks)
6. Define an (either iterative or recursive) method named search under the DrugBank class to search fo
a drug entry based on a given drugBankID. (1 mark)
7. Define a method named delete under the DrugBank class to remove a node with a drug entry of the
given drugBankID from the binary search tree. (2 marks)
8. Define an (iterative or recursive) method named depth1 under the DrugBank class to find the the depth
of a node with a given key (i.e., drugBankID). (1 mark)
1
9. Define a recursive method named depth2 under the DrugBank class to find the depth of the deepest
node in the tree. (1 mark)
10. In the main function, instance (named db) of the DrugBank should be created. The following methods
of this instance should be called sequentially:
(a) db.create(· · · )
(b) db.inOrderTraverse()
(c) db.depth1(‘‘DB01050’’)
(d) db.depth2()
(e) db.search(‘‘DB01050’’)
(f) db.search(‘‘DB00316’’)
(g) db.delete(‘‘DB01065’’).
, (0.5 mark)
11. Your code should be well commented. (0.5 mark)
3 Submission
• Your source code.
• A PDF printout of your source code.
• The text file with result required in Task 10; and the another output file dockedApprovedSorted.tab.
2
Answered 5 days After Oct 08, 2022

Solution

Kshitij answered on Oct 14 2022
58 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here