biopipen 0.34.4__py3-none-any.whl → 0.34.6__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.
biopipen/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.34.4"
1
+ __version__ = "0.34.6"
biopipen/ns/tcr.py CHANGED
@@ -1682,6 +1682,10 @@ class ScRepLoading(Proc):
1682
1682
  type (choice): The type of the data to load.
1683
1683
  - TCR: T cell receptor data
1684
1684
  - BCR: B cell receptor data
1685
+ - auto: Automatically detect the type from the metadata.
1686
+ If `auto` is selected, the type will be determined by the presence of
1687
+ `TCRData` or `BCRData` columns in the metadata. If both columns are
1688
+ present, `TCR` will be selected by default.
1685
1689
  combineTCR (type=json): The extra arguments for `scRepertoire::combineTCR`
1686
1690
  function.
1687
1691
  See also <https://www.borch.dev/uploads/screpertoire/reference/combinetcr>
@@ -1721,13 +1725,12 @@ class ScRepLoading(Proc):
1721
1725
  output = "outfile:file:{{in.metafile | stem}}.scRep.qs"
1722
1726
  lang = config.lang.rscript
1723
1727
  envs = {
1724
- "type": "TCR", # or BCR
1728
+ "type": "auto", # or TCR/BCR
1725
1729
  "combineTCR": {"samples": True},
1726
1730
  "combineBCR": {"samples": True},
1727
1731
  "exclude": ["BCRData", "TCRData", "RNAData"],
1728
1732
  "format": None,
1729
1733
  "tmpdir": config.path.tmpdir,
1730
-
1731
1734
  }
1732
1735
  script = "file://../scripts/tcr/ScRepLoading.R"
1733
1736
 
@@ -1750,7 +1753,7 @@ class ScRepCombiningExpression(Proc):
1750
1753
  Output:
1751
1754
  outfile: The `Seurat` object with the TCR/BCR data combined
1752
1755
  In addition to the meta columns added by
1753
- `scRepertoire::combineExpression()`, a new column `TCR_Presence` will be
1756
+ `scRepertoire::combineExpression()`, a new column `VDJ_Presence` will be
1754
1757
  added to the metadata. It indicates whether the cell has a TCR/BCR
1755
1758
  sequence or not. The value is `TRUE` if the cell has a TCR/BCR sequence,
1756
1759
  and `FALSE` otherwise.
@@ -111,7 +111,7 @@ if (file.exists(celltypist_outfile) &&
111
111
  command <- paste(command, "-v")
112
112
  }
113
113
  log$info("Running celltypist:")
114
- log$debug("- {command}")
114
+ print("- {command}")
115
115
  rc <- system(command)
