biopipen 0.7.1__py3-none-any.whl → 0.8.0__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.

Files changed (60) hide show
  1. biopipen/__init__.py +1 -1
  2. biopipen/core/config.py +0 -5
  3. biopipen/core/config.toml +2 -4
  4. biopipen/core/defaults.py +3 -3
  5. biopipen/core/filters.py +1 -0
  6. biopipen/core/proc.py +1 -3
  7. biopipen/core/testing.py +1 -2
  8. biopipen/ns/bam.py +10 -14
  9. biopipen/ns/bcftools.py +4 -7
  10. biopipen/ns/bed.py +9 -16
  11. biopipen/ns/cnv.py +8 -11
  12. biopipen/ns/cnvkit.py +32 -59
  13. biopipen/ns/cnvkit_pipeline.py +266 -310
  14. biopipen/ns/csv.py +0 -2
  15. biopipen/ns/gene.py +0 -1
  16. biopipen/ns/gsea.py +4 -10
  17. biopipen/ns/misc.py +0 -5
  18. biopipen/ns/plot.py +2 -4
  19. biopipen/ns/rnaseq.py +0 -1
  20. biopipen/ns/scrna.py +76 -119
  21. biopipen/ns/scrna_metabolic_landscape.py +306 -348
  22. biopipen/ns/tcr.py +5 -15
  23. biopipen/ns/vcf.py +52 -34
  24. biopipen/ns/web.py +8 -19
  25. biopipen/reports/bam/CNAClinic.svelte +1 -1
  26. biopipen/reports/bam/CNVpytor.svelte +2 -2
  27. biopipen/reports/bam/ControlFREEC.svelte +1 -1
  28. biopipen/reports/cnv/AneuploidyScore.svelte +2 -2
  29. biopipen/reports/cnv/AneuploidyScoreSummary.svelte +1 -1
  30. biopipen/reports/cnvkit/CNVkitDiagram.svelte +1 -1
  31. biopipen/reports/cnvkit/CNVkitHeatmap.svelte +1 -1
  32. biopipen/reports/cnvkit/CNVkitScatter.svelte +1 -1
  33. biopipen/reports/gsea/FGSEA.svelte +1 -1
  34. biopipen/reports/gsea/GSEA.svelte +2 -2
  35. biopipen/reports/scrna/CellsDistribution.svelte +1 -1
  36. biopipen/reports/scrna/DimPlots.svelte +1 -1
  37. biopipen/reports/scrna/GeneExpressionInvistigation.svelte +1 -1
  38. biopipen/reports/scrna/MarkersFinder.svelte +2 -2
  39. biopipen/reports/scrna/ScFGSEA.svelte +1 -1
  40. biopipen/reports/scrna/SeuratClusterStats.svelte +2 -2
  41. biopipen/reports/scrna/SeuratPreparing.svelte +2 -2
  42. biopipen/reports/scrna_metabolic_landscape/MetabolicFeaturesIntraSubsets.svelte +1 -1
  43. biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayActivity.svelte +1 -1
  44. biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.svelte +1 -1
  45. biopipen/reports/tcr/CloneResidency.svelte +2 -2
  46. biopipen/reports/tcr/Immunarch.svelte +2 -2
  47. biopipen/reports/tcr/SampleDiversity.svelte +2 -2
  48. biopipen/reports/tcr/TCRClusteringStats.svelte +2 -2
  49. biopipen/reports/tcr/VJUsage.svelte +1 -1
  50. biopipen/reports/utils/gsea.liq +1 -1
  51. biopipen/reports/utils/misc.liq +1 -1
  52. biopipen/reports/vcf/TruvariBenchSummary.svelte +1 -1
  53. biopipen/reports/vcf/TruvariConsistency.svelte +2 -2
  54. biopipen/scripts/tcgamaf/maf2vcf.pl +10 -5
  55. biopipen/scripts/vcf/VcfAnno.py +26 -0
  56. biopipen/scripts/vcf/VcfFix_utils.py +3 -2
  57. {biopipen-0.7.1.dist-info → biopipen-0.8.0.dist-info}/METADATA +7 -8
  58. {biopipen-0.7.1.dist-info → biopipen-0.8.0.dist-info}/RECORD +60 -59
  59. {biopipen-0.7.1.dist-info → biopipen-0.8.0.dist-info}/WHEEL +1 -1
  60. {biopipen-0.7.1.dist-info → biopipen-0.8.0.dist-info}/entry_points.txt +0 -0
