Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,14 @@ exts_list = [
'checksums': ['eec0037cdd3d7553e6d72435a4379bede64be17c6712f149e485169638154d2b'],
}),
(name, version, {
'patches': ['UMI-tools-1.1.4_fix_pandas_warning.patch'],
'source_tmpl': '%(version)s.tar.gz',
'source_urls': ['https://github.com/CGATOxford/UMI-tools/archive/'],
'checksums': ['945c4c98e2007369c301a7a009c6f9deb0fda74b0117cd14e14bd134164a4ff6'],
'checksums': [
{'1.1.4.tar.gz': '945c4c98e2007369c301a7a009c6f9deb0fda74b0117cd14e14bd134164a4ff6'},
{'UMI-tools-1.1.4_fix_pandas_warning.patch':
'6ed8f436b50b316a795b09cb95bb9e4f29bebdedf8d2620a84d48d73a172cec1'},
],
}),
]

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Backport https://github.com/CGATOxford/UMI-tools/pull/628 from UMI-tools 1.1.6
See https://github.com/CGATOxford/UMI-tools/issues/615

From d4bf10ced10e9d7b34523fd1de71c0fe8b2c09e4 Mon Sep 17 00:00:00 2001
From: Tom Smith <[email protected]>
Date: Mon, 4 Mar 2024 13:28:11 +0000
Subject: [PATCH] resolves pandas aggregation warnings

---
umi_tools/dedup.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/umi_tools/dedup.py b/umi_tools/dedup.py
index a518fc6..2b8e5ee 100644
--- a/umi_tools/dedup.py
+++ b/umi_tools/dedup.py
@@ -167,7 +167,7 @@ def aggregateStatsDF(stats_df):

grouped = stats_df.groupby("UMI")

- agg_dict = {'counts': [np.median, len, np.sum]}
+ agg_dict = {'counts': ['median', len, 'sum']}
agg_df = grouped.agg(agg_dict)

agg_df.columns = ['median_counts', 'times_observed', 'total_counts']
@@ -444,8 +444,10 @@ def tallyCounts(binned_cluster, max_edit_distance):
columns=["unique", "unique_null", options.method,
"%s_null" % options.method, "edit_distance"])

+ edit_distance_df['edit_distance'] = edit_distance_df['edit_distance'].astype(str)
+
# TS - set lowest bin (-1) to "Single_UMI"
- edit_distance_df['edit_distance'][0] = "Single_UMI"
+ edit_distance_df.loc[0, 'edit_distance'] = "Single_UMI"

edit_distance_df.to_csv(options.stats + "_edit_distance.tsv",
index=False, sep="\t")
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,14 @@ exts_list = [
'checksums': ['eec0037cdd3d7553e6d72435a4379bede64be17c6712f149e485169638154d2b'],
}),
(name, version, {
'patches': ['UMI-tools-1.1.4_fix_pandas_warning.patch'],
'source_tmpl': '%(version)s.tar.gz',
'source_urls': ['https://github.com/CGATOxford/UMI-tools/archive/'],
'checksums': ['2a87b75364ebe3e6ccf467d3b6d0501c458a48f3e6c8ab8b7c4dfb3fd7627fab'],
'checksums': [
{'1.1.5.tar.gz': '2a87b75364ebe3e6ccf467d3b6d0501c458a48f3e6c8ab8b7c4dfb3fd7627fab'},
{'UMI-tools-1.1.4_fix_pandas_warning.patch':
'6ed8f436b50b316a795b09cb95bb9e4f29bebdedf8d2620a84d48d73a172cec1'},
],
}),
]

Expand Down