Skip to content

Commit

Permalink
autopep8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NickAkhmetov committed Aug 9, 2023
1 parent 60998fc commit a7a021c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/portal_visualization/builders/anndata_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ def get_conf_cells(self, marker=None):
# print('TODO - Encoding Version 0.2.0 support')

cell_set_obs.extend(RNA_SEQ_ANNDATA_FACTOR_PATHS)
cell_set_obs_names.extend([f'Marker Gene {x}' for x in range(len(RNA_SEQ_ANNDATA_FACTORS))])
cell_set_obs_names.extend(
[f'Marker Gene {x}' for x in range(len(RNA_SEQ_ANNDATA_FACTORS))])
dataset = vc.add_dataset(name=self._uuid).add_object(AnnDataWrapper(
adata_url=adata_url,
obs_feature_matrix_path="X",
Expand Down
3 changes: 0 additions & 3 deletions src/portal_visualization/builders/scatterplot_builders.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from vitessce import (
VitessceConfig,
Component as cm,
DataType as dt,
FileType as ft,
)


Expand Down Expand Up @@ -69,7 +67,6 @@ def __init__(self, entity, groups_token, assets_endpoint, **kwargs):
{
"rel_path": f"{SCRNA_SEQ_DIR}.cells.json",
"file_type": "obsEmbedding.cells.json", # ft.OBS_EMBEDDING_CELLS_JSON

"coordination_values": {
"obsType": "cell",
"embeddingType": "UMAP",
Expand Down
9 changes: 8 additions & 1 deletion src/portal_visualization/builders/sprm_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,14 @@ def _setup_view_config_raster_cellsets_expression_segmentation(self, vc, dataset
).set_props(
variablesLabelOverride="antigen", transpose=True)

views = [description, layer_controller, spatial, cell_sets, gene_list, scatterplot, heatmap]
views = [
description,
layer_controller,
spatial,
cell_sets,
gene_list,
scatterplot,
heatmap]

# Adding the obsLabelsType coordination here makes the tooltip not display any information for these factors
# Seemingly due to name collision with obs sets, but removing the obs sets / using an empty list doesn't work
Expand Down
7 changes: 3 additions & 4 deletions src/portal_visualization/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,16 @@ def use_multiple_coordinations(vc, views, coordinationType, values):
# Add the coordinations to the VC
coordinations = vc.add_coordination(*[coordinationType for _ in values])

# Set coordination values
# Set coordination values
for i, value in enumerate(values):
coordinations[i].set_value(value)

scopes = [str(l.c_scope) for l in coordinations]

custom_scope = VitessceConfigCoordinationScope(
c_type=coordinationType, c_scope=scopes)

for v in views:
v.use_coordination(custom_scope)

return vc

return vc

0 comments on commit a7a021c

Please sign in to comment.