Chat-To-Sequence / grapher.py
Kevin Louis
Upload grapher.py
7ef4de5
raw
history blame
489 Bytes
from DNAseq import DNAseq
import plotly.graph_objects as go
# Derived class (subclass)
class DNAgrapher(DNAseq):
def pie_chart(self):
labels = ['Guanine', 'Cytosine', 'Thymine', 'Adenine']
values = [self.get_unit_count('g'),
self.get_unit_count('c'),
self.get_unit_count('t'),
self.get_unit_count('a'),
]
fig = go.Figure(data=[go.Pie(labels=labels, values=values)])
return fig