biopipen 0.31.2__py3-none-any.whl → 0.31.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 CHANGED
@@ -1 +1 @@
1
- __version__ = "0.31.2"
1
+ __version__ = "0.31.4"
biopipen/ns/plot.py CHANGED
@@ -35,7 +35,7 @@ class VennDiagram(Proc):
35
35
  envs = {
36
36
  "inopts": {"row.names": -1, "header": False},
37
37
  "intype": "raw",
38
- "devpars": {"res": 100, "width": 1000, "height": 1000},
38
+ "devpars": {"res": 100, "width": 800, "height": 600},
39
39
  "args": {},
40
40
  "ggs": None,
41
41
  }
@@ -1,8 +1,6 @@
1
1
  {{ biopipen_dir | joinpaths: "utils", "io.R" | source_r }}
2
2
  {{ biopipen_dir | joinpaths: "utils", "plot.R" | source_r }}
3
3
 
4
- library(dplyr)
5
-
6
4
  infile = {{in.infile | quote}}
7
5
  outfile = {{out.outfile | quote}}
8
6
  inopts = {{envs.inopts | r}}
@@ -18,9 +16,7 @@ if (intype == "raw") {
18
16
  indata = lapply(indata, function(x) unlist(strsplit(x, ",", fixed=TRUE)))
19
17
  } else { # computed
20
18
  elems = rownames(indata)
21
- indata = indata %>%
22
- mutate(across(everything(), function(x) elems[as.logical(x)])) %>%
23
- as.list()
19
+ indata = apply(indata, 2, function(x) elems[as.logical(x)])
24
20
  }
25
21
 
26
22
  plotVenn(
@@ -90,8 +90,8 @@ for (rname in names(mapquery_args$refdata)) {
90
90
  }
91
91
  }
92
92
 
