Write a program that asks the user for a file


Assignment

• Write a program that asks the user for a file containing a FASTA nucleotide sequence (included is a file called sequence.fasta you can use). Then prompt the user to select from the following menu:

o Calculate DNA composition: This will print to the screen the numbers of A, G, C and T nucleotides, and any unknowns (N's).
o Calculate AT content: Prints to the screen the percentage of AT in the sequence.
o Calculate GC content: Prints to the screen the percentage of GC in the sequence.
o Compliment: Prints to the screen the compliment of the DNA sequence.
o Reverse compliment: Prints to the screen the reverse compliment.

Each menu item above should be implemented in its own function. The function should be called when the user selects the respective menu item. The functions should accept as argument the DNA sequence and then perform the appropriate calculations\algorithm.

Input validation: Check to see that the file name entered by the user exists AND that the sequence is in FASTA format. You can assume that there is only one sequence in the file.

• Write a program that asks the user for a file containing a FASTA nucleotide sequence (you can use the same sequence.fasta file as above). Then prompt the user to select a frame (number 1 through 6). Your program should then find the translation (protein sequence) of the nucleotide sequence in that frame. Print the translation to the screen.

Input validation: Check to see that the file name entered by the user exists AND that the sequence is in FASTA format. You can assume that there is only one sequence in the file.

• Write a program that asks the user for a sequence in GenBank format (included is a file called sequence.gb that you can use). Your program should convert the GenBank formatted sequence into FASTA format. Write the FASTA formatted sequence to a file, name of which should include the accession number (i.e. NM_001250672.txt, where NM_001250672 is the accession number).

• Write a program that asks the user for a file containing a nucleotide sequence AND the name of a restriction enzyme. Your program should return the positions in the sequence where the enzyme cuts. Parse out the enzymes and their cut sites from the attached RestrictionEnzymes.txt file.

• Read in a whole genome (in FASTA format - file called genome.txt, see attached) and compute the background codon frequencies. The background frequency of a codon is computed by the formula: background_frq(codon) = 100 * N(codon)/ Total_codons where N(codon) is the number of occurrence of the codon across the entire genome, and Total_codons is the total number of all codons in the whole genome. Print out the background frequency of each codon, from AAA to TTT. Use a dictionary in your solution. Your program should count codons that appear in all reading frames and then calculate and display the average.

Format your assignment according to the following formatting requirements:

o The answer should be typed, using Times New Roman font (size 12), double spaced, with one-inch margins on all sides.

o The response also includes a cover page containing the title of the assignment, the student's name, the course title, and the date. The cover page is not included in the required page length.

o Also include a reference page. The Citations and references must follow APA format. The reference page is not included in the required page length.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Write a program that asks the user for a file
Reference No:- TGS03128741

Expected delivery within 24 Hours