biopipen 0.31.1__py3-none-any.whl → 0.31.3__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.1"
1
+ __version__ = "0.31.3"
@@ -169,7 +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]] %>%
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 %>%
173
178
  mutate(
174
179
  Sample = sam,
175
180
  locus = "TCRB",
@@ -34,9 +34,16 @@ if (is.null(prefix)) { prefix = immdata$prefix }
34
34
  if (is.null(prefix)) { prefix = "" }
35
35
 
36
36
  get_cdr3aa_df = function() {
37
- expand_immdata(immdata, cell_id = "Barcode") %>%
38
- mutate(Barcode = glue(paste0(prefix, "{Barcode}"))) %>%
39
- select(Barcode, CDR3.aa)
37
+ out = expand_immdata(immdata, cell_id = "Barcode") %>%
38
+ mutate(Barcode = glue(paste0(prefix, "{Barcode}")))
39
+
40
+ if (on_multi) {
41
+ out$CDR3.aa = sub(";", "", out$CDR3.aa)
42
+ } else if ("chain" %in% colnames(out)) {
43
+ out = out %>% separate_rows(chain, CDR3.aa, sep = ";") %>%
44
+ filter(chain == "TRB")
45
+ }
46
+ out %>% select(Barcode, CDR3.aa)
40
47
  }
41
48
  cdr3aa_df = get_cdr3aa_df()
42
49
 
@@ -159,12 +166,14 @@ prepare_input = function() {
159
166
  # cdr3col = if (!on_multi) "cdr3" else "CDR3.aa"
160
167
  cdr3col = "CDR3.aa"
161
168
  for (sample in names(seqdata)) {
162
- # cdr3 = bind_rows(cdr3, seqdata[[sample]] %>%
163
- # transmute(aminoAcid=CDR3.aa, vMaxResolved=paste0(V.name, "*01"), Sample=sample))
164
- cdr3 = union(
165
- cdr3,
166
- seqdata[[sample]] %>% pull(cdr3col) %>% unique()
167
- )
169
+ sdata = seqdata[[sample]]
170
+ if (on_multi) {
171
+ sdata[[cdr3col]] = sub(";", "", sdata[[cdr3col]])
172
+ } else if ("chain" %in% colnames(sdata)) {
173
+ sdata = sdata %>% separate_rows(chain, cdr3col, sep = ";") %>%
174
+ filter(chain == "TRB")
175
+ }
176
+ cdr3 = union(cdr3, unique(sdata[[cdr3col]]))
168
177
  }
169
178
  cdr3 = unique(cdr3)
170
179
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: biopipen
3
- Version: 0.31.1
3
+ Version: 0.31.3
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=PB3hjnlSwoWLBLl2ge7lsrSRubKXRdIanr_Hg2t3ViA,23
1
+ biopipen/__init__.py,sha256=KeJnUdf2sotD3eMjgcCRocii5SSlhH5-B6DNBS_0gO8,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
@@ -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=3fWmoTwxVHM3CNnwxdKxy6-7Jul1UltoN4ic39aGTH0,16649
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=LOdq6NjKcRydGSSoYehILgH4vPCeHIbVpSEYev05578,9278
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
@@ -279,7 +279,7 @@ biopipen/utils/reference.py,sha256=oi5evicLwHxF0KAIPNZohBeHJLJQNWFJH0cr2y5pgcg,5
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.1.dist-info/METADATA,sha256=uPOVUaGxNgT5ZJwJWBDXqmnxaBUxaMvyErjqFCRsV60,882
283
- biopipen-0.31.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
284
- biopipen-0.31.1.dist-info/entry_points.txt,sha256=69SbeMaF47Z2DS40yo-qDyoBKmMmumrNnsjEZMOioCE,625
285
- biopipen-0.31.1.dist-info/RECORD,,
282
+ biopipen-0.31.3.dist-info/METADATA,sha256=8EHJ3ymJf16BFc_fq11-5SnzC3XwuJw67fXEpe2vYlM,882
283
+ biopipen-0.31.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
284
+ biopipen-0.31.3.dist-info/entry_points.txt,sha256=69SbeMaF47Z2DS40yo-qDyoBKmMmumrNnsjEZMOioCE,625
285
+ biopipen-0.31.3.dist-info/RECORD,,