biopipen 0.31.1__py3-none-any.whl → 0.31.2__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.2"
@@ -170,6 +170,8 @@ immdata = readRDS(immdatafile)
170
170
  merge_data = function(sam) {
171
171
  # Merge the data for one sample from immdata and metadata
172
172
  out = immdata$data[[sam]] %>%
173
+ separate_rows(chain, CDR3.aa, V.name, J.name, sep = ";") %>%
174
+ filter(chain == "TRB") %>%
173
175
  mutate(
174
176
  Sample = sam,
175
177
  locus = "TCRB",
@@ -34,9 +34,17 @@ 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") %>%
37
+ out = expand_immdata(immdata, cell_id = "Barcode") %>%
38
38
  mutate(Barcode = glue(paste0(prefix, "{Barcode}"))) %>%
39
- select(Barcode, CDR3.aa)
39
+ select(Barcode, CDR3.aa, chain)
40
+
41
+ if (on_multi) {
42
+ out$CDR3.aa = sub(";", "", out$CDR3.aa)
43
+ } else {
44
+ out = out %>% separate_rows(chain, CDR3.aa, sep = ";") %>%
45
+ filter(chain == "TRB")
46
+ }
47
+ out %>% select(Barcode, CDR3.aa)
40
48
  }
41
49
  cdr3aa_df = get_cdr3aa_df()
42
50
 
@@ -159,12 +167,14 @@ prepare_input = function() {
159
167
  # cdr3col = if (!on_multi) "cdr3" else "CDR3.aa"
160
168
  cdr3col = "CDR3.aa"
161
169
  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
- )
170
+ sdata = seqdata[[sample]]
171
+ if (on_multi) {
172
+ sdata[[cdr3col]] = sub(";", "", sdata[[cdr3col]])
173
+ } else {
174
+ sdata = sdata %>% separate_rows(chain, cdr3col, sep = ";") %>%
175
+ filter(chain == "TRB")
176
+ }
177
+ cdr3 = union(cdr3, unique(sdata[[cdr3col]]))
168
178
  }
169
179
  cdr3 = unique(cdr3)
170
180
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: biopipen
3
- Version: 0.31.1
3
+ Version: 0.31.2
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=Me03yXizCG2hXimVttvq6I-XoZSxSRE2J-NrK4My4cU,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=_eg5Ep-Zt-J-VklYrklDPYAvZTBH_RIxbLTPJDqS4KE,16753
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=J3cBAK3PRN54iQHMISVSbldhVDWPIWfeO8Vrjr9qwyE,9571
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.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,,