-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
121 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"QUICviz.calledCopyRatioSegTumor": "File", | ||
"QUICviz.oncotatedCalledTumor": "File", | ||
"QUICviz.allelicCountsNormal": "File", | ||
"QUICviz.denoisedCopyRatiosTumor": "File", | ||
"QUICviz.denoisedCopyRatiosNormal": "File", | ||
"QUICviz.allelicCountsTumor": "File", | ||
"QUICviz.tumorType": "String", | ||
"QUICviz.sampleID": "String" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
version 1.0 | ||
|
||
workflow QUICviz { | ||
input { | ||
String sampleID | ||
String tumorType | ||
File allelicCountsNormal | ||
File allelicCountsTumor | ||
File denoisedCopyRatiosNormal | ||
File denoisedCopyRatiosTumor | ||
File calledCopyRatioSegTumor | ||
File oncotatedCalledTumor | ||
} | ||
call QUICviz { | ||
input: | ||
sampleID = sampleID, | ||
tumorType = tumorType, | ||
allelicCountsNormal = allelicCountsNormal, | ||
allelicCountsTumor = allelicCountsTumor, | ||
denoisedCopyRatiosNormal = denoisedCopyRatiosNormal, | ||
denoisedCopyRatiosTumor = denoisedCopyRatiosTumor, | ||
calledCopyRatioSegTumor = calledCopyRatioSegTumor, | ||
oncotatedCalledTumor = oncotatedCalledTumor | ||
} | ||
call mergeImages { | ||
input: | ||
SampleID = sampleID, | ||
TumorType = tumorType, | ||
plot = QUICviz.plot | ||
} | ||
output { | ||
File QUICvizPDF = mergeImages.compiled_pdf | ||
} | ||
meta { | ||
author: "Yueyao Gao" | ||
email: "[email protected]" | ||
description: "QUICviz.wdl is based on the QUICviz_v0.3 R script developed by Alex Neil, which is a tool for visualizing CNV data" | ||
} | ||
} | ||
|
||
task QUICviz { | ||
input { | ||
String sampleID | ||
String tumorType | ||
File allelicCountsNormal | ||
File allelicCountsTumor | ||
File denoisedCopyRatiosNormal | ||
File denoisedCopyRatiosTumor | ||
File calledCopyRatioSegTumor | ||
File oncotatedCalledTumor | ||
} | ||
command <<< | ||
Rscript /BaseImage/CMI_QUICviz/scripts/QUICviz_v0.3.R \ | ||
--sample ~{sampleID} \ | ||
--tumor_type ~{tumorType} \ | ||
--normal_acf ~{allelicCountsNormal} \ | ||
--normal_cr ~{denoisedCopyRatiosNormal} \ | ||
--tumor_acf ~{allelicCountsTumor} \ | ||
--tumor_cr ~{denoisedCopyRatiosTumor} \ | ||
--tumor_cr_seg ~{calledCopyRatioSegTumor} \ | ||
--tumor_seg_oncotated ~{oncotatedCalledTumor} \ | ||
--output_dir /BaseImage/CMI_QUICviz/outputs/ | ||
|
||
>>> | ||
output { | ||
Array[File] plot = glob("/BaseImage/CMI_QUICviz/outputs/*.png") | ||
} | ||
runtime { | ||
docker: "us-central1-docker.pkg.dev/tag-team-160914/gptag-dockers/cmi_quicviz:0.3.0" | ||
memory: "16 GB" | ||
cpu: "4" | ||
disks: "local-disk 100 HDD" | ||
} | ||
} | ||
task mergeImages { | ||
input { | ||
String SampleID | ||
String TumorType | ||
Array[File] plot | ||
} | ||
command <<< | ||
for i in ~{plot}; do mv $i /output/images/; done | ||
|
||
python <<CODE | ||
pip3 install img2pdf | ||
import img2pdf | ||
import glob | ||
import os | ||
with open(f"/output/~{SampleID}_~{TumorType}_QUICviz.pdf","wb") as f: | ||
f.write(img2pdf.convert(glob.glob("/output/images/*.jpg"))) | ||
CODE | ||
>>> | ||
output { | ||
File compiled_pdf = "/output/~{SampleID}_~{TumorType}_QUICviz.pdf" | ||
} | ||
runtime { | ||
docker: "us.gcr.io/tag-team-160914/neovax-parsley:2.2.1.0" | ||
memory: "16 GB" | ||
cpu: "4" | ||
disks: "local-disk 100 HDD" | ||
} | ||
} |