Created
May 3, 2019 08:52
-
-
Save StephenFordham/bb9dbc2993aa8d3d44a3ffa95aca61e9 to your computer and use it in GitHub Desktop.
creating_dictionaries
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
Ref_dict = dict(zip(Reference_species, Reference_sequences)) | |
Unknown_dict = dict(zip(my_unknown_id, my_unknown_seq)) | |
print(Ref_dict) | |
print(Unknown_dict) | |
Output: | |
{'A': 'AAAAGCGCGAGGGGGGA', 'K': 'GGGAGAGAGGG', 'Y': 'CGGAGCGTTT', 'T': 'TTTTAGAGAGCTCTG', 'P': 'TAGAGAGCGGCC', 'E': 'GAAGGCGCT', 'V': 'TATAGCGCGCG', 'M': 'TAGAGCGCGA', 'N': 'GGCTCCGG | |
GAGA', 'Q': 'GGGGCCCCCATA'} | |
{1: 'AGCGCGAGGGGGGA', 2: 'GGGAGAGA', 3: 'CGGAGCGTTT', 4: 'TAGCTGAGA', 5: 'TAGAGAGCGGCC', 6: 'GAAGGCGCT', 7: 'TATAGCGCGCG', 8: 'TAGAGCGCGA', 9: 'GAGGCTCCGGGAGA', 10: 'GGGGCCCCCATA'} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi Stephen, I was trying to use this code but I keep getting the following error message:
ValueError: dictionary update sequence element #0 has length 3; 2 is required