Skip to content

Commit

Permalink
Fix pylint and flake8 errors in app_alignment_viewer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Bachibouzouk committed Jan 22, 2019
1 parent 94168cb commit 6b58dfc
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 34 deletions.
1 change: 1 addition & 0 deletions assets/alignment-styles.css
Expand Up @@ -23,6 +23,7 @@
background-color: #F5F5F5;
border-radius: 8px;
box-shadow: inset 0px 0px 8px rgba(0, 0, 0, 0.05);
text-align: justify;
}

.alignment-select {
Expand Down
81 changes: 47 additions & 34 deletions tests/dash/app_alignment_viewer.py
@@ -1,6 +1,4 @@
import base64

import pandas as pd
import dash_html_components as html
import dash_core_components as dcc
from dash.dependencies import Input, Output
Expand Down Expand Up @@ -64,9 +62,18 @@ def layout():
id='alignment-dropdown',
className='alignment-select',
options=[
{'label': 'Sample.fasta', 'value': 'dataset1'},
{'label': 'P53.fasta naive', 'value': 'dataset2'},
{'label': 'P53.fasta aligned (ClustalW)', 'value': 'dataset3'},
{
'label': 'Sample.fasta',
'value': 'dataset1'
},
{
'label': 'P53.fasta naive',
'value': 'dataset2'
},
{
'label': 'P53.fasta aligned (ClustalW)',
'value': 'dataset3'
},
],
value='dataset3',
),
Expand All @@ -88,23 +95,26 @@ def layout():
),
html.P(
"""
The Alignment Viewer (MSA) component is used to align multiple genomic
or proteomic sequences from a FASTA or Clustal file. Among its
extensive set of features, the multiple sequence alignment viewer
can display multiple subplots showing gap and conservation info,
alongside industry standard colorscale support and consensus sequence.
No matter what size your alignment is, Alignment Viewer is able to
display your genes or proteins snappily thanks to the underlying WebGL
architecture powering the component. You can quickly scroll through
your long sequence with a slider or a heatmap overview.
The Alignment Viewer (MSA) component is used to align
multiple genomic or proteomic sequences from a FASTA or
Clustal file. Among its extensive set of features,
the multiple sequence alignment viewer can display
multiple subplots showing gap and conservation info,
alongside industry standard colorscale support and
consensus sequence. No matter what size your alignment
is, Alignment Viewer is able to display your genes or
proteins snappily thanks to the underlying WebGL
architecture powering the component. You can quickly
scroll through your long sequence with a slider or a
heatmap overview.
"""
),
html.P(
"""
Note that the AlignmentChart only returns a chart of the sequence,
while AlignmentViewer has integrated controls for colorscale, heatmaps,
and subplots allowing the user to interactively
control their sequences.
Note that the AlignmentChart only returns a chart of
the sequence, while AlignmentViewer has integrated
controls for colorscale, heatmaps, and subplots allowing
the user to interactively control their sequences.
"""
),
html.P(
Expand Down Expand Up @@ -144,23 +154,26 @@ def layout():
),
html.P(
"""
The Alignment Viewer (MSA) component is used to align multiple genomic
or proteomic sequences from a FASTA or Clustal file. Among its
extensive set of features, the multiple sequence alignment viewer
can display multiple subplots showing gap and conservation info,
alongside industry standard colorscale support and consensus sequence.
No matter what size your alignment is, Alignment Viewer is able to
display your genes or proteins snappily thanks to the underlying WebGL
architecture powering the component. You can quickly scroll through
your long sequence with a slider or a heatmap overview.
The Alignment Viewer (MSA) component is used to align
multiple genomic or proteomic sequences from a FASTA or
Clustal file. Among its extensive set of features,
the multiple sequence alignment viewer can display
multiple subplots showing gap and conservation info,
alongside industry standard colorscale support and
consensus sequence. No matter what size your alignment
is, Alignment Viewer is able to display your genes or
proteins snappily thanks to the underlying WebGL
architecture powering the component. You can quickly
scroll through your long sequence with a slider or a
heatmap overview.
"""
),
html.P(
"""
Note that the AlignmentChart only returns a chart of the sequence,
while AlignmentViewer has integrated controls for colorscale, heatmaps,
and subplots allowing the user to interactively
control their sequences.
Note that the AlignmentChart only returns a chart of
the sequence, while AlignmentViewer has integrated
controls for colorscale, heatmaps, and subplots
allowing the user to interactivelycontrol their sequences.
"""
),
html.P(
Expand Down Expand Up @@ -221,13 +234,13 @@ def event_data_select(data):
Output("alignment-events-2", "value"),
[Input("alignment-chart", "eventDatum")]
)
def event_data_select(data):
def event_data_select_2(data):
return str(data)

# Render main chart
@app.callback(
Output('alignment-chart', 'data'),
[Input('alignment-data-store', 'data')]
)
def update_chart(input):
return input
def update_chart(input_data):
return input_data

0 comments on commit 6b58dfc

Please sign in to comment.