task hisat2 { | task hisat2 { | ||||
File idx | File idx | ||||
File read_1P | |||||
File read_2P | |||||
File read1 | |||||
File read2 | |||||
String idx_prefix | String idx_prefix | ||||
String base = sub(basename(read_1P),"\\.\\S+$", "") | |||||
String sample_id | |||||
String docker | String docker | ||||
String cluster | String cluster | ||||
command { | command { | ||||
nt=$(nproc) | nt=$(nproc) | ||||
hisat2 -t -p $nt -x ${idx}/${idx_prefix} -1 ${read_1P} -2 ${read_2P} -S ${base}.sam --un-conc-gz ${base}_un.fq.gz | |||||
hisat2 -t -p $nt -x ${idx}/${idx_prefix} -1 ${read1} -2 ${read2} -S ${sample_id}.sam --un-conc-gz ${sample_id}_un.fq.gz | |||||
} | } | ||||
runtime { | runtime { | ||||
} | } | ||||
output { | output { | ||||
File sam = base + ".sam" | |||||
File unmapread_1p = base + "_un.fq.1.gz" | |||||
File unmapread_2p = base + "_un.fq.2.gz" | |||||
File sam = "${sample_id}.sam" | |||||
File unmapread_1p = "${sample_id}_un.fq.1.gz" | |||||
File unmapread_2p = "${sample_id}_un.fq.2.gz" | |||||
} | } | ||||
} | } |
task samtools { | task samtools { | ||||
File sam | File sam | ||||
String base = basename(sam, ".sam") | |||||
String bam = base + ".bam" | |||||
String sorted_bam = base + ".sorted.bam" | |||||
String sorted_bam_index = base + ".sorted.bam.bai" | |||||
String sample_id | |||||
String bam = sample_id + ".bam" | |||||
String sorted_bam = sample_id + ".sorted.bam" | |||||
String sorted_bam_index = sample_id + ".sorted.bam.bai" | |||||
String ins_size = sample_id + ".ins_size" | |||||
String docker | String docker | ||||
String cluster | String cluster | ||||
File bam | File bam | ||||
File gtf | File gtf | ||||
String docker | String docker | ||||
String base = basename(bam, ".sorted.bam") | |||||
String sample_id | |||||
String cluster | String cluster | ||||
command <<< | command <<< | ||||
nt=$(nproc) | nt=$(nproc) | ||||
mkdir ballgown | mkdir ballgown | ||||
/opt/conda/bin/stringtie -e -B -p $nt -G ${gtf} -o ballgown/${base}/${base}.gtf -C ${base}.cov.ref.gtf -A ${base}.gene.abundance.txt ${bam} -g ${sample_id}_genecount.csv | |||||
/opt/conda/bin/stringtie -e -B -p $nt -G ${gtf} -o ballgown/${sample_id}/${sample_id}.gtf -C ${sample_id}.cov.ref.gtf -A ${sample_id}.gene.abundance.txt ${bam} -g ${sample_id}_genecount.csv | |||||
>>> | >>> | ||||
runtime { | runtime { | ||||
} | } | ||||
output { | output { | ||||
File covered_transcripts = "${base}.cov.ref.gtf" | |||||
File gene_abundance = "${base}.gene.abundance.txt" | |||||
Array[File] ballgown = ["ballgown/${base}/${base}.gtf", "ballgown/${base}/e2t.ctab", "ballgown/${base}/e_data.ctab", "ballgown/${base}/i2t.ctab", "ballgown/${base}/i_data.ctab", "ballgown/${base}/t_data.ctab"] | |||||
File covered_transcripts = "${sample_id}.cov.ref.gtf" | |||||
File gene_abundance = "${sample_id}.gene.abundance.txt" | |||||
Array[File] ballgown = ["ballgown/${sample_id}/${sample_id}.gtf", "ballgown/${sample_id}/e2t.ctab", "ballgown/${sample_id}/e_data.ctab", "ballgown/${sample_id}/i2t.ctab", "ballgown/${sample_id}/i_data.ctab", "ballgown/${sample_id}/t_data.ctab"] | |||||
File genecount = "{sample_id}_genecount.csv" | |||||
} | } | ||||
} | } |