biopipen 0.25.2__py3-none-any.whl → 0.25.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of biopipen might be problematic. Click here for more details.
- biopipen/__init__.py +1 -1
- biopipen/scripts/scrna/CellTypeAnnotation-celltypist.R +6 -4
- biopipen/scripts/scrna/CellsDistribution.R +4 -0
- biopipen/scripts/tcr/Immunarch.R +1 -0
- biopipen/utils/single_cell.R +3 -2
- {biopipen-0.25.2.dist-info → biopipen-0.25.4.dist-info}/METADATA +2 -2
- {biopipen-0.25.2.dist-info → biopipen-0.25.4.dist-info}/RECORD +9 -9
- {biopipen-0.25.2.dist-info → biopipen-0.25.4.dist-info}/WHEEL +0 -0
- {biopipen-0.25.2.dist-info → biopipen-0.25.4.dist-info}/entry_points.txt +0 -0
biopipen/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.25.
|
|
1
|
+
__version__ = "0.25.4"
|
|
@@ -189,8 +189,7 @@ if (outtype == "h5ad") {
|
|
|
189
189
|
sobj,
|
|
190
190
|
celltypist_out[
|
|
191
191
|
rownames(sobj@meta.data),
|
|
192
|
-
|
|
193
|
-
,
|
|
192
|
+
setdiff(colnames(celltypist_out), colnames(sobj@meta.data)),
|
|
194
193
|
drop = FALSE
|
|
195
194
|
]
|
|
196
195
|
)
|
|
@@ -217,16 +216,19 @@ if (outtype == "h5ad") {
|
|
|
217
216
|
summarise(seurat_clusters = first(seurat_clusters), .groups = "drop") %>%
|
|
218
217
|
mutate(seurat_clusters = make.unique(seurat_clusters))
|
|
219
218
|
cluster_map <- split(cluster_map$seurat_clusters, cluster_map$seurat_clusters_id)
|
|
220
|
-
|
|
219
|
+
if (over_clustering != "seurat_clusters") {
|
|
220
|
+
sobj@meta.data$seurat_clusters <- sobj@meta.data[[over_clustering]]
|
|
221
|
+
}
|
|
221
222
|
Idents(sobj) <- "seurat_clusters"
|
|
222
223
|
cluster_map$object <- sobj
|
|
224
|
+
log_info("Renaming clusters ...")
|
|
223
225
|
sobj <- do_call(RenameIdents, cluster_map)
|
|
224
226
|
sobj@meta.data$seurat_clusters <- Idents(sobj)
|
|
225
|
-
Idents(sobj) <- "seurat_clusters"
|
|
226
227
|
}
|
|
227
228
|
} else if (!is.null(newcol)) {
|
|
228
229
|
sobj@meta.data[[newcol]] <- sobj@meta.data[["predicted_labels"]]
|
|
229
230
|
}
|
|
231
|
+
log_info("Saving Seurat object in RDS ...")
|
|
230
232
|
saveRDS(sobj, outfile)
|
|
231
233
|
}
|
|
232
234
|
} else {
|
|
@@ -25,6 +25,7 @@ cells_n <- {{envs.cells_n | r}} # nolint
|
|
|
25
25
|
subset <- {{envs.subset | r}} # nolint
|
|
26
26
|
descr <- {{envs.descr | r}} # nolint
|
|
27
27
|
devpars <- {{envs.devpars | r}} # nolint
|
|
28
|
+
hm_devpars <- {{envs.hm_devpars | r}} # nolint
|
|
28
29
|
each <- {{envs.each | r}} # nolint
|
|
29
30
|
section <- {{envs.section | r}} # nolint
|
|
30
31
|
overlap <- {{envs.overlap | r}} # nolint
|
|
@@ -60,6 +61,7 @@ expand_cases <- function() {
|
|
|
60
61
|
cells_orderby = cells_orderby,
|
|
61
62
|
cells_n = cells_n,
|
|
62
63
|
devpars = devpars,
|
|
64
|
+
hm_devpars = hm_devpars,
|
|
63
65
|
each = each,
|
|
64
66
|
section = section,
|
|
65
67
|
subset = subset,
|
|
@@ -79,12 +81,14 @@ expand_cases <- function() {
|
|
|
79
81
|
cells_orderby = cells_orderby,
|
|
80
82
|
cells_n = cells_n,
|
|
81
83
|
devpars = devpars,
|
|
84
|
+
hm_devpars = hm_devpars,
|
|
82
85
|
each = each,
|
|
83
86
|
section = section,
|
|
84
87
|
subset = subset,
|
|
85
88
|
descr = descr
|
|
86
89
|
)
|
|
87
90
|
case$devpars <- list_setdefault(case$devpars, devpars)
|
|
91
|
+
case$hm_devpars <- list_setdefault(case$hm_devpars, hm_devpars)
|
|
88
92
|
filled_cases[[name]] <- case
|
|
89
93
|
}
|
|
90
94
|
}
|
biopipen/scripts/tcr/Immunarch.R
CHANGED
|
@@ -57,6 +57,7 @@ rm(meta)
|
|
|
57
57
|
log_info("Mutating data if `envs.mutaters` is provided ...")
|
|
58
58
|
if (!is.null(mutaters) && length(mutaters) > 0) {
|
|
59
59
|
exdata = mutate(exdata, !!!lapply(mutaters, parse_expr))
|
|
60
|
+
immdata = immdata_from_expanded(exdata)
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
n_samples = length(immdata$data)
|
biopipen/utils/single_cell.R
CHANGED
|
@@ -55,8 +55,7 @@ filter_expanded_immdata <- function(exdata, filters, update_clones = FALSE) {
|
|
|
55
55
|
if (length(filters) == 0) {
|
|
56
56
|
return(exdata)
|
|
57
57
|
}
|
|
58
|
-
out <- exdata %>%
|
|
59
|
-
dplyr::filter(!!parse_expr(filters))
|
|
58
|
+
out <- exdata %>% dplyr::filter(!!parse_expr(filters))
|
|
60
59
|
if (update_clones) {
|
|
61
60
|
out <- out %>%
|
|
62
61
|
group_by(Sample, CDR3.aa) %>%
|
|
@@ -101,11 +100,13 @@ immdata_from_expanded <- function(
|
|
|
101
100
|
),
|
|
102
101
|
function(dat) {
|
|
103
102
|
ncells <- nrow(dat)
|
|
103
|
+
dat_cols <- setdiff(colnames(dat), c("Clones", "Proportion", cell_id))
|
|
104
104
|
dat %>% group_by(CDR3.aa) %>%
|
|
105
105
|
summarise(
|
|
106
106
|
Clones = ifelse(update_clones, n(), first(Clones)),
|
|
107
107
|
Proportion = ifelse(update_clones, n() / ncells, first(Proportion)),
|
|
108
108
|
!!sym(cell_id) := paste0(!!sym(cell_id), collapse = ";"),
|
|
109
|
+
!!!parse_exprs(sapply(dat_cols, function(x) paste0('first(`', x, '`)'))),
|
|
109
110
|
.groups = "drop"
|
|
110
111
|
) %>%
|
|
111
112
|
arrange(desc(Clones))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: biopipen
|
|
3
|
-
Version: 0.25.
|
|
3
|
+
Version: 0.25.4
|
|
4
4
|
Summary: Bioinformatics processes/pipelines that can be run from `pipen run`
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: pwwang
|
|
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
16
|
Provides-Extra: runinfo
|
|
17
|
-
Requires-Dist: datar[pandas] (>=0.15.
|
|
17
|
+
Requires-Dist: datar[pandas] (>=0.15.4,<0.16.0)
|
|
18
18
|
Requires-Dist: pipen-board[report] (>=0.14,<0.15)
|
|
19
19
|
Requires-Dist: pipen-cli-run (>=0.12,<0.13)
|
|
20
20
|
Requires-Dist: pipen-filters (>=0.11,<0.12)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
biopipen/__init__.py,sha256=
|
|
1
|
+
biopipen/__init__.py,sha256=ecF8WlGgNuYRj3QRbMJQBVjdpKbSFwlW9naM4NJEUOE,23
|
|
2
2
|
biopipen/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
biopipen/core/config.py,sha256=edK5xnDhM8j27srDzsxubi934NMrglLoKrdcC8qsEPk,1069
|
|
4
4
|
biopipen/core/config.toml,sha256=Rn7Cta7WsMtmQkKGC4h9d5dU_STaIVBgR8UliiGgL6o,1757
|
|
@@ -112,13 +112,13 @@ biopipen/scripts/plot/Heatmap.R,sha256=4v_oRME8ZiwczIlBIp-OP_YPWLAvBKzbHiwNBCZ0X
|
|
|
112
112
|
biopipen/scripts/plot/VennDiagram.R,sha256=GVc-kyHqnXrbXZvy-evcxI1XGtlLSChBiVnMjPywNMA,731
|
|
113
113
|
biopipen/scripts/rnaseq/UnitConversion.R,sha256=9etSQ6ivtlrgSg4mLjViZAl8nUtCxfEROxXvFCpN9sg,1928
|
|
114
114
|
biopipen/scripts/scrna/AnnData2Seurat.R,sha256=16ASr8B7B7tj7hZpwL31v6GASfh8wcBwIDHG-wi5Jec,2534
|
|
115
|
-
biopipen/scripts/scrna/CellTypeAnnotation-celltypist.R,sha256=
|
|
115
|
+
biopipen/scripts/scrna/CellTypeAnnotation-celltypist.R,sha256=Hzqt-I41ThiSGPzqrg5ma4IQbCDnM1ztfTscPqthdfM,9009
|
|
116
116
|
biopipen/scripts/scrna/CellTypeAnnotation-direct.R,sha256=ST7hJo6IY3-lfj1ymFCxxTH4cAsu8CVTcOKpELBeyuo,1855
|
|
117
117
|
biopipen/scripts/scrna/CellTypeAnnotation-hitype.R,sha256=6_DBAlLKcHqaMyWGZWvTd4gFfHymfz9s2XLja8aj1qA,1869
|
|
118
118
|
biopipen/scripts/scrna/CellTypeAnnotation-sccatch.R,sha256=1ejye0hs-EOwzzdP9gFWSLPcF6dOAA6VmNKXEjmS11E,1654
|
|
119
119
|
biopipen/scripts/scrna/CellTypeAnnotation-sctype.R,sha256=1nKRtzhVoJ9y0yMg1sgI6u7czsrk2cN0FvNUCZo8l-o,3878
|
|
120
120
|
biopipen/scripts/scrna/CellTypeAnnotation.R,sha256=OwLM_G4D7TG4HhIJjQxgIQM92X86lsWp9MVyXTTkLSc,618
|
|
121
|
-
biopipen/scripts/scrna/CellsDistribution.R,sha256=
|
|
121
|
+
biopipen/scripts/scrna/CellsDistribution.R,sha256=zoTE0vO5qcMY1PxwGlNi9eY1F50n1XMc8o0AUzdDN68,16768
|
|
122
122
|
biopipen/scripts/scrna/DimPlots.R,sha256=-mXOTMnpPxvR30XLjwcohFfFx7xTqWKKiICwJiD6yEo,1554
|
|
123
123
|
biopipen/scripts/scrna/ExprImpution-alra.R,sha256=w3W1txJcdWg52-SETY2Z0lO7maDNfiMjBYIGN587YW0,843
|
|
124
124
|
biopipen/scripts/scrna/ExprImpution-rmagic.R,sha256=jYIfqZpnvjKJkvItLnemPVtUApHBYQi1_L8rHVbEe1M,735
|
|
@@ -175,7 +175,7 @@ biopipen/scripts/tcr/Immunarch-overlap.R,sha256=GVt-qJPtd6NEe5njAqNStf2AP6pLkv7I
|
|
|
175
175
|
biopipen/scripts/tcr/Immunarch-spectratyping.R,sha256=jm8qI_A6HBgr1RT6-kq13z46_3aXHwz_LbQk4Ggeq9Y,2882
|
|
176
176
|
biopipen/scripts/tcr/Immunarch-tracking.R,sha256=0tiywpGhd3H0REp4xrhOlkWzJM4ntrQjrVesHbEWT40,4374
|
|
177
177
|
biopipen/scripts/tcr/Immunarch-vjjunc.R,sha256=vSVPdRPSlpAfuX4ynA2UjfUC0_61yMAaPieJM-5J4sw,4434
|
|
178
|
-
biopipen/scripts/tcr/Immunarch.R,sha256=
|
|
178
|
+
biopipen/scripts/tcr/Immunarch.R,sha256=SKgdTGCDBJnWMzKInfljJiOlCrQk07ab3EqS2GpgyFE,3081
|
|
179
179
|
biopipen/scripts/tcr/Immunarch2VDJtools.R,sha256=QB9ILGbnsfoWaRANK6ceb14wpSWy8F1V1EdEmfIqiks,706
|
|
180
180
|
biopipen/scripts/tcr/ImmunarchFilter.R,sha256=o25O36FwH_0w6F8DFQ0SfpcwDzlzaGefXqr9ESrvb4k,3974
|
|
181
181
|
biopipen/scripts/tcr/ImmunarchLoading.R,sha256=l_l-gojiCKI_MWgIUe2zG5boVtNipBv4rACRJEcrnFE,5734
|
|
@@ -225,9 +225,9 @@ biopipen/utils/mutate_helpers.R,sha256=Bqy6Oi4rrPEPJw0Jq32bVAwwBfZv7JJL9jFcK5x-c
|
|
|
225
225
|
biopipen/utils/plot.R,sha256=pzl37PomNeUZPxohHZ2w93j3Fc4T0Qrc62FF-9MTKdw,4417
|
|
226
226
|
biopipen/utils/reference.py,sha256=6bPSwQa-GiDfr7xLR9a5T64Ey40y24yn3QfQ5wDFZkU,4420
|
|
227
227
|
biopipen/utils/rnaseq.R,sha256=Ro2B2dG-Z2oVaT5tkwp9RHBz4dp_RF-JcizlM5GYXFs,1298
|
|
228
|
-
biopipen/utils/single_cell.R,sha256=
|
|
228
|
+
biopipen/utils/single_cell.R,sha256=pJjYP8bIZpNAtTQ32rOXhZxaM1Y-6D-xUcK3pql9tbk,4316
|
|
229
229
|
biopipen/utils/vcf.py,sha256=ajXs0M_QghEctlvUlSRjWQIABVF02wPdYd-0LP4mIsU,9377
|
|
230
|
-
biopipen-0.25.
|
|
231
|
-
biopipen-0.25.
|
|
232
|
-
biopipen-0.25.
|
|
233
|
-
biopipen-0.25.
|
|
230
|
+
biopipen-0.25.4.dist-info/METADATA,sha256=gM8icW3uqM9GhZn0A1RNHSopuBteumXJMAKkmnRgUoQ,932
|
|
231
|
+
biopipen-0.25.4.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
232
|
+
biopipen-0.25.4.dist-info/entry_points.txt,sha256=O7K7PHoJi-4tERYpqmryuTvrFNEsptMpqliZzB2oBQQ,577
|
|
233
|
+
biopipen-0.25.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|