Created
October 7, 2015 14:15
-
-
Save skaae/7250cff8eb39ac9bf722 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find_prot(fasta_dict, protein_name): | |
'''Function to find protein in fasta_dictionary''' | |
# Check if fasta_dict contains the protein name key | |
if protein_name in fasta_dict: | |
# Return biological sequence | |
return fasta_dict[protein_name] | |
else: | |
# Print error message | |
print "Error: %s not found" % protein_name | |
return None # We'll see how to deal with this properly next week |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment