Buckets:
| ###################### | |
| # Importing Libraries# | |
| ###################### | |
| import pandas as pd | |
| import streamlit as st | |
| import altair as alt | |
| from PIL import Image | |
| ###################### | |
| # Page Title # | |
| ###################### | |
| image=Image.open('dna-logo.png') | |
| st.image(image, use_column_width=True) | |
| st.write(""" | |
| # DNA Nucleotide Counter App | |
| This app counts the nucleotide composition of query DNA! | |
| *** | |
| """) | |
| ###################### | |
| # Input Text Box # | |
| ###################### | |
| st.header('Enter DNA sequence') | |
| sequence_input= ">DNA Query 1 \nGATGGAACTTGACTACGTAAATT\nTGACAGTTACCAATGCTTAATC\nGCGTACGAATTTAGCCTAGCG\nTTAGCTAGCTAGCTACGATCG\n" | |
| #sequence= st.sidebar.text_area("Sequence input", sequence_input, height=250) | |
| sequence= st.text_area("Sequence input", sequence_input, height=250) | |
| sequence= sequence.splitlines() | |
| sequence= sequence[1:] # Skipping the first line | |
| sequence= ''.join(sequence) # Joining list to string | |
| st.write(""" | |
| *** | |
| """) | |
| ## Ping the input sequence | |
| st.header('Input DNA Sequence') | |
| st.text(sequence) | |
| ###################### | |
| # DNA Nucleotide Count# | |
| ###################### | |
| st.header('DNA Nucleotide Count') | |
| # Count nucleotides | |
| nucleotide_counts = { | |
| 'A': sequence.count('A'), | |
| 'T': sequence.count('T'), | |
| 'G': sequence.count('G'), | |
| 'C': sequence.count('C') | |
| } | |
| # Display counts | |
| st.subheader('Nucleotide Counts') | |
| for nucleotide, count in nucleotide_counts.items(): | |
| st.write(f"{nucleotide}: {count}") |
Xet Storage Details
- Size:
- 1.51 kB
- Xet hash:
- a4d4eb3d08782f361b0eb0598521fe9fcc47f04d20ac93f975f4a00b25bb6db7
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.