<jupyter_start><jupyter_text>PurposeCheck the GC-content of all the primers.<jupyter_code>from tinydb import TinyDB, Query
from Bio.SeqUtils import GC
# Open the database
db = TinyDB('primers.db.json')

# Query for primer 30 and 27
primer_30 = db.get(eid=30)['sequence']
primer_27 = db.get(eid=27)['sequence']

#Verify the sequence:
primer_30
primer_27
#Check the GC content of primer 30
GC(primer_30)<jupyter_output><empty_output><jupyter_text>ConclusionTrim primers to increase GC content<jupyter_code>new_primer_30 = primer_30[0:55]
new_primer_30
end_base = 0
reverse_primer_27 = primer_27[::-1]
for base in reverse_primer_27:
    if base == 'G' or base == 'C':
        new_primer_27 = reverse_primer_27[end_base:]
        print(new_primer_27[::-1])
        break
    else:
        end_base+=1
        
        
primer_30
primer_30[::-1]
primer_27
new_primer_27<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10514541387024609, 'fraction_numerical': 0.06040268456375839, 'mean_word_length': 4.774193548387097, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '479843', 'license': 'MIT', 'n_tokens_mistral': 379, 'n_tokens_neox': 342, 'n_words': 74, 'path': 'data/20160906-GC-Content-Check.ipynb', 'repo_name': 'ericmjl/protein-systematic-characterization', 'size': '894'}