Skip to content

Commit

Permalink
fix for #376
Browse files Browse the repository at this point in the history
and also fixing a deprecation warning in timeplots
  • Loading branch information
wdecoster committed Oct 18, 2024
1 parent 5a14ba2 commit 6a9e50b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion nanomath/nanomath.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(self, df):
25,
30,
] # needs 5 elements in current implementation
self.mean_qual = ave_qual(df["quals"].astype("int").to_list())
self.mean_qual = ave_qual(df["quals"].to_list())
self.median_qual = np.median(df["quals"])
self._top5_lengths = get_top_5(
df=df, col="lengths", values=["lengths", "quals"]
Expand Down
2 changes: 1 addition & 1 deletion nanoplot/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.43.1"
__version__ = "1.44.0"
8 changes: 4 additions & 4 deletions nanoplotter/timeplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def add_time_bins(dfs, bin_length=3):
def plot_over_time(dfs, path, title, settings, color="#4CB391"):
num_reads = Plot(path=path + "NumberOfReads_Over_Time.html",
title="Number of reads over time")
s = dfs.loc[:, "lengths"].resample('10T').count()
s = dfs.loc[:, "lengths"].resample('10min').count()

fig = px.scatter(
data_frame=None,
Expand All @@ -228,7 +228,7 @@ def plot_over_time(dfs, path, title, settings, color="#4CB391"):
if "channelIDs" in dfs:
pores_over_time = Plot(path=path + "ActivePores_Over_Time.html",
title="Number of active pores over time")
s = dfs.loc[:, "channelIDs"].resample('10T').nunique()
s = dfs.loc[:, "channelIDs"].resample('10min').nunique()

fig = px.scatter(
data_frame=None,
Expand All @@ -254,7 +254,7 @@ def cumulative_yield(dfs, path, title, color, settings):
cum_yield_gb = Plot(path=path + "CumulativeYieldPlot_Gigabases.html",
title="Cumulative yield")

s = dfs.loc[:, "lengths"].cumsum().resample('10T').max() / 1e9
s = dfs.loc[:, "lengths"].cumsum().resample('10min').max() / 1e9

fig = px.scatter(
x=s.index.total_seconds() / 3600,
Expand All @@ -274,7 +274,7 @@ def cumulative_yield(dfs, path, title, color, settings):
cum_yield_reads = Plot(path=path + "CumulativeYieldPlot_NumberOfReads.html",
title="Cumulative yield")

s = dfs.loc[:, "lengths"].resample('10T').count().cumsum()
s = dfs.loc[:, "lengths"].resample('10min').count().cumsum()

fig = px.scatter(
x=s.index.total_seconds() / 3600,
Expand Down

0 comments on commit 6a9e50b

Please sign in to comment.