biopipen/ns/tcr.py CHANGED
@@ -116,7 +116,6 @@ class ImmunarchFilter(Proc):
116
116
  Placeholders like `{Sample}_` can be used to from the meta data
117
117
  metacols: The extra columns to be exported to the group file.
118
118
  """
119
-
120
119
  input = "immdata:file, filterfile:file"
121
120
  output = """
122
121
  outfile:file:{{in.immdata | stem}}.RDS,
@@ -209,7 +208,6 @@ class Immunarch(Proc):
209
208
  If you do want multiple parameter sets for the same K, You can use
210
209
  a float number as the K. For example: `5.1` for K `5`.
211
210
  """
212
-
213
211
  input = "immdata:file"
214
212
  output = "outdir:dir:{{in.immdata | stem}}.immunarch"
215
213
  lang = config.lang.rscript
@@ -341,7 +339,6 @@ class CloneResidency(Proc):
341
339
  sample_groups: How the samples aligned in the report.
342
340
  Useful for cohort with large number of samples.
343
341
  """
344
-
345
342
  input = "immdata:file"
346
343
  output = "outdir:dir:{{in.immdata | stem}}.cloneov"
347
344
  lang = config.lang.rscript
@@ -366,7 +363,6 @@ class Immunarch2VDJtools(Proc):
366
363
  outdir: The output directory containing the vdjtools input for each
367
364
  sample
368
365
  """
369
-
370
366
  input = "immdata:file"
371
367
  output = "outdir:dir:{{in.immdata | stem}}.vdjtools_input"
372
368
  lang = config.lang.rscript
@@ -451,7 +447,6 @@ class Attach2Seurat(Proc):
451
447
  `{Sample}_` to use the meta data from the immunarch object
452
448
  metacols: Which meta columns to attach
453
449
  """
454
-
455
450
  input = "immfile:file, sobjfile:file"
456
451
  output = "outfile:file:{{in.sobjfile | basename}}"
457
452
  lang = config.lang.rscript
@@ -505,12 +500,10 @@ class TCRClustering(Proc):
505
500
  For ClusTCR, they will be passed to `clustcr.Clustering(...)`
506
501
 
507
502
  Requires:
508
- - name: clusTCR
509
- if: {{ proc.envs.tool == 'ClusTCR' }}
510
- check: |
511
- {{ proc.envs.python }} -c "import clustcr"
503
+ clusTCR:
504
+ - if: {{ proc.envs.tool == 'ClusTCR' }}
505
+ - check: {{ proc.envs.python }} -c "import clustcr"
512
506
  """
513
-
514
507
  input = "immfile:file"
515
508
  output = [
516
509
  "immfile:file:{{in.immfile | basename}}",
@@ -549,11 +542,9 @@ class TCRClusteringStats(Proc):
549
542
  the diversities by groups
550
543
 
551
544
  Requires:
552
- - name: r-immunarch
553
- check: |
554
- {{proc.lang}} -e "library(immunarch)"
545
+ r-immunarch:
546
+ - check: {{proc.lang}} -e "library(immunarch)"
555
547
  """
556
-
557
548
  input = "immfile:file"
558
549
  output = "outdir:dir:{{in.immfile | stem}}.tcrclusters_stats"
559
550
  lang = config.lang.rscript
@@ -602,7 +593,6 @@ class CloneSizeQQPlot(Proc):
602
593
  on: The key of the metadata to use for the QQ plot. One/Both of
603
594
  `["Clones", "Proportion"]`
604
595
  """
605
-
606
596
  input = "immdata:file"
607
597
  output = "outdir:dir:{{in.immdata | stem}}.qqplots"
608
598
  lang = config.lang.rscript
biopipen/ns/vcf.py CHANGED
@@ -18,7 +18,6 @@ class VcfLiftOver(Proc):
18
18
  tmpdir: Directory for temporary storage of working files
19
19
  args: Other CLI arguments for `gatk LiftoverVcf`
20
20
  """
21
-
22
21
  input = "invcf:file"
23
22
  output = "outvcf:file:{{in.invcf | basename}}"
