Genetic sequences found in GenBank files are stored with file…

  

Genetic sequences found in GenBank files are stored with file… Genetic sequences found in GenBank files are stored with file extensions of “.gbk”.A GenBank file is a fixed-length record format file such that the first 9 columnsof every row are reserved for the number indicating the starting column of thegenetic character (a, t, c, or g) for that row.After the first 9 columns is a space followed by up to 6 groups of 10 characterswhere each group of 10 is separated by a space.So that, every row will be at most exactly 76 characters in length.Listed below is a partial example of such a file named “U49845.gbk”.1 gatcctccat atacaacggt atctccacct caggtttaga tctcaacaac ggaaccattg      61 ccgacatgag acagttaggt atcgtcgaga gttacaagct aaaacgagca gtagtcagct     121 ctgcatctga agccgctgaa gttctactaa gggtggataa catcatccgt gcaagaccaa     181 gaaccgccaa tagacaacat atgtaacata tttaggatat acctcgaaaa taataaaccg     241 ccacactgtc attattataa ttagaaacag aacgcaaaaa ttatccacta tataattcaa     …     …    4861 ttctccactt cactgtcgag ttgctcgttt ttagcggaca aagatttaat ctcgttttct    4921 ttttcagtgt tagattgctc taattctttg agctgttctc tcagctcctc atatttttct    4981 tgccatgact cagattctaa ttttaagcta ttcaatttct ctttgatcQuestion 1:Write the code for a Python function called: “loadGenBankData” that acceptsthe name of a valid GenBank file to read and returns a dictionary such thateach key stores the row number from the file and the value for that key wouldbe the all the genetic characters on that row stored without spaces.For example, given the file above, the first 2 dictionary entries and the lastentry would be:{  1    : “gatcctccatatacaacggtatctccacctcaggtttagatctcaacaacggaaccattg”,  61   : “ccgacatgagacagttaggtatcgtcgagagttacaagctaaaacgagcagtagtcagct”,  4981 : “tgccatgactcagattctaattttaagctattcaatttctctttgatc”}This function returns the loaded dictionary and no error checking or exceptionhandling is required! (10 marks).HINT: Consider using the replace( ), and int( ) functions along with string slices!     The str.replace(old, new[, count]) function returns a copy of the string with     all occurrences of substring old replaced by new. If the optional argument     count is given, only the first count occurrences are replaced.     For example:     sdata = “this is an easy lab test”     print(sdata.replace(‘ ‘, ‘-‘))          # displays: this-is-an-easy-lab-testQuestion 2:Write the code for a Python function called: “getGenBankData” that acceptsa loaded GenBank dictionary from Question 1 and 2 integer values ‘a’ and ‘b’such that ‘a’ will be less than ‘b’ and both ‘a’ and ‘b’ will be valid valueswithin the GenBank data file.However, the differece between ‘a’ and ‘b’ may be greater than 60 and so mayspan multiple dictionary keys.This function returns a string of genetic characters from column ‘a’ to column ‘b’inclusive. (10 marks).HINT: Every row in the GenBank file is a multiple of 60 + 1.     For example,  1 = 60 * 0 + 1    61 = 60 * 1 + 1   121 = 60 * 2 + 1, etc.     Also, string slices [ : ] may be useful!MAIN PROGRAM:# Your solution may ONLY use the python modules listed below and MUST NOT# include the main( ) function.import mathimport stringimport copy# YOUR CODE BELOW…def loadGenBankData(fName) :  # your code here…# end defdef getGenBankData(gbDict, a, b) :  # your code here…# end defdef main( ) :  gbDict = loadGenBankData(“U49845.gbk”)  print(gbDict[61])  print(gbDict[121])  print(gbDict[1981])  seq = getGenBankData(gbDict, 1, 10)  print(seq)  seq = getGenBankData(gbDict, 68, 70)  print(seq)  seq = getGenBankData(gbDict, 68, 71)  print(seq)  seq = getGenBankData(gbDict, 4921, 4930)  print(seq)# end main( )if __name__ == “__main__” :  main( )The OUTPUT should be EXACTLY as displayed below:ccgacatgagacagttaggtatcgtcgagagttacaagctaaaacgagcagtagtcagctctgcatctgaagccgctgaagttctactaagggtggataacatcatccgtgcaagaccaatatattttaacatcattggcatggattcaaagataactcactcaaaccacagtgcgaatggatcctccatgaggagattttcagtgt    Computer Science Engineering & Technology Python Programming IT 209

Don't use plagiarized sources. Get Your Custom Essay on
Genetic sequences found in GenBank files are stored with file…
Just from $13/Page
Order Essay
  

Leave a Reply

Your email address will not be published.

Related Post

TITRATION OF AN UNKNOWN ACID AND DETERMINATION OF MOLAR MASS A. STANDARDIZATION OF NaOH TITRANT Use your data collected in the lab to complete the…TITRATION OF AN UNKNOWN ACID AND DETERMINATION OF MOLAR MASS A. STANDARDIZATION OF NaOH TITRANT Use your data collected in the lab to complete the…

  Image transcription textTITRATION OF AN UNKNOWN ACID ANDDETERMINATION OF MOLAR MASS A.STANDARDIZATION OF NaOH TITR… Show more… Show moreImage transcription textAVERAGE MOLARITY CALCULATIONSIndicate the 2 trials used to calculate average[NaOH]:

READ MOREREAD MORE
Open chat
💬 Need help?
Hello 👋
Can we help you?