From 6b58dfcd306c43c879867c4ec4250cdeddbb6d08 Mon Sep 17 00:00:00 2001 From: "pierre-francois.duc" Date: Tue, 22 Jan 2019 14:50:35 +0100 Subject: [PATCH] Fix pylint and flake8 errors in app_alignment_viewer.py --- assets/alignment-styles.css | 1 + tests/dash/app_alignment_viewer.py | 81 +++++++++++++++++------------- 2 files changed, 48 insertions(+), 34 deletions(-) diff --git a/assets/alignment-styles.css b/assets/alignment-styles.css index 2615a5bd5..0b937fe01 100644 --- a/assets/alignment-styles.css +++ b/assets/alignment-styles.css @@ -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 { diff --git a/tests/dash/app_alignment_viewer.py b/tests/dash/app_alignment_viewer.py index 0e915427f..000541ad8 100644 --- a/tests/dash/app_alignment_viewer.py +++ b/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 @@ -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', ), @@ -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( @@ -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( @@ -221,7 +234,7 @@ 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 @@ -229,5 +242,5 @@ def event_data_select(data): Output('alignment-chart', 'data'), [Input('alignment-data-store', 'data')] ) - def update_chart(input): - return input + def update_chart(input_data): + return input_data