24
23
  envs = {
@@ -61,7 +60,6 @@ class VcfFilter(Proc):
61
60
  helper: Some helper code for the filters
62
61
  keep: Keep the variants not passing the filters?
63
62
  """ # noqa: E501
64
-
65
63
  input = "invcf:file"
66
64
  output = "outfile:file:{{in.invcf | basename}}"
67
65
  lang = config.lang.python
@@ -87,7 +85,6 @@ class VcfIndex(Proc):
87
85
  Envs:
88
86
  tabix: Path to tabix
89
87
  """
90
-
91
88
  input = "infile:file"
92
89
  output = """
93
90
  {%- if in.infile.endswith(".gz") %}
@@ -120,11 +117,9 @@ class Vcf2Bed(Proc):
120
117
  outbase: The coordinate base of the base file
121
118
 
122
119
  Requires:
123
- - name: cyvcf2
124
- check: |
125
- {{proc.lang}} -c "import cyvcf2"
120
+ cyvcf2:
121
+ - check: {{proc.lang}} -c "import cyvcf2"
126
122
  """
127
-
128
123
  input = "infile:file"
129
124
  output = "outfile:file:{{in.infile | stem0}}.bed"
130
125
  lang = config.lang.python
@@ -147,10 +142,10 @@ class VcfDownSample(Proc):
147
142
  If `n > 1`, it is the number.
148
143
  If `n <= 1`, it is the fraction.
149
144
  """
150
-
151
145
  input = "infile:file"
152
146
  output = "outfile:file:{{in.infile | basename}}"
153
147
  envs = {"n": 0}
148
+ lang = config.lang.bash
154
149
  script = "file://../scripts/vcf/VcfDownSample.sh"
155
150
 
156
151
 
@@ -290,14 +285,7 @@ class VcfFix(Proc):
290
285
  helpers: raw code the provide some helpers for the fixes
291
286
  The code will automatically dedented if given as a string. A list
292
287
  of strings is also supported and will be joined with newlines.
293
-
294
- Requires:
295
- - name: biopipen
296
- check: |
297
- {{proc.lang}} -c "import biopipen"
298
-
299
288
  """
300
-
301
289
  input = "infile:file"
302
290
  output = "outfile:file:{{in.infile | basename}}"
303
291
  lang = config.lang.python
@@ -305,6 +293,44 @@ class VcfFix(Proc):
305
293
  script = "file://../scripts/vcf/VcfFix.py"
306
294
 
307
295
 
296
+ class VcfAnno(Proc):
297
+ """Annotate a VCF file using vcfanno
298
+
299
+ https://github.com/brentp/vcfanno
300
+
301
+ Input:
302
+ infile: The input VCF file
303
+ conffile: The configuration file for vcfanno or configuration dict
304
+ itself
305
+
306
+ Output:
307
+ outfile: The output VCF file
308
+
309
+ Envs:
310
+ vcfanno: Path to vcfanno
311
+ ncores: Number of cores to use
312
+ conffile: configuration file for vcfanno or configuration dict itself
313
+ This is ignored when `conffile` is given as input
314
+ args: Additional arguments to pass to vcfanno
315
+
316
+ Requires:
317
+ - name: vcfanno
318
+ check: |
319
+ {{proc.envs.vcfanno}} --help
320
+ """
321
+
322
+ input = "infile:file, conffile"
323
+ output = "outfile:file:{{in.infile | stem0}}.{{envs.tool}}.vcf"
324
+ lang = config.lang.python
325
+ envs = {
326
+ "vcfanno": config.exe.vcfanno,
327
+ "ncores": config.misc.ncores,
328
+ "conffile": {},
329
+ "args": {"permissive-overlap": True},
330
+ }
331
+ script = "file://../scripts/vcf/VcfAnno.py"
332
+
333
+
308
334
  class TruvariBench(Proc):
309
335
  """Run `truvari bench` to compare a VCF with CNV calls and
310
336
  base CNV standards
@@ -323,11 +349,9 @@ class TruvariBench(Proc):
323
349
  `<other>`: Ohter `truvari bench` arguments
324
350
 
325
351
  Requires:
326
- - name: truvari
327
- check: |
328
- {{proc.envs.truvari}} version
352
+ truvari:
353
+ - check: {{proc.envs.truvari}} version
329
354
  """
330
-
331
355
  input = "compvcf:file, basevcf:file"
332
356
  output = "outdir:dir:{{in.compvcf | stem0 | append: '.truvari_bench'}}"
333
357
  envs = {
@@ -340,6 +364,7 @@ class TruvariBench(Proc):
340
364
  "typeignore": False,
341
365
  "multimatch": False,
342
366
  }
367
+ lang = config.lang.bash
343
368
  script = "file://../scripts/vcf/TruvariBench.sh"
344
369
 
345
370
 
@@ -363,21 +388,15 @@ class TruvariBenchSummary(Proc):
363
388
  devpars: The parameters to use for the plots.
364
389
 
365
390
  Requires:
366
- - name: r-ggprism
367
- check: |
368
- {{proc.lang}} -e "library(ggprism)"
369
- - name: r-rjson
370
- check: |
371
- {{proc.lang}} -e "library(rjson)"
372
- - name: r-dplyr
373
- check: |
374
- {{proc.lang}} -e "library(dplyr)"
375
- - name: r-ggplot2
376
- check: |
377
- {{proc.lang}} -e "library(ggplot2)"
378
-
391
+ r-ggprism:
392
+ - check: {{proc.lang}} -e "library(ggprism)"
393
+ r-rjson:
394
+ - check: {{proc.lang}} -e "library(rjson)"
395
+ r-dplyr:
396
+ - check: {{proc.lang}} -e "library(dplyr)"
397
+ r-ggplot2:
398
+ - check: {{proc.lang}} -e "library(ggplot2)"
379
399
  """
380
-
381
400
  input = "indirs:files"
382
401
  input_data = lambda ch: [list(ch.iloc[:, 0])]
383
402
  output = "outdir:dir:truvari_bench.summary"
@@ -411,7 +430,6 @@ class TruvariConsistency(Proc):
411
430
  annotations will be added as row annotations.
412
431
  Other options see also `biopipen.ns.plot.Heatmap`.
413
432
  """
414
-
415
433
  input = "vcfs:files"
416
434
  output = (
417
435
  "outdir:dir:"
biopipen/ns/web.py CHANGED
@@ -1,5 +1,4 @@
1
1
  """Get data from the web"""
2
-
3
2
  from ..core.proc import Proc
4
3
  from ..core.config import config
5
4
 
@@ -22,16 +21,11 @@ class Download(Proc):
22
21
  ncores: The number of cores to use
23
22
 
24
23
  Requires:
25
- - name: wget
26
- message: Only required when envs.tool == "wget"
27
- check: |
28
- {{proc.envs.wget}} --version
29
- - name: aria2c
30
- message: Only required when envs.tool == "aria2c"
31
- check: |
32
- {{proc.envs.aria2c}} --version
24
+ wget: Only required when envs.tool == "wget"
25
+ - check: {{proc.envs.wget}} --version
26
+ aria2c: Only required when envs.tool == "aria2c"
27
+ - check: {{proc.envs.aria2c}} --version
33
28
  """
34
-
35
29
  input = "url"
36
30
  output = (
37
31
  "outfile:file:"
@@ -66,16 +60,11 @@ class DownloadList(Proc):
66
60
  ncores: The number of cores to use
67
61
 
68
62
  Requires:
69
- - name: wget
70
- message: Only required when envs.tool == "wget"
71
- check: |
72
- {{proc.envs.wget}} --version
73
- - name: aria2c
74
- message: Only required when envs.tool == "aria2c"
75
- check: |
76
- {{proc.envs.aria2c}} --version
63
+ wget: Only required when envs.tool == "wget"
64
+ - check: {{proc.envs.wget}} --version
65
+ aria2c: Only required when envs.tool == "aria2c"
66
+ - check: {{proc.envs.aria2c}} --version
77
67
  """
78
-
79
68
  input = "urlfile:file"
80
69
  output = "outdir:dir:{{in.urlfile | stem}}.downloaded"
81
70
  lang = config.lang.python
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { Image } from "@@";
2
+ import { Image } from "$lib";
3
3
  </script>
4
4
 
5
5
  {% for gwpng in job.out.outdir | glob: "*/*.png" %}
@@ -1,7 +1,7 @@
1
1
  {% from "utils/misc.liq" import table_of_images -%}
2
2
  <script>
3
- import { Image } from "@@";
4
- import { Tabs, Tab, TabContent } from "carbon-components-svelte";
3
+ import { Image } from "$lib";
4
+ import { Tabs, Tab, TabContent } from "$ccs";
5
5
  </script>
6
6
 
7
7
  {% for case in envs.cases %}
@@ -1,6 +1,6 @@
1
1
  {% from "utils/misc.liq" import report_jobs, table_of_images -%}
2
2
  <script>
3
- import { Image, DataTable } from "@@";
3
+ import { Image, DataTable } from "$lib";
4
4
  </script>
5
5
 
6
6
  {%- macro report_job(job, h=1) -%}
@@ -1,8 +1,8 @@
1
1
  {% from "utils/misc.liq" import report_jobs -%}
2
2
 
3
3
  <script>
4
- import { Image, DataTable } from "@@";
5
- import { Tabs, Tab, TabContent, Tile } from "carbon-components-svelte";
4
+ import { Image, DataTable } from "$lib";
5
+ import { Tabs, Tab, TabContent, Tile } from "$ccs";
6
6
  </script>
7
7
 
8
8
  {%- macro report_job(job, h=1) -%}
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { Image, DataTable } from "@@";
2
+ import { Image, DataTable } from "$lib";
3
3
  </script>
4
4
 
5
5
  <h1>Total number of arm-level gains/losses</h1>
@@ -1,6 +1,6 @@
1
1
  {% from "utils/misc.liq" import report_jobs -%}
2
2
  <script>
3
- import { Image } from "@@";
3
+ import { Image } from "$lib";
4
4
  </script>
5
5
 
6
6
  {%- macro report_job(job, h=1) -%}
@@ -1,6 +1,6 @@
1
1
  {% from "utils/misc.liq" import report_jobs -%}
2
2
  <script>
3
- import { Image } from "@@";
3
+ import { Image } from "$lib";
4
4
  </script>
5
5
 
6
6
  {%- macro report_job(job, h=1) -%}
@@ -1,6 +1,6 @@
1
1
  {% from "utils/misc.liq" import report_jobs -%}
2
2
  <script>
3
- import { Image } from "@@";
3
+ import { Image } from "$lib";
4
4
  </script>
5
5
 
6
6
  {%- macro report_job(job, h=1) -%}
@@ -1,7 +1,7 @@
1
1
  {% from "utils/gsea.liq" import fgsea_report -%}
2
2
  {% from "utils/misc.liq" import report_jobs -%}
3
3
  <script>
4
- import { Image, DataTable } from "@@";
4
+ import { Image, DataTable } from "$lib";
5
5
  </script>
6
6
 
7
7
  {%- macro report_job(job, h=1) -%}
@@ -1,8 +1,8 @@
1
1
  {% from "utils/misc.liq" import report_jobs -%}
2
2
  {% from "utils/gsea.liq" import gsea_report -%}
3
3
  <script>
4
- import { Image, DataTable } from "@@";
5
- import { Tile } from "carbon-components-svelte";
4
+ import { Image, DataTable } from "$lib";
5
+ import { Tile } from "$ccs";
6
6
  </script>
7
7
 
8
8
  {%- macro report_job(job, h=1) -%}
@@ -1,6 +1,6 @@
1
1
  {% from "utils/misc.liq" import report_jobs -%}
2
2
  <script>
3
- import { Image } from "@@";
3
+ import { Image } from "$lib";
4
4
  </script>
5
5
 
6
6
  {%- macro report_job(job, h=1) -%}
@@ -1,6 +1,6 @@
1
1
  {% from "utils/misc.liq" import table_of_images, report_jobs -%}
2
2
  <script>
3
- import { Image } from "@@";
3
+ import { Image } from "$lib";
4
4
  </script>
5
5
 
6
6
  {%- macro report_job(job, h=1) -%}
@@ -2,7 +2,7 @@
2
2
  {% from "utils/misc.liq" import report_jobs, table_of_images -%}
3
3
 
4
4
  <script>
5
- import { Image } from "@@";
5
+ import { Image } from "$lib";
6
6
  </script>
7
7
 
8
8
  {%- macro report_job(job, h=1) -%}
@@ -1,7 +1,7 @@
1
1
  {% from "utils/misc.liq" import report_jobs -%}
2
2
  <script>
3
- import { Image, DataTable } from "@@";
4
- import { Tabs, Tab, TabContent, InlineNotification } from "carbon-components-svelte";
3
+ import { Image, DataTable } from "$lib";
4
+ import { Tabs, Tab, TabContent, InlineNotification } from "$ccs";
5
5
  </script>
6
6
 
7
7
 
@@ -1,7 +1,7 @@
1
1
  {% from "utils/gsea.liq" import fgsea_report -%}
2
2
  {% from "utils/misc.liq" import report_jobs -%}
3
3
  <script>
4
- import { Image, DataTable } from "@@";
4
+ import { Image, DataTable } from "$lib";
5
5
  </script>
6
6
 
7
7
  {%- macro report_job(job, h=1) -%}
@@ -1,8 +1,8 @@
1
1
  {% from "utils/misc.liq" import report_jobs, table_of_images -%}
2
2
  {% from_ os import path %}
3
3
  <script>
4
- import { DataTable, Image } from "@@";
5
- import { Tabs, Tab, TabContent } from "carbon-components-svelte";
4
+ import { DataTable, Image } from "$lib";
5
+ import { Tabs, Tab, TabContent } from "$ccs";
6
6
  </script>
7
7
 
8
8
  {%- macro report_job(job, h=1) -%}
@@ -1,8 +1,8 @@
1
1
  {% from "utils/misc.liq" import report_jobs, table_of_images -%}
2
2
  {% from_ os import path %}
3
3
  <script>
4
- import { Image } from "@@";
5
- import { Tile } from "carbon-components-svelte";
4
+ import { Image } from "$lib";
5
+ import { Tile } from "$ccs";
6
6
  </script>
7
7
 
8
8
  {%- macro report_job(job, h=1) -%}
@@ -2,7 +2,7 @@
2
2
  {% from "utils/gsea.liq" import fgsea_report, gsea_report -%}
3
3
 
4
4
  <script>
5
- import { Image, DataTable } from "@@";
5
+ import { Image, DataTable } from "$lib";
6
6
  </script>
7
7
 
8
8
  {%- macro report_job(job, h=2) -%}
@@ -1,7 +1,7 @@
1
1
  {% from "utils/misc.liq" import report_jobs -%}
2
2
 
3
3
  <script>
4
- import { Image } from "@@";
4
+ import { Image } from "$lib";
5
5
  </script>
6
6
 
7
7
  <h1>Introduction</h1>
@@ -1,7 +1,7 @@
1
1
  {% from "utils/misc.liq" import report_jobs, table_of_images -%}
2
2
 
3
3
  <script>
4
- import { Image } from "@@";
4
+ import { Image } from "$lib";
5
5
  </script>
6
6
 
7
7
  {%- macro report_job(job, h=2) -%}
@@ -1,7 +1,7 @@
1
1
  {% from "utils/misc.liq" import report_jobs, table_of_images -%}
2
2
  <script>
3
- import { Image, DataTable } from "@@";
4
- import { Dropdown } from "carbon-components-svelte";
3
+ import { Image, DataTable } from "$lib";
4
+ import { Dropdown } from "$ccs";
5
5
 
6
6
  let count_sample;
7
7
 
@@ -1,7 +1,7 @@
1
1
  {% from "utils/misc.liq" import report_jobs, table_of_images -%}
2
2
  <script>
3
- import { Image } from "@@";
4
- import { Tabs, Tab, TabContent, Tile, UnorderedList, p } from "carbon-components-svelte";
3
+ import { Image } from "$lib";
4
+ import { Tabs, Tab, TabContent, Tile, UnorderedList, p } from "$ccs";
5
5
  </script>
6
6
 
7
7
  {%- macro report_job(job, h=1) -%}
@@ -1,7 +1,7 @@
1
1
  {% from "utils/misc.liq" import report_jobs, table_of_images -%}
2
2
  <script>
3
- import { Image } from "@@";
4
- import { Tile } from "carbon-components-svelte";
3
+ import { Image } from "$lib";
4
+ import { Tile } from "$ccs";
5
5
  </script>
6
6
 
7
7
 
@@ -1,7 +1,7 @@
1
1
  {% from "utils/misc.liq" import report_jobs -%}
2
2
  <script>
3
- import { Image, DataTable } from "@@";
4
- import { Tabs, Tab, TabContent } from "carbon-components-svelte";
3
+ import { Image, DataTable } from "$lib";
4
+ import { Tabs, Tab, TabContent } from "$ccs";
5
5
  </script>
6
6
 
7
7
  {%- macro report_job(job, h=1) -%}
@@ -1,6 +1,6 @@
1
1
  {% from "utils/misc.liq" import report_jobs, table_of_images -%}
2
2
  <script>
3
- import { Image } from "@@";
3
+ import { Image } from "$lib";
4
4
  </script>
5
5
 
6
6
  <h1>V-J usage plots</h1>
@@ -1,7 +1,7 @@
1
1
  {% from "utils/misc.liq" import table_of_images -%}
2
2
 
3
3
  {%- macro fgsea_report_script() -%}
4
- import { Image, DataTable } from "../components";
4
+ import { Image, DataTable } from "$lib";
5
5
  {%- endmacro -%}
6
6
 
7
7
  {%- macro fgsea_report(fgsea_dir, h, envs, nrows=100) -%}
@@ -16,7 +16,7 @@
16
16
 
17
17
 
18
18
  {%- macro table_of_images_script() -%}
19
- import { Image } from "../components";
19
+ import { Image } from "$lib";
20
20
  {%- endmacro -%}
21
21
 
22
22
  {%- macro table_of_images(srcs, caps=None, col=2, table_width=100) -%}
@@ -1,6 +1,6 @@
1
1
  {% from "utils/misc.liq" import report_jobs, table_of_images -%}
2
2
  <script>
3
- import { DataTable, Image } from "@@";
3
+ import { DataTable, Image } from "$lib";
4
4
  </script>
5
5
 
6
6
  {%- macro report_job(job, h=1) -%}
@@ -1,7 +1,7 @@
1
1
  {% from "utils/misc.liq" import report_jobs -%}
2
2
  <script>
3
- import { Image } from "@@";
4
- import { Tile } from "carbon-components-svelte";
3
+ import { Image } from "$lib";
4
+ import { Tile } from "$ccs";
5
5
  </script>
6
6
 
7
7
  {%- macro report_job(job, h=1) -%}
@@ -6,6 +6,7 @@
6
6
  # https://github.com/mskcc/vcf2maf
7
7
  # This is modified to:
8
8
  # - Add path to samtools to arguments
9
+ # - Add Variant_Classification and Variant_Type to INFO field
9
10
  # - Fix https://github.com/mskcc/vcf2maf/issues/234
10
11
  # - Adding logs
11
12
 
@@ -189,6 +190,8 @@ while( my $line = $maf_fh->getline ) {
189
190
  $tn_vcf{$vcf_file} .= "##FORMAT=<ID=GT,Number=1,Type=String,Description=\"Genotype\">\n";
190
191
  $tn_vcf{$vcf_file} .= "##FORMAT=<ID=AD,Number=R,Type=Integer,Description=\"Allelic depths of REF and ALT(s) in the order listed\">\n";
191
192
  $tn_vcf{$vcf_file} .= "##FORMAT=<ID=DP,Number=1,Type=Integer,Description=\"Total read depth across this site\">\n";
193
+ $tn_vcf{$vcf_file} .= "##INFO=<ID=VC,Number=1,Type=String,Description=\"Variant_Classification\">\n";
194
+ $tn_vcf{$vcf_file} .= "##INFO=<ID=VT,Number=1,Type=String,Description=\"Variant_Type\">\n";
192
195
  $tn_vcf{$vcf_file} .= "##FILTER=<ID=$_,Description=\"$_\">\n" foreach ( sort keys %filter_tags );
193
196
  $tn_vcf{$vcf_file} .= "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\t$t_id\t$n_id\n";
194
197
  }
@@ -203,7 +206,7 @@ while( my $line = $maf_fh->getline ) {
203
206
  }
204
207
 
205
208
  # For each variant in the MAF, parse out data that can go into the output VCF
206
- my ( $chr, $pos, $ref, $al1, $al2, $t_id, $n_id, $n_al1, $n_al2, $id, $qual, $filter ) = map{ my $c = lc; ( defined $col_idx{$c} ? $cols[$col_idx{$c}] : "" )} qw( Chromosome Start_Position Reference_Allele Tumor_Seq_Allele1 Tumor_Seq_Allele2 Tumor_Sample_Barcode Matched_Norm_Sample_Barcode Match_Norm_Seq_Allele1 Match_Norm_Seq_Allele2 variant_id variant_qual FILTER );
209
+ my ( $chr, $pos, $ref, $al1, $al2, $t_id, $n_id, $n_al1, $n_al2, $id, $qual, $filter, $vc, $vt ) = map{ my $c = lc; ( defined $col_idx{$c} ? $cols[$col_idx{$c}] : "" )} qw( Chromosome Start_Position Reference_Allele Tumor_Seq_Allele1 Tumor_Seq_Allele2 Tumor_Sample_Barcode Matched_Norm_Sample_Barcode Match_Norm_Seq_Allele1 Match_Norm_Seq_Allele2 variant_id variant_qual FILTER Variant_Classification Variant_Type );
207
210
  $filter =~ s/,/;/g;
208
211
  ++$line_count;
209
212
 
@@ -321,12 +324,12 @@ while( my $line = $maf_fh->getline ) {
321
324
  # Contruct a VCF formatted line and append it to the respective VCF
322
325
  if( $per_tn_vcfs ) {
323
326
  my $vcf_file = "$output_dir/$t_id\_vs_$n_id.vcf";
324
- my $vcf_line = join( "\t", $chr, $pos, $id, $ref, $alt, $qual, $filter, ".", "GT:AD:DP", $t_fmt, $n_fmt );
327
+ my $vcf_line = join( "\t", $chr, $pos, $id, $ref, $alt, $qual, $filter, "VC=$vc:VT=$vt", "GT:AD:DP", $t_fmt, $n_fmt );
325
328
  $tn_vcf{$vcf_file} .= "$vcf_line\n";
326
329
  }
327
330
 
328
331
  # Store VCF formatted data for the multi-sample VCF
329
- my $key = join( "\t", $chr, $pos, $ref, $alt );
332
+ my $key = join( "\t", $chr, $pos, $ref, $alt, $vc, $vt );
330
333
  push( @var_key, $key ) unless( exists $var_frmt{ $key } );
331
334
  $var_frmt{ $key }{ $vcf_col_idx{ $t_id }} = $t_fmt;
332
335
  $var_frmt{ $key }{ $vcf_col_idx{ $n_id }} = $n_fmt;
@@ -356,14 +359,16 @@ $vcf_fh->print( $ref_header );
356
359
  $vcf_fh->print( "##FORMAT=<ID=GT,Number=1,Type=String,Description=\"Genotype\">\n" );
357
360
  $vcf_fh->print( "##FORMAT=<ID=AD,Number=R,Type=Integer,Description=\"Allelic Depths of REF and ALT(s) in the order listed\">\n" );
358
361
  $vcf_fh->print( "##FORMAT=<ID=DP,Number=1,Type=Integer,Description=\"Read Depth\">\n" );
362
+ $vcf_fh->print( "##INFO=<ID=VC,Number=1,Type=String,Description=\"Variant_Classification\">\n" );
363
+ $vcf_fh->print( "##INFO=<ID=VT,Number=1,Type=String,Description=\"Variant_Type\">\n" );
359
364
  $vcf_fh->print( "##FILTER=<ID=$_,Description=\"$_\">\n" ) foreach ( sort keys %filter_tags );
360
365
  $vcf_fh->print( "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\t" . join("\t", @vcf_cols) . "\n" );
361
366
 
362
367
  # Write each variant into the multi-sample VCF
363
368
  print STDOUT "INFO: Writing multi-sample VCF\n";
364
369
  foreach my $key ( @var_key ) {
365
- my ( $chr, $pos, $ref, $alt ) = split( "\t", $key );
366
- $vcf_fh->print( join( "\t", $chr, $pos, $var_id{ $key }, $ref, $alt, $var_qual{ $key }, $var_fltr{ $key }, ".", "GT:AD:DP" ));
370
+ my ( $chr, $pos, $ref, $alt, $vc, $vt ) = split( "\t", $key );
371
+ $vcf_fh->print( join( "\t", $chr, $pos, $var_id{ $key }, $ref, $alt, $var_qual{ $key }, $var_fltr{ $key }, "VC=$vc;VT=$vt", "GT:AD:DP" ));
367
372
  map{ $vcf_fh->print( "\t" . (( exists $var_frmt{$key}{$_} ) ? $var_frmt{$key}{$_} : './.:.:.' ))}( 0..$#vcf_cols );
368
373
  $vcf_fh->print( "\n" );
369
374
  }