Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SHOW MATLAB OR PYTHON CODE. 1. Implement a hashing function for 3-mer. That is, given a 3-mer, e.g., AAA, you should return an integer, e.g.,

image text in transcribedSHOW MATLAB OR PYTHON CODE.

1. Implement a "hashing" function for 3-mer. That is, given a 3-mer, e.g., AAA, you should return an integer, e.g., 1. We take the natural order of sorted nucleotides, i.e., AAA -> 1, AAC -> 2, AAG -> 3, ..., TTT -> 64 as there are 64 possible combinations. Hint: Consider encode A, C, G, Tas [0, 1, 2, 3]. Then, a 3-mer can be considered as a 3-digit 4 based integer (Quaternary). For example, ATC would be a 4 based number "031" which can be converted to a number in decimal numerical system by: 0 * 4^2 + 3 * 411 + 1 * 4^0 = 13 Since we require the number starts from 1, you need to add 1 to the final results. Hence, you should return 14 in your function

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Master The Art Of Data Storytelling With Visualizations

Authors: Alexander N Donovan

1st Edition

B0CNMD9QRD, 979-8867864248

More Books

Students also viewed these Databases questions

Question

2. Is absorbing or consuming facts and forms a priority?

Answered: 1 week ago

Question

manageremployee relationship deteriorating over time;

Answered: 1 week ago