-
Notifications
You must be signed in to change notification settings - Fork 17
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
1 parent
ac4fd39
commit c84ce51
Showing
1 changed file
with
16 additions
and
21 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,48 @@ | ||
version 1.0 | ||
|
||
task clockwork_decon_reads { | ||
# Inputs | ||
input { | ||
File read1 | ||
File? read2 | ||
File read2 | ||
String samplename | ||
Int disk_size = 200 | ||
Int cpu = 16 | ||
Int mem = 64 | ||
String docker = "us-docker.pkg.dev/general-theiagen/cdcgov/varpipe_wgs_with_refs:2bc7234074bd53d9e92a1048b0485763cd9bbf6f4d12d5a1cc82bfec8ca7d75e" | ||
} | ||
|
||
} | ||
command <<< | ||
# Print and save date | ||
date | tee DATE | ||
|
||
# Print and save version | ||
clockwork version > VERSION | ||
|
||
# Map reads to the clockwork reference | ||
clockwork map_reads \ | ||
--unsorted_sam ~{samplename} /varpipe_wgs/tools/clockwork-0.11.3/OUT/ref.fa \ | ||
"~{samplename}.sam" \ | ||
~{read1} \ | ||
~{read2} | ||
--unsorted_sam ~{samplename} /varpipe_wgs/tools/clockwork-0.11.3/OUT/ref.fa \ | ||
"~{samplename}.sam" \ | ||
~{read1} \ | ||
~{read2} | ||
|
||
# Remove contaminants (reads that map with high identity to non-MTB sequences) | ||
clockwork remove_contam \ | ||
/varpipe_wgs/tools/clockwork-0.11.3/OUT/remove_contam_metadata.tsv \ | ||
"~{samplename}.sam" \ | ||
"~{samplename}_outfile_read_counts" \ | ||
"./clockwork_cleaned_~{samplename}_R1.fastq.gz" \ | ||
"./clockwork_cleaned_~{samplename}_R2.fastq.gz" | ||
/varpipe_wgs/tools/clockwork-0.11.3/OUT/remove_contam_metadata.tsv \ | ||
"~{samplename}.sam" \ | ||
"~{samplename}_outfile_read_counts" \ | ||
"clockwork_cleaned_~{samplename}_R1.fastq.gz" \ | ||
"clockwork_cleaned_~{samplename}_R2.fastq.gz" | ||
|
||
# Clean up files | ||
rm "~{samplename}.sam" | ||
|
||
>>> | ||
output { | ||
File clockwork_cleaned_read1 = "./clockwork_cleaned_~{samplename}_R1.fastq.gz" | ||
File clockwork_cleaned_read2 = "./clockwork_cleaned_~{samplename}_R2.fastq.gz" | ||
File clockwork_cleaned_read1 = "clockwork_cleaned_~{samplename}_R1.fastq.gz" | ||
File clockwork_cleaned_read2 = "clockwork_cleaned_~{samplename}_R2.fastq.gz" | ||
} | ||
runtime { | ||
docker: docker | ||
memory: "~{mem} GB" | ||
memory: mem + " GB" | ||
cpu: cpu | ||
disks: "local-disk " + disk_size + " SSD" | ||
disk: disk_size + " GB" | ||
maxRetries: 3 | ||
maxRetries: 3 | ||
preemptible: 1 | ||
} | ||
} |