Question: Your code: 1 . Create a function called load _ data. a . It takes as argument the name of the file to be used
Your code:
Create a function called loaddata.
a It takes as argument the name of the file to be used a string
b It returns a data structure or more than one that contains all of the information from the input file.
Create a function called countnuclfreq.
a It takes as argument the data structures generated by loaddata.
b It returns a new data structure or more than one that contains the frequencies of the nucleotides for each column in each sequence.
Create a function called findconsensus.
a It takes as argument the data structures generated by countnuclfreq.
b It returns a string; the consensus sequence.
Create a function named processresults.
a It takes as arguments the data structures created by countnuclfreq and the name of the output file a string
b It writes the results, in the format previously described, to the output file.
c It doesnt return anything.
Other Important information
Sample files are provided, but they are for testing purposes only. In other words, the sample DNAOutput.txt provided should be the result of executing your program with the sample file provided DNAInputfasta or DNAInput.txt Your program should be able to work with any FASTA file where all sequences are of the same length.
You should NOT prompt for the file name; you should ALWAYS try to open a file named DNAInput.txt and your output should ALWAYS be to a file named DNAOutput.txt
You may assume that:
Every combination of descriptionsequence takes up lines line for each
All sequences in the file have the same length. The exact length is not initially known; you may determine it from any of the sequences.
All nucleotides are in capital letters.
There will be no characters other than A C T and G in the sequences.
There will be no ties for the most highlyoccurring nucleotide in any column. This means that, when determining the consensus, there will be a single nucleotide that is the highest occuring.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