93
- if (refnorm == "auto" && .is_sct(reference)) {
94
- refnorm = "SCTransform"
93
+ if (refnorm == "auto") {
94
+ refnorm = ifelse (.is_sct(reference), "SCTransform", "NormalizeData")
95
95
  }
96
96
  if (refnorm == "SCTransform") {
97
97
  # Check if the reference is SCTransform'ed
@@ -110,7 +110,7 @@ if (refnorm == "SCTransform") {
110
110
  } else if (refnorm == "NormalizeData") {
111
111
  findtransferanchors_args$normalization.method = "LogNormalize"
112
112
  } else {
113
- stop("Unknown normalization method: {refnorm}")
113
+ stop(paste0("Unknown normalization method: ", refnorm))
114
114
  }
115
115
 
116
116
  # Load Seurat object
@@ -169,9 +169,12 @@ immdata = readRDS(immdatafile)
169
169
 
170
170
  merge_data = function(sam) {
171
171
  # Merge the data for one sample from immdata and metadata
172
- out = immdata$data[[sam]] %>%
173
- separate_rows(chain, CDR3.aa, V.name, J.name, sep = ";") %>%
174
- filter(chain == "TRB") %>%
172
+ out = immdata$data[[sam]]
173
+ if ("chain" %in% colnames(out)) {
174
+ out = out %>% separate_rows(chain, CDR3.aa, V.name, J.name, sep = ";") %>%
175
+ filter(chain == "TRB")
176
+ }
177
+ out = out %>%
175
178
  mutate(
176
179
  Sample = sam,
177
180
  locus = "TCRB",
@@ -35,12 +35,11 @@ if (is.null(prefix)) { prefix = "" }
35
35
 
36
36
  get_cdr3aa_df = function() {
37
37
  out = expand_immdata(immdata, cell_id = "Barcode") %>%
38
- mutate(Barcode = glue(paste0(prefix, "{Barcode}"))) %>%
39
- select(Barcode, CDR3.aa, chain)
38
+ mutate(Barcode = glue(paste0(prefix, "{Barcode}")))
40
39
 
41
40
  if (on_multi) {
42
41
  out$CDR3.aa = sub(";", "", out$CDR3.aa)
43
- } else {
42
+ } else if ("chain" %in% colnames(out)) {
44
43
  out = out %>% separate_rows(chain, CDR3.aa, sep = ";") %>%
45
44
  filter(chain == "TRB")
46
45
  }
@@ -170,7 +169,7 @@ prepare_input = function() {
170
169
  sdata = seqdata[[sample]]
171
170
  if (on_multi) {
172
171
  sdata[[cdr3col]] = sub(";", "", sdata[[cdr3col]])
173
- } else {
172
+ } else if ("chain" %in% colnames(sdata)) {
174
173
  sdata = sdata %>% separate_rows(chain, cdr3col, sep = ";") %>%
175
174
  filter(chain == "TRB")
176
175
  }
biopipen/utils/plot.R CHANGED
@@ -10,7 +10,7 @@ plotVenn = function(
10
10
  # Extra ggplot components in string
11
11
  ggs = NULL,
12
12
  # Parameters for device (res, width, height) for `png()`
13
- devpars = list(res=100, width=1000, height=1000),
13
+ devpars = list(res=100, width=800, height=600),
14
14
  # The output file. If NULL, will return the plot object
15
15
  outfile = NULL
16
16
  ) {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: biopipen
3
- Version: 0.31.2
3
+ Version: 0.31.4
4
4
  Summary: Bioinformatics processes/pipelines that can be run from `pipen run`
5
5
  License: MIT
6
6
  Author: pwwang
@@ -18,5 +18,5 @@ Requires-Dist: pipen-board[report] (>=0.16,<0.17)
18
18
  Requires-Dist: pipen-cli-run (>=0.14,<0.15)
19
19
  Requires-Dist: pipen-filters (>=0.14,<0.15)
20
20
  Requires-Dist: pipen-poplog (>=0.2.0,<0.3.0)
21
- Requires-Dist: pipen-runinfo (>=0.7,<0.8) ; extra == "runinfo"
21
+ Requires-Dist: pipen-runinfo (>=0.8,<0.9) ; extra == "runinfo"
22
22
  Requires-Dist: pipen-verbose (>=0.12,<0.13)
@@ -1,4 +1,4 @@
1
- biopipen/__init__.py,sha256=Me03yXizCG2hXimVttvq6I-XoZSxSRE2J-NrK4My4cU,23
1
+ biopipen/__init__.py,sha256=ZRJesu3_rpj9DcGHrsN5Zl7GDxuBTLAkcDxRMvMJE5c,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=7IXvviRicZ2D1h6x3BVgbLJ96nsh-ikvZ0sVlQepqFE,1944
@@ -18,7 +18,7 @@ biopipen/ns/delim.py,sha256=fejsh4KW1TG5oMZzAC238LvQhBz7brXkfl3BHfnLK5M,5612
18
18
  biopipen/ns/gene.py,sha256=rty-Bjcf87v2vyb9X4kRvfrQ6XQYXgN4f2ftFO0nWA8,3888
19
19
  biopipen/ns/gsea.py,sha256=EsNRAPYsagaV2KYgr4Jv0KCnZGqayM209v4yOGGTIOI,7423
20
20
  biopipen/ns/misc.py,sha256=qXcm0RdR6W-xpYGgQn3v7JBeYRWwVm5gtgSj2tdVxx4,2935
21
- biopipen/ns/plot.py,sha256=_dGLKpyHiJqLIIQu5tqCk8H5BkgGBh_qRUZHkjnOgtE,18080
21
+ biopipen/ns/plot.py,sha256=XzLq0A8qCIQRbxhPEdWhEfbRZ8g3e4KriVz0RP8enNY,18078
22
22
  biopipen/ns/regulatory.py,sha256=qvc9QrwgwCI_lg0DQ2QOZbAhC8BAD1qnQXSGtAGlVcY,11750
23
23
  biopipen/ns/rnaseq.py,sha256=bKAa6friFWof4yDTWZQahm1MS-lrdetO1GqDKdfxXYc,7708
24
24
  biopipen/ns/scrna.py,sha256=fXP_h7gchcuk_Jwos0IgY_P8ON6Q995OgKHgdrxfvAY,112868
@@ -120,7 +120,7 @@ biopipen/scripts/plot/Manhattan.R,sha256=7lJwCX1d0zUpJVhVcmQ35ZtQELzkaDNnBTNHHc3
120
120
  biopipen/scripts/plot/QQPlot.R,sha256=Xil19FJ7jbsxo1yU7dBhhZo2_95Gz6gpTyuv9F0RDNM,4115
121
121
  biopipen/scripts/plot/ROC.R,sha256=cjmmYRQycYisqRmlkZE9nbmwfo-04wdJKVmlOsiEFAM,2451
122
122
  biopipen/scripts/plot/Scatter.R,sha256=fg4H5rgdr6IePTMAIysiElnZme0vCh1T0wrwH2Q9xkM,2840
123
- biopipen/scripts/plot/VennDiagram.R,sha256=IQG4OLXdORbmKMWca7dtSDX_RdH8FCrpDfi3eMae7G8,773
123
+ biopipen/scripts/plot/VennDiagram.R,sha256=Am9umSGr2QxZc2MIMGMBhpoEqta3qt_ItF-9_Y53SXE,704
124
124
  biopipen/scripts/regulatory/MotifAffinityTest.R,sha256=1sR3sWRZbxDeFO290LcpzZglzOLc13SSvibDON96PCg,8852
125
125
  biopipen/scripts/regulatory/MotifAffinityTest_AtSNP.R,sha256=SAyTm2-6g5qVJFRrLxEY0QJrLWTkwDi_J_9J7HhtTN8,4438
126
126
  biopipen/scripts/regulatory/MotifAffinityTest_MotifBreakR.R,sha256=wCK4tLx1iWh_OwW7ZvLTCjTGWCIfVqw-lYC0-JqIPqg,3338
@@ -164,7 +164,7 @@ biopipen/scripts/scrna/SeuratClustering-common.R,sha256=JX4Cn2FC6GOcBqaVyGDD3MM5
164
164
  biopipen/scripts/scrna/SeuratClustering.R,sha256=0OKRBQ5rFuupK7c03_sSt2HMwMdMnCYFqTvkRXFKchs,1706
165
165
  biopipen/scripts/scrna/SeuratFilter.R,sha256=BrYK0MLdaTtQvInMaQsmOt7oH_hlks0M1zykkJtg2lM,509
166
166
  biopipen/scripts/scrna/SeuratLoading.R,sha256=ekWKnHIqtQb3kHVQiVymAHXXqiUxs6KKefjZKjaykmk,900
167
- biopipen/scripts/scrna/SeuratMap2Ref.R,sha256=KARt5IVBDYpNhLZ7_j0FEi1u5S8PxU_mB4THH26s7AM,12008
167
+ biopipen/scripts/scrna/SeuratMap2Ref.R,sha256=B0RZ2k1IUKdhe34SjU-8CxvYGj7ub-z7JJaSE0snCok,12040
168
168
  biopipen/scripts/scrna/SeuratMetadataMutater.R,sha256=PMwG0Xvl_EEVKkicfrIi4arEqpY948PkYLkb59kTAXI,1135
169
169
  biopipen/scripts/scrna/SeuratPreparing-common.R,sha256=WuD7lGS17eAUQWSiIdAoV0EIeqS3Tnkkx-7PbP6Q3tc,16279
170
170
  biopipen/scripts/scrna/SeuratPreparing-doublet_detection.R,sha256=TNN2lfFjpnnO0rguMsG38JYCP1nFUhcPLJ1LqGj-Sc8,6674
@@ -202,7 +202,7 @@ biopipen/scripts/tcgamaf/Maf2Vcf.py,sha256=Cxh7fiSNCxWDTfIJqZDOOnaSrw-85S_fH2U-P
202
202
  biopipen/scripts/tcgamaf/MafAddChr.py,sha256=V10HMisl12O3ZfXuRmFNdy5p-3mr43WCvy0GHxSpwfA,494
203
203
  biopipen/scripts/tcgamaf/maf2vcf.pl,sha256=hJKcH-NbgWK6fmK7f3qex7ozJJl-PqCNPXqpwfcHwJg,22707
204
204
  biopipen/scripts/tcr/Attach2Seurat.R,sha256=0KZaBkuPvqOBXq4ZG3pzIIua5HL-161K5dVXRoCysy4,1366
205
- biopipen/scripts/tcr/CDR3AAPhyschem.R,sha256=_eg5Ep-Zt-J-VklYrklDPYAvZTBH_RIxbLTPJDqS4KE,16753
205
+ biopipen/scripts/tcr/CDR3AAPhyschem.R,sha256=ZxHyn4vJF-1PDbnbozovOipET_QZKqeFrKUibRpLgzw,16825
206
206
  biopipen/scripts/tcr/CloneResidency.R,sha256=KAcFB39vTYsk8IEj44s8oSFVhKjpAdJ8hkpKxtdWzRA,21540
207
207
  biopipen/scripts/tcr/CloneSizeQQPlot.R,sha256=hds1C80Q_W40Ikp-BrFfvh_aBf_V61lz-1YAvkDESyk,4569
208
208
  biopipen/scripts/tcr/GIANA/GIANA.py,sha256=0qLhgCWxT8K-4JvORA03CzBPTT5pd4Di5B_DgrHXbFA,47198
@@ -225,7 +225,7 @@ biopipen/scripts/tcr/ImmunarchLoading.R,sha256=Vw2oIza3mDJzg9kuo-w5jvwdivk4AtDA6
225
225
  biopipen/scripts/tcr/ImmunarchSplitIdents.R,sha256=FGCeGV0uSmFU91lKkldUAeV4A2m3hHw5X4GNi8ffGzI,1873
226
226
  biopipen/scripts/tcr/SampleDiversity.R,sha256=oipN4-2nQZe8bYjI0lZ0SvZ7T8GZ_FWkpkobi1cwmWE,2664
227
227
  biopipen/scripts/tcr/TCRClusterStats.R,sha256=QhXgfKSh27VHO901hDizyGYTXMYFJxW22StchQUq3uE,12906
228
- biopipen/scripts/tcr/TCRClustering.R,sha256=J3cBAK3PRN54iQHMISVSbldhVDWPIWfeO8Vrjr9qwyE,9571
228
+ biopipen/scripts/tcr/TCRClustering.R,sha256=MRCaFbgMhhW9uimVBrE1Q5VqqxQpnKv5W2ILWmHdkU8,9593
229
229
  biopipen/scripts/tcr/TCRDock.py,sha256=jjzxMWp-hs0LDtA1mVbiWDvUieSO7X-F9yeKGy1LSTM,3026
230
230
  biopipen/scripts/tcr/TESSA.R,sha256=XFC2P_e_Gm83jG5EjzVIW6KcyG5IieAaK7sXDA3_oZ0,6864
231
231
  biopipen/scripts/tcr/TESSA_source/Atchley_factors.csv,sha256=SumqDOqP67P54uM7Cuc5_O_rySTWcGo7eX3psMSPX9s,763
@@ -274,12 +274,12 @@ biopipen/utils/io.R,sha256=jIYdqdn0iRWfQYAZa5CjXi3fikqmYvPPLIXhobRe8sw,537
274
274
  biopipen/utils/misc.R,sha256=qTninxi9XAM_3QJqwThflGA-j7p1aKpQ9Pjmix6Iy3U,12059
275
275
  biopipen/utils/misc.py,sha256=nkQHa3GMc7Ce0N2GKmucbRc8BMXgZ2yr_SPbq9RYA4s,3740
276
276
  biopipen/utils/mutate_helpers.R,sha256=Bqy6Oi4rrPEPJw0Jq32bVAwwBfZv7JJL9jFcK5x-cek,17649
277
- biopipen/utils/plot.R,sha256=pzl37PomNeUZPxohHZ2w93j3Fc4T0Qrc62FF-9MTKdw,4417
277
+ biopipen/utils/plot.R,sha256=fmWnCv6EpOU8NvHFvShbdPRqB659vHcDlJAqWIXM8XQ,4415
278
278
  biopipen/utils/reference.py,sha256=oi5evicLwHxF0KAIPNZohBeHJLJQNWFJH0cr2y5pgcg,5873
279
279
  biopipen/utils/rnaseq.R,sha256=Ro2B2dG-Z2oVaT5tkwp9RHBz4dp_RF-JcizlM5GYXFs,1298
280
280
  biopipen/utils/single_cell.R,sha256=pJjYP8bIZpNAtTQ32rOXhZxaM1Y-6D-xUcK3pql9tbk,4316
281
281
  biopipen/utils/vcf.py,sha256=ajXs0M_QghEctlvUlSRjWQIABVF02wPdYd-0LP4mIsU,9377
282
- biopipen-0.31.2.dist-info/METADATA,sha256=3C7vpZEWG0ySF1H298xWctBRl77fl7NZluVa7Q65jUc,882
283
- biopipen-0.31.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
284
- biopipen-0.31.2.dist-info/entry_points.txt,sha256=69SbeMaF47Z2DS40yo-qDyoBKmMmumrNnsjEZMOioCE,625
285
- biopipen-0.31.2.dist-info/RECORD,,
282
+ biopipen-0.31.4.dist-info/METADATA,sha256=-ZA3ibCLubauXddI46VdKgbKvzBKiLR8sk0HWQArEZo,882
283
+ biopipen-0.31.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
284
+ biopipen-0.31.4.dist-info/entry_points.txt,sha256=69SbeMaF47Z2DS40yo-qDyoBKmMmumrNnsjEZMOioCE,625
285
+ biopipen-0.31.4.dist-info/RECORD,,