Bläddra i källkod

unified output file prefix

tags/v0.2.6
stead99 4 år sedan
förälder
incheckning
691db991ce
4 ändrade filer med 22 tillägg och 21 borttagningar
  1. +6
    -6
      tasks/count.wdl
  2. +10
    -8
      tasks/fastp.wdl
  3. +5
    -5
      tasks/hisat2.wdl
  4. +1
    -2
      workflow.wdl

+ 6
- 6
tasks/count.wdl Visa fil

task count { task count {
Array[File] ballgown Array[File] ballgown
String sample_id
String base=basename(gene_abundance, ".gene.abundance.txt")
String docker String docker
String cluster String cluster
String disk_size String disk_size
Int count_length Int count_length


command <<< command <<<
mkdir -p /cromwell_root/tmp/ballgown/${sample_id}
cp -r ${sep=" " ballgown} /cromwell_root/tmp/ballgown/${sample_id}
count -i /cromwell_root/tmp/ballgown -l ${count_length} -g ${sample_id}_gene_count_matrix.csv -t ${sample_id}_transcript_count_matrix.csv
mkdir -p /cromwell_root/tmp/ballgown/${base}
cp -r ${sep=" " ballgown} /cromwell_root/tmp/ballgown/${base}
count -i /cromwell_root/tmp/ballgown -l ${count_length} -g ${base}_gene_count_matrix.csv -t ${base}_transcript_count_matrix.csv
>>> >>>
runtime { runtime {
} }
output { output {
File mat_expression_genecount="${sample_id}_gene_count_matrix.csv"
File mat_expression_transcriptcount="${sample_id}_transcript_count_matrix.csv"
File mat_expression_genecount="${base}_gene_count_matrix.csv"
File mat_expression_transcriptcount="${base}_transcript_count_matrix.csv"
} }
} }

+ 10
- 8
tasks/fastp.wdl Visa fil

task fastp { task fastp {
File read1 File read1
File read2 File read2
String sample_id
String read1name=sub(basename(read1),"\\.\\S+$", "")
String read2name=sub(basename(read2),"\\.\\S+$", "")
String sample_name=sub(basename(read1),"\\_*1.\\S+$", "")
String adapter_sequence String adapter_sequence
String adapter_sequence_r2 String adapter_sequence_r2
String docker String docker
## Trim ## Trim
if [ "${trim_adapter}" != 'true' ]; then if [ "${trim_adapter}" != 'true' ]; then
cp ${read1} ${sample_id}_R1.fq.gz
cp ${read2} ${sample_id}_R2.fq.gz
cp ${read1} ${read1name}.fq.gz
cp ${read2} ${read2name}.fq.gz
else else
fastp --thread $nt --adapter_sequence ${adapter_sequence} --adapter_sequence_r2 ${adapter_sequence_r2} --detect_adapter_for_pe -i ${read1} -I ${read2} -o ${sample_id}_R1.fq.gz -O ${sample_id}_R2.fq.gz -j ${sample_id}.json -h ${sample_id}.html
fastp --thread $nt --adapter_sequence ${adapter_sequence} --adapter_sequence_r2 ${adapter_sequence_r2} --detect_adapter_for_pe -i ${read1} -I ${read2} -o ${read1name}.fq.gz -O ${read2name}.fq.gz -j ${sample_name}.json -h ${sample_name}.html
fi fi
>>> >>>
} }


output { output {
File json = "${sample_id}.json"
File report = "${sample_id}.html"
File trim_R1 = "${sample_id}_R1.fq.gz"
File trim_R2 = "${sample_id}_R2.fq.gz"
File json = "${sample_name}.json"
File report = "${sample_name}.html"
File trim_R1 = "${read1name}.fq.gz"
File trim_R2 = "${read2name}.fq.gz"
} }
} }

+ 5
- 5
tasks/hisat2.wdl Visa fil

File idx File idx
File read_1P File read_1P
File read_2P File read_2P
String sample_name=sub(basename(read_1P),"\\_*1.\\S+$", "")
String idx_prefix String idx_prefix
String sample_id
String docker String docker
String cluster String cluster
String disk_size String disk_size


command { command {
nt=$(nproc) nt=$(nproc)
hisat2 -t -p $nt -x ${idx}/${idx_prefix} -1 ${read_1P} -2 ${read_2P} -S ${sample_id}.sam --un-conc-gz ${sample_id}_un.fq.gz
hisat2 -t -p $nt -x ${idx}/${idx_prefix} -1 ${read_1P} -2 ${read_2P} -S ${sample_name}.sam --un-conc-gz ${sample_name}_un.fq.gz
} }
runtime { runtime {
} }


output { output {
File sam=sample_id + ".sam"
File unmapread_1p=sample_id + "_un.fq.1.gz"
File unmapread_2p=sample_id + "_un.fq.2.gz"
File sam=sample_name + ".sam"
File unmapread_1p=sample_name + "_un.fq.1.gz"
File unmapread_2p=sample_name + "_un.fq.2.gz"
} }
} }

+ 1
- 2
workflow.wdl Visa fil



call fastp.fastp as fastp { call fastp.fastp as fastp {
input: input:
sample_id=sample_id,
read1=read1, read1=read1,
read2=read2, read2=read2,
docker=fastp_docker, docker=fastp_docker,
call hisat2.hisat2 as hisat2 { call hisat2.hisat2 as hisat2 {
input: input:
sample_id=sample_id,
docker=hisat2_docker, docker=hisat2_docker,
cluster=hisat2_cluster, cluster=hisat2_cluster,
idx=idx, idx=idx,
docker=count_docker, docker=count_docker,
cluster=count_cluster, cluster=count_cluster,
ballgown=stringtie.ballgown, ballgown=stringtie.ballgown,
gene_abundance=stringtie.gene_abundance,
disk_size=disk_size, disk_size=disk_size,
count_length=count_length count_length=count_length
} }

Laddar…
Avbryt
Spara