116
116
  if (rc != 0) {
117
117
  stop("Failed to run celltypist. Check the job.stderr file to see the error message.")
@@ -148,7 +148,7 @@ do_one_features <- function(name) {
148
148
  if (!is.null(case$comparisons)) {
149
149
  default_descr <- paste0(
150
150
  default_descr,
151
- "Statistical comparisons were performed between groups using '{case$pairwise_method %||% 'wilcox.test'}' method."
151
+ glue("Statistical comparisons were performed between groups using \"{case$pairwise_method %||% 'wilcox.test'}\" method.")
152
152
  )
153
153
  }
154
154
  reporter$add2(
@@ -47,7 +47,7 @@ do_one_stats <- function(name) {
47
47
  if (!is.null(case$comparisons)) {
48
48
  default_descr <- paste0(
49
49
  default_descr,
50
- "Statistical comparisons were performed between groups using '{case$pairwise_method %||% 'wilcox.test'}' method."
50
+ glue("Statistical comparisons were performed between groups using \"{case$pairwise_method %||% 'wilcox.test'}\" method.")
51
51
  )
52
52
  }
53
53
  if (save_data) {
@@ -34,7 +34,7 @@ obj <- combineExpression(
34
34
  cloneSize = unlist(cloneSize),
35
35
  addLabel = addLabel
36
36
  )
37
- obj$TCR_Presence <- !is.na(obj$CTaa)
37
+ obj$VDJ_Presence <- !is.na(obj$CTaa)
38
38
 
39
39
  log$info("Saving combined object ...")
40
40
  save_obj(obj, outfile)
@@ -21,6 +21,18 @@ log <- get_logger()
21
21
 
22
22
  log$info("Loading metadata ...")
23
23
  metadata <- read.table(metafile, header = TRUE, sep = "\t", row.names = NULL, check.names = FALSE)
24
+ if (type == "AUTO") {
25
+ if ("TCRData" %in% colnames(metadata) && "BCRData" %in% colnames(metadata)) {
26
+ log$warn("Both TCRData and BCRData columns found in metadata. Defaulting to TCR.")
27
+ type <- "TCR"
28
+ } else if ("TCRData" %in% colnames(metadata)) {
29
+ type <- "TCR"
30
+ } else if ("BCRData" %in% colnames(metadata)) {
31
+ type <- "BCR"
32
+ } else {
33
+ stop("Error: Neither TCRData nor BCRData column found in metadata.")
34
+ }
35
+ }
24
36
 
25
37
  data_column <- ifelse(type == "TCR", "TCRData", "BCRData")
26
38
  combine_fn <- ifelse(type == "TCR", combineTCR, combineBCR)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: biopipen
3
- Version: 0.34.4
3
+ Version: 0.34.6
4
4
  Summary: Bioinformatics processes/pipelines that can be run from `pipen run`
5
5
  License: MIT
6
6
  Author: pwwang
@@ -1,4 +1,4 @@
1
- biopipen/__init__.py,sha256=ABU6VLs8eGZmSsX5g58N78lvccWAQvf1yHxS1ESlkG4,23
1
+ biopipen/__init__.py,sha256=QHGuacl6zpfoE0OOXgLhITO4iY3VuSxXyJ6Kvvrpg-E,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=lZV_vbYWk6uqm19ZWJcsZCcSNqAdIfN2fOfamzxZpg4,2148
@@ -27,7 +27,7 @@ biopipen/ns/scrna_metabolic_landscape.py,sha256=EwLMrsj_pTqvyAgtHLoishjQxCg_j8n5
27
27
  biopipen/ns/snp.py,sha256=iXWrw7Lmhf4_ct57HGT7JGTClCXUD4sZ2FzOgsC2pTg,28123
28
28
  biopipen/ns/stats.py,sha256=DlPyK5Vsg6ZEkV9SDS3aAw21eXzvOHgqeZDkXPhg7go,20509
29
29
  biopipen/ns/tcgamaf.py,sha256=AFbUJIxiMSvsVY3RcHgjRFuMnNh2DG3Mr5slLNEyz6o,1455
30
- biopipen/ns/tcr.py,sha256=urx0RomtzhyEtE0V8r3mpNUEMSZCXJ8T6C_I1TSShSY,99373
30
+ biopipen/ns/tcr.py,sha256=XvhbZcVzdJYCjGe61G_EitdRpZyDnyDsaMNPlyH5590,99676
31
31
  biopipen/ns/vcf.py,sha256=zjOH2qiSJsHACLmBqV-Tew-mn-peZgvYLAWjTLh7uTI,23823
32
32
  biopipen/ns/web.py,sha256=8VY4Xsb8UrzS4IkGUX_84GQP1JG6NcTZrV7f9tA1tUI,5458
33
33
  biopipen/reports/bam/CNAClinic.svelte,sha256=D4IxQcgDCPQZMbXog-aZP5iJEQTK2N4i0C60e_iXyfs,213
@@ -142,7 +142,7 @@ biopipen/scripts/scrna/AnnData2Seurat.R,sha256=wc5PDbK9TkuJtoXXxF4W1ODylWhyfKWd3
142
142
  biopipen/scripts/scrna/CCPlotR-patch.R,sha256=KpB8fwacBaWaUNjIidcLUkMShLjS4Gq9UY8LUgIITB0,8369
143
143
  biopipen/scripts/scrna/CellCellCommunication.py,sha256=Wg0uFSo0Yt0wq6UT1TBodyK8GtWQXGv7hXRfM665paU,4354
144
144
  biopipen/scripts/scrna/CellCellCommunicationPlots.R,sha256=4l2EJVd1y94Nfry8fuRL9OSF6AhS8PGBekimpRUu3s8,1919
145
- biopipen/scripts/scrna/CellTypeAnnotation-celltypist.R,sha256=AlNx0vBKqvpQ83yfNUbU4taJ8CUyz63iXzumZcw-PBc,6968
145
+ biopipen/scripts/scrna/CellTypeAnnotation-celltypist.R,sha256=CwYR8WWQMf8r7V2CTalG4kxdKnYMtyhpJBe9zP2sQWA,6964
146
146
  biopipen/scripts/scrna/CellTypeAnnotation-direct.R,sha256=w3CKRUA9NZfC3TFbU8I35L4XJ6MtVaWX-VnV7ScZlBI,2196
147
147
  biopipen/scripts/scrna/CellTypeAnnotation-hitype.R,sha256=vvjhxin4aoA9heecey0dpr6ofirybygY3ApjgtQW89Y,2094
148
148
  biopipen/scripts/scrna/CellTypeAnnotation-sccatch.R,sha256=xxB4K1MzBSNQnDxa44s5ExeU67MbncOBf8lGFr7RvwQ,1870
@@ -167,9 +167,9 @@ biopipen/scripts/scrna/ScVelo.py,sha256=SPUZFgZW1Zhw-bnjJo98RK0vpuNFODQ8Q3eTguNc
167
167
  biopipen/scripts/scrna/Seurat2AnnData.R,sha256=F8g5n2CqX4-KBggxd8ittz8TejYuqqNLMudAHdFt1QM,184
168
168
  biopipen/scripts/scrna/SeuratClusterStats-clustree.R,sha256=K2pRNe3qFjTJY3VL4EQFxoU1Lzp5DUavhcfx6HZk2J8,3954
169
169
  biopipen/scripts/scrna/SeuratClusterStats-dimplots.R,sha256=2YNUxPz1xwND9yrOtBZ75u-wwnmkJUkoUyeBlJvBWKQ,1541
170
- biopipen/scripts/scrna/SeuratClusterStats-features.R,sha256=s_NjsK9YNF-POnzIiavG3RrKd9dihxR9ic8kVOSSZfI,7312
170
+ biopipen/scripts/scrna/SeuratClusterStats-features.R,sha256=G-4wNGGZPCEXup1u9dQwSQ6P-oZVRU_faFMoXfAn6i8,7320
171
171
  biopipen/scripts/scrna/SeuratClusterStats-ngenes.R,sha256=BN8HSl1HoZp8ibESaCVEJPCBWzmu1AFLMgW5ZeZphS0,3077
172
- biopipen/scripts/scrna/SeuratClusterStats-stats.R,sha256=iRzuv6s_jD4vmheTSEsqp1Q8OQanmxvQoCkrnHQ0hfg,3590
172
+ biopipen/scripts/scrna/SeuratClusterStats-stats.R,sha256=xu256GS80jV8kZePn7qFncK58dYSHzaQY3_SDnuxv6E,3598
173
173
  biopipen/scripts/scrna/SeuratClusterStats.R,sha256=ITFqh7p1ggtDXzVxbBEO2TcdOw4dA6oGhL5m7hFAQmU,1838
174
174
  biopipen/scripts/scrna/SeuratClustering.R,sha256=W9HI3Fk3u8MVNycffip8LYRnGg7pW07io7YbtfSk2Pw,979
175
175
  biopipen/scripts/scrna/SeuratFilter.R,sha256=BrYK0MLdaTtQvInMaQsmOt7oH_hlks0M1zykkJtg2lM,509
@@ -234,8 +234,8 @@ biopipen/scripts/tcr/ImmunarchFilter.R,sha256=-en-zi0ZB1JjuqhPlaEAN8YvHrELZNJ1V7
234
234
  biopipen/scripts/tcr/ImmunarchLoading.R,sha256=u3o2aag_7cZ17HA8RxpN58wvrII0Uh-q6FY6dA8MWeQ,5756
235
235
  biopipen/scripts/tcr/ImmunarchSplitIdents.R,sha256=FGCeGV0uSmFU91lKkldUAeV4A2m3hHw5X4GNi8ffGzI,1873
236
236
  biopipen/scripts/tcr/SampleDiversity.R,sha256=oipN4-2nQZe8bYjI0lZ0SvZ7T8GZ_FWkpkobi1cwmWE,2664
237
- biopipen/scripts/tcr/ScRepCombiningExpression.R,sha256=TwnlUWG9isSl7H1VqhFLbWlVSdDwFRVSszqbnShH_E0,1011
238
- biopipen/scripts/tcr/ScRepLoading.R,sha256=FORXYfeTitFr9EtfJrv2A-2GeWG-WKDBBANeeT9ejds,5269
237
+ biopipen/scripts/tcr/ScRepCombiningExpression.R,sha256=sYn6BEUB53Z3pF7IAjYpewGYBvVBwzJqoAOPpcAxzQo,1011
238
+ biopipen/scripts/tcr/ScRepLoading.R,sha256=COdY7KotlYemq4LDJT3d08NlzOzRwrDUTrNUdt4P66A,5732
239
239
  biopipen/scripts/tcr/TCRClusterStats.R,sha256=ns3S95DVDBuhSe1YgTZ1OksbfBgREO2Tnp1d4QzbTw0,13530
240
240
  biopipen/scripts/tcr/TCRClustering.R,sha256=K01qYLNhXrMmPb3TJE504lpRXnfizUNZ5q75nL7dxBg,9152
241
241
  biopipen/scripts/tcr/TCRDock.py,sha256=Oyw27k6vr0pnJ0w1-lrk5b6sZ_IOf6TmbhSxQae-3Q8,3148
@@ -284,7 +284,7 @@ biopipen/utils/misc.py,sha256=pDZ-INWVNqHuXYvcjmu8KqNAigkh2lsHy0BxX44CPvc,4048
284
284
  biopipen/utils/reference.py,sha256=Oc6IlA1giLxymAuI7DO-IQLHQ7-DbsWzOQE86oTDfMU,5955
285
285
  biopipen/utils/reporter.py,sha256=VwLl6xyVDWnGY7NEXyqBlkW8expKJoNQ5iTyZSELf5c,4922
286
286
  biopipen/utils/vcf.py,sha256=MmMbAtLUcKPp02jUdk9TzuET2gWSeoWn7xgoOXFysK0,9393
287
- biopipen-0.34.4.dist-info/METADATA,sha256=j8gy7m8azCVgfmruZ37tT-r_MjdSK5tiJdEOvQ7k62E,975
288
- biopipen-0.34.4.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
289
- biopipen-0.34.4.dist-info/entry_points.txt,sha256=BYqHGBQJxyFDNLYqgH64ycI5PYwnlqwYcCFsMvJgzAU,653
290
- biopipen-0.34.4.dist-info/RECORD,,
287
+ biopipen-0.34.6.dist-info/METADATA,sha256=xjkZ-4jHx3uZyZwVYbfc0vlPlatZ927dHLpxm6y9ys0,975
288
+ biopipen-0.34.6.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
289
+ biopipen-0.34.6.dist-info/entry_points.txt,sha256=BYqHGBQJxyFDNLYqgH64ycI5PYwnlqwYcCFsMvJgzAU,653
290
+ biopipen-0.34.6.dist-info/RECORD,,