-
Notifications
You must be signed in to change notification settings - Fork 0
/
trust4.wdl
executable file
·121 lines (107 loc) · 3.99 KB
/
trust4.wdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
version 1.0
struct trustResources {
String refIMGT
String bcrtcrFasta
}
# ================================================================================
# Workflow accepts two fastq files for paired-end sequencing, with R1 and R2 reads
# ================================================================================
workflow trust4 {
input {
File fastqR1
File fastqR2
String reference
String outputFileNamePrefix = ""
}
String sampleID = if outputFileNamePrefix=="" then basename(fastqR1, ".fastq.gz") else outputFileNamePrefix
Map[String,trustResources] trust_res_by_genome = {
"hg19": {
"refIMGT": "$TRUST4_ROOT/human_IMGT+C.fa",
"bcrtcrFasta": "$TRUST4_ROOT/hg19_bcrtcr.fa"
},
"hg38": {
"refIMGT": "$TRUST4_ROOT/human_IMGT+C.fa",
"bcrtcrFasta": "$TRUST4_ROOT/hg38_bcrtcr.fa"
},
"mm10": {
"refIMGT": "$TRUST4_ROOT/mouse/mouse_IMGT+C.fa",
"bcrtcrFasta": "$TRUST4_ROOT/mouse/GRCm38_bcrtcr.fa"
}
}
call runTrust4 {input: fastqR1 = fastqR1,
fastqR2 = fastqR2,
refIMGT = trust_res_by_genome[reference].refIMGT,
bcrtcrFasta = trust_res_by_genome[reference].bcrtcrFasta,
outputPrefix = sampleID}
parameter_meta {
fastqR1: "Input file with the first mate reads."
fastqR2: "Input file with the second mate reads."
reference: "Reference assembly id"
outputFileNamePrefix: "Output prefix, customizable. Default is the first file's basename."
}
meta {
author: "Peter Ruzanov"
email: "peter.ruzanov@oicr.on.ca"
description: "Tcr Receptor Utilities for Solid Tissue (TRUST) is a computational tool to analyze TCR and BCR sequences using unselected RNA sequencing data, profiled from solid tissues, including tumors. TRUST4 performs de novo assembly on V, J, C genes including the hypervariable complementarity-determining region 3 (CDR3) and reports consensus of BCR/TCR sequences. TRUST4 then realigns the contigs to IMGT reference gene sequences to report the corresponding information."
dependencies: [
{
name: "trust4/1.0.5.1",
url: "https://github.com/liulab-dfci/TRUST4"
}
]
output_meta: {
cdrReport: "report contains CDR1,2,3 and gene information for each consensus assemblies",
finalContigs: "contigs and corresponding nucleotide weight",
finalReport: "report file focusing on CDR3 and is compatible with other repertoire analysis tool such as VDJTools",
consensusAssembly: "fasta file for the annotation of the consensus assembly"
}
}
output {
File cdrReport = runTrust4.cdrReport
File finalContigs = runTrust4.finalContigs
File finalReport = runTrust4.finalReport
File consensusAssembly = runTrust4.consensusAssembly
}
}
# ==============================
# TRUST4 SINGLE-STEP ANALYSIS
# ==============================
task runTrust4 {
input {
Int jobMemory = 8
Int timeout = 20
Int? threads
String bcrtcrFasta
String outputPrefix
String refIMGT
File fastqR1
File fastqR2
String modules = "mixcr/3.0.13"
}
command <<<
set -euo pipefail
run-trust4 -f ~{bcrtcrFasta} ~{"--ref " + refIMGT} ~{"-t " + threads} -1 ~{fastqR1} -2 ~{fastqR2} -o ~{outputPrefix}
>>>
parameter_meta {
jobMemory: "Memory allocated to the task."
timeout: "Timeout in hours, needed to override imposed limits."
bcrtcrFasta: "BCR TCR fasta"
outputPrefix: "Custom output for result files"
refIMGT: "Detailed .fa with chromosomal coordinates, IMGT: http://www.imgt.org//download/V-QUEST/IMGT_V-QUEST_reference_directory/"
threads: "Optional threads, default is 1"
modules: "Names and versions of required modules."
fastqR1: "Input fastq R1."
fastqR2: "Input fastq R2."
}
runtime {
memory: "~{jobMemory} GB"
modules: "~{modules}"
timeout: "~{timeout}"
}
output {
File cdrReport = "~{outputPrefix}_cdr3.out"
File finalContigs = "~{outputPrefix}_final.out"
File finalReport = "~{outputPrefix}_report.tsv"
File consensusAssembly = "~{outputPrefix}_annot.fa"
}
}