0% found this document useful (0 votes)
9 views2 pages

Lab 6 Pseudocode

The document outlines a series of functions for analyzing DNA sequences, including counting nucleotides, calculating mass percentages, and identifying codons. It specifies criteria for determining if a sequence is a protein and details how to read from a file and output results. The main function orchestrates the process by reading the file, processing sequences, and writing the results to an output file.

Uploaded by

paul Martin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

Lab 6 Pseudocode

The document outlines a series of functions for analyzing DNA sequences, including counting nucleotides, calculating mass percentages, and identifying codons. It specifies criteria for determining if a sequence is a protein and details how to read from a file and output results. The main function orchestrates the process by reading the file, processing sequences, and writing the results to an output file.

Uploaded by

paul Martin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Set up mass values for each letter

List stop codons

read_dna_file:
​ - ask for file name
​ - read lines into a list

count_nucleotides:
​ - count A, C, G, T in the sequence
​ - return counts

calculate_mass_percentage:
​ - get total mass
​ - get A, C, G, T mass
​ - calculate percent for each
​ - return total mass + percents

get_codons:
​ - remove "-"
​ - break into sets of 3
​ - return list of codons

is_protein:
​ - must have 5+ codons
​ - must start with ATG
​ - must end with stop codon
​ - C+G percent must be 30+
​ - return True/False

analyze_sequences:
​ - even lines = names
​ - odd lines = sequences
​ - return both

output_results:
​ - write name, sequence, counts
​ - write percents and mass
​ - write codons
​ - write if protein or not

main:
​ - read file
​ - split into names/sequences
​ - get output file name
​ - for each sequence:
​ - run all checks
​ - write results

You might also like