Skip to content

Commit

Permalink
Merge branch 'master' into add_neovax_workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
yueyaog authored May 10, 2024
2 parents cc49361 + 4afbfdd commit 490473e
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 6 deletions.
7 changes: 6 additions & 1 deletion .dockstore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,9 @@ workflows:
subclass: WDL
primaryDescriptorPath: /NeoVax/NeoVax_PackageData/NeoVax_PackageData.wdl
testParameterFiles:
- /NeoVax/NeoVax_PackageData/NeoVax_PackageData.inputs.json
- /NeoVax/NeoVax_PackageData/NeoVax_PackageData.inputs.json
- name: QUICviz
subclass: WDL
primaryDescriptorPath: /PECGS-QUICviz/QUICviz.wdl
testParameterFiles:
- /PECGS-QUICviz/QUICviz.inputs.json
11 changes: 11 additions & 0 deletions PECGS-QUICviz/QUICviz.inputs.json
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"
}

124 changes: 124 additions & 0 deletions PECGS-QUICviz/QUICviz.wdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
version 1.0

workflow QUICviz {
input {
String sampleID
String tumorType
String quicvizDocker = "us-central1-docker.pkg.dev/tag-team-160914/gptag-dockers/cmi_quicviz:0.3.1"
File allelicCountsNormal
File allelicCountsTumor
File denoisedCopyRatiosNormal
File denoisedCopyRatiosTumor
File calledCopyRatioSegTumor
File oncotatedCalledTumor
}
call QUICviz {
input:
sampleID = sampleID,
tumorType = tumorType,
quicvizDocker = quicvizDocker,
allelicCountsNormal = allelicCountsNormal,
allelicCountsTumor = allelicCountsTumor,
denoisedCopyRatiosNormal = denoisedCopyRatiosNormal,
denoisedCopyRatiosTumor = denoisedCopyRatiosTumor,
calledCopyRatioSegTumor = calledCopyRatioSegTumor,
oncotatedCalledTumor = oncotatedCalledTumor
}

Array[File] QUICvizPlots = QUICviz.plot
call mergeImages {
input:
SampleID = sampleID,
TumorType = tumorType,
plot = QUICvizPlots,
quicvizDocker = quicvizDocker
}
output {
File QUICvizPDF = mergeImages.chr_pdf
File AllChrPlot = mergeImages.allchr_plot
}
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
String quicvizDocker
File allelicCountsNormal
File allelicCountsTumor
File denoisedCopyRatiosNormal
File denoisedCopyRatiosTumor
File calledCopyRatioSegTumor
File oncotatedCalledTumor
Int memory = 16
Int cpu = 4
}
command <<<
set -e
mkdir outputs

Rscript /BaseImage/CMI_QUICviz/scripts/CMI_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 outputs/

>>>
output {
Array[File] plot = glob("outputs/*.png")
}
runtime {
docker: quicvizDocker
memory: memory + " GB"
cpu: cpu
disks: "local-disk 100 HDD"
}
}
task mergeImages {
input {
String SampleID
String TumorType
Array[File] plot
String quicvizDocker
Int memory = 16
Int cpu = 4
}
command <<<
mkdir -p output/images
for i in `ls ~{sep=" " plot}`; do mv $i output/images/; done

python3 <<CODE
import img2pdf
import glob
import os
# Get list of PNG files sorted
png_files = sorted(glob.glob("output/images/*.png"))
numeric_png_files = [file for file in png_files if os.path.basename(file).split('.')[0].isdigit()]
png_files = sorted(numeric_png_files, key=lambda x: int(os.path.basename(x).split('.')[0]))
with open(f"output/~{SampleID}_~{TumorType}_QUICviz.pdf","wb") as f:
f.write(img2pdf.convert(png_files))
CODE
>>>
output {
File chr_pdf = "output/~{SampleID}_~{TumorType}_QUICviz.pdf"
File allchr_plot = "output/images/All_chr.png"
}
runtime {
docker: quicvizDocker
memory: memory + " GB"
cpu: cpu
disks: "local-disk 100 HDD"
}
}
2 changes: 1 addition & 1 deletion SmartSeq/SC_Plate_QC/SC_Plate_QC.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ task graphPlate{

runtime {
docker: "bgranger/ss2_qc:0.1"
memory: memory + "GB"
memory: memory + " GB"
cpu: "2"
disks: "local-disk "+disk_space+" HDD"
bootDiskSizeGb: boot_disk_space
Expand Down
4 changes: 2 additions & 2 deletions SmartSeq/scRNA_Pipeline/SmartSeq2_scRNA_pipeline.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ task AdapterQC {
runtime {
docker: ss2_adapter_qc_docker
disks: "local-disk " + disk_size + " HDD"
memory: mem + "GB"
memory: mem + " GB"
cpu: "1"
}
output {
Expand Down Expand Up @@ -209,7 +209,7 @@ task ExtractQC_metrics {
runtime {
docker: ss2_docker
disks: "local-disk 25 HDD"
memory: mem + "GB"
memory: mem + " GB"
cpu: "1"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ task HISAT2rsem {
}
runtime {
docker:"quay.io/humancellatlas/secondary-analysis-hisat2:v0.2.2-2-2.1.0"
memory: Rsem_memory + "GB"
memory: Rsem_memory + " GB"
disks: "local-disk " + disk_size + " HDD"
cpu: "4"
preemptible: 5
Expand Down Expand Up @@ -192,7 +192,7 @@ task RsemExpression {
}
runtime {
docker: "quay.io/humancellatlas/secondary-analysis-rsem:v0.2.2-1.3.0"
memory: Rsem_exp_memory + "GB"
memory: Rsem_exp_memory + " GB"
disks: "local-disk " + disk_size + " HDD"
cpu: "4"
preemptible: 5
Expand Down

0 comments on commit 490473e

Please sign in to comment.