Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ANSWER WITH MATLAB CODE Write a function getcodonusage(s) that takes a DNA strand s as input, calls the findorf(s) function to find the ORF, and

ANSWER WITH MATLAB CODE

Write a function getcodonusage(s) that takes a DNA strand s as input, calls the findorf(s) function to find the ORF, and returns the codon usage of the sequence as both a vector (each element corresponding to the count of a codon, where codons are in alphabetical order) and as a struct with each codon as a field, and its count as the number of occurence of that codon. The returned structure should contain all possible codons, with codons not occurring in the sequence having a count of 0. Do not use functions available in the Bioinformatics toolbox. Hint: You may find getallcodons.m function useful. If your solution calls other files (such as findorf and getallcodons), you can add these functions to the end of your getcodonusage.m file, so your getcodonusage file is self-contained.

Hint: Pseudocode

Here is an outline for this function that you can follow. This is of course, not exactly the Matlab code.

Let v be the codon count vector. Let r be the codon count struct. allcodons=getallcodons(); Initialize v to be a vector of zeros (you will have as many elements as allcodons). Foreach allcodons as cod: Initialize r.(cod) to zero. orf=findorf(s); Foreach orf as cod: Find the index of cod in allcodons using strcmp(). Increment the corresponding entry in v by one. Increment r.(cod) by one. 

>> [codonusagevector codonusagestruct]=getcodonusage('ATTAATGCATTTTTAGGAATA') codonusagevector = Columns 1 through 13 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 14 through 26 0 1 0 0 0 0 1 0 0 0 0 0 0 Columns 27 through 39 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 40 through 52 0 0 0 0 0 0 0 0 0 0 0 1 0 Columns 53 through 64 0 0 0 0 0 0 0 0 0 0 0 1 codonusagestruct = AAA: 0 AAT: 0 AAG: 0 AAC: 0 ATA: 0 ATT: 0 ATG: 1 ATC: 0 ...output truncated for brevity... TAG: 1 ...output truncated for brevity... TTT: 1 ...output truncated for brevity... CAT: 1 ...output truncated for brevity... CCC: 0 

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

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions