Skip to content

Commit 9c3bd8a

Browse files
authored
Merge branch 'master' into fix/mjn-duplicate-nodes
2 parents 304853c + a3d4463 commit 9c3bd8a

5 files changed

Lines changed: 14 additions & 18 deletions

File tree

malariagen_data/anoph/dipclust.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,10 +542,10 @@ def _dipclust_concat_subplots(
542542
if isinstance(figure, go.Figure):
543543
# This is a figure, access the traces within it.
544544
for trace in range(len(figure["data"])):
545-
fig.append_trace(figure["data"][trace], row=i + 1, col=1)
545+
fig.add_trace(figure["data"][trace], row=i + 1, col=1)
546546
else:
547547
# Assume this is a trace, add directly.
548-
fig.append_trace(figure, row=i + 1, col=1)
548+
fig.add_trace(figure, row=i + 1, col=1)
549549

550550
fig.update_xaxes(visible=False)
551551
fig.update_layout(

malariagen_data/anoph/frq_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def plot_frequencies_heatmap(
276276
heatmap_df.set_index(index_col, inplace=True)
277277

278278
# Clean column names.
279-
heatmap_df.columns = heatmap_df.columns.str.lstrip("frq_")
279+
heatmap_df.columns = heatmap_df.columns.str.removeprefix("frq_")
280280

281281
# Deal with width and height.
282282
if width is None:

malariagen_data/anoph/sample_metadata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,11 +1569,11 @@ def plot_sample_location_mapbox(
15691569
# Sort by `color` column by default, which can be overridden via category_orders.
15701570
df_locations = df_samples[location_columns].drop_duplicates().sort_values(color)
15711571

1572-
fig = px.scatter_mapbox(
1572+
fig = px.scatter_map(
15731573
df_locations,
15741574
lat="latitude",
15751575
lon="longitude",
1576-
mapbox_style="open-street-map",
1576+
map_style="open-street-map",
15771577
zoom=zoom,
15781578
color=color,
15791579
category_orders=category_orders,

malariagen_data/plasmodium.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import json
22

3+
import os
34
import dask.array as da
45
import pandas as pd
56
import xarray
@@ -59,7 +60,7 @@ def sample_metadata(self):
5960
One row per sample.
6061
"""
6162
if self._cache_sample_metadata is None:
62-
path = f"{self._path}/{self.CONF['metadata_path']}"
63+
path = os.path.join(self._path, self.CONF["metadata_path"])
6364
with self._fs.open(path) as f:
6465
self._cache_sample_metadata = pd.read_csv(f, sep="\t", na_values="")
6566
return self._cache_sample_metadata
@@ -74,7 +75,7 @@ def _open_variant_calls_zarr(self):
7475
7576
"""
7677
if self._cache_variant_calls_zarr is None:
77-
path = f"{self._path}/{self.CONF['variant_calls_zarr_path']}"
78+
path = os.path.join(self._path, self.CONF["variant_calls_zarr_path"])
7879
store = _init_zarr_store(fs=self._fs, path=path)
7980
self._cache_variant_calls_zarr = zarr.open_consolidated(store=store)
8081
return self._cache_variant_calls_zarr
@@ -204,7 +205,7 @@ def open_genome(self):
204205
205206
"""
206207
if self._cache_genome is None:
207-
path = f"{self._path}/{self.CONF['reference_path']}"
208+
path = os.path.join(self._path, self.CONF["reference_path"])
208209
store = _init_zarr_store(fs=self._fs, path=path)
209210
self._cache_genome = zarr.open_consolidated(store=store)
210211
return self._cache_genome
@@ -316,7 +317,7 @@ def genome_features(self, attributes=("ID", "Parent", "Name")):
316317
try:
317318
df = self._cache_genome_features[attributes]
318319
except KeyError:
319-
path = f"{self._path}/{self.CONF['annotations_path']}"
320+
path = os.path.join(self._path, self.CONF["annotations_path"])
320321
with self._fs.open(path, mode="rb") as f:
321322
df = _read_gff3(f, compression="gzip")
322323
if attributes is not None:

pyproject.toml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,10 @@ readme = "README.md"
66
documentation = "https://malariagen.github.io/malariagen-data-python/latest/"
77
repository = "https://github.com/malariagen/malariagen-data-python"
88
authors = [
9-
"Alistair Miles <alistair.miles@sanger.ac.uk>",
10-
"Chris Clarkson <chris.clarkson@sanger.ac.uk>",
11-
"Anastasia Hernandez-Koutoucheva <ah32@sanger.ac.uk>",
12-
"Lee Hart <lee.hart@sanger.ac.uk>",
13-
"Kathryn Murie <km22@sanger.ac.uk>",
14-
"Nace Kranjc <n.kranjc@imperial.ac.uk>",
15-
"Kelly Bennett <kb25@sanger.ac.uk>",
16-
"Jon Brenas <jb52@sanger.ac.uk>",
17-
"Sanjay Nagi <sanjay.nagi@lstmed.ac.uk>",
9+
"Chris Clarkson <Chris.Clarkson@lstmed.ac.uk>",
10+
"Anastasia Hernandez-Koutoucheva <Anastasia.Hernandez-Koutoucheva@lstmed.ac.uk>",
11+
"Kelly Bennett <Kelly.Bennett@lstmed.ac.uk>",
12+
"Jon Brenas <Jon.Brenas@lstmed.ac.uk>",
1813
"Tristan Dennis <Tristan.Dennis@lstmed.ac.uk>",
1914
]
2015
license = "MIT"

0 commit comments

Comments
 (0)