Skip to content

Commit

Permalink
Merge branch 'main' into im-metagenomics-workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cimendes authored Sep 20, 2023
2 parents 3844825 + f229903 commit faf939c
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 16 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug Report
about: Tell us about a bug
title: ''
labels: ''
assignees: ''

---

:bug:

### :pencil: Describe the Issue

<!-- Please describe what the issue you are facing and any necessary context. -->

### :repeat: How to Reproduce

- Was this run on the Terra platform?
- Terra on GCP or Azure?
- Or were the workflows run locally using `miniwdl` or `cromwell`?
- **What was the exact command was used to launch the workflow?**
- If possible, we may ask you to share your Terra workspace with us. Usually READER access is sufficient, but we may ask for WRITER access if we need to make changes to the workspace to reproduce the issue.

<!-- Please describe the steps needed to reproduce the observed behavior. -->

### :fishing_pole_and_fish: Expected Behavior

<!-- Please describe what you expected to happen. -->

### :floppy_disk: Version Information

<!-- What workflow (if applicable) did this issue occur on?
What version of the workflow (if applicable) was being used? -->

### :information_source: Additional Information

<!-- Please describe any additional information we should know in order to address the issue.
If applicable, please add screenshots to help explain your problem.-->
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Feature Request
about: Tell us about what you need
title: ''
labels: ''
assignees: ''

---

:cool:

### :pushpin: Explain the Request

<!--Please describe what you would like us to add.-->

### :books: Context

<!--Please describe the context about your request.-->

### :chart_with_upwards_trend: Desired Behavior

<!--Please provide a clear and concise description of what you want to happen.-->

### :information_source: Additional Information

<!--Please add any other information or screenshots about your request here.-->
14 changes: 7 additions & 7 deletions tasks/gene_typing/task_plasmidfinder.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ task plasmidfinder {
input {
File assembly
String samplename
Int cpu = 8
Int memory = 16
Int cpu = 2
Int memory = 8
String docker = "us-docker.pkg.dev/general-theiagen/staphb/plasmidfinder:2.1.6"
Int disk_size = 100
Int disk_size = 50
String? database
String? database_path
String? method_path
Expand Down Expand Up @@ -41,15 +41,15 @@ task plasmidfinder {
if [ ! -f results_tab.tsv ]; then
PF="No plasmids detected in database"
else
PF="$(tail -n +2 results_tab.tsv | cut -f 2 | sort | uniq -u | paste -s -d, - )"
PF="$(tail -n +2 results_tab.tsv | uniq | cut -f 2 | sort | paste -s -d, - )"
if [ "$PF" == "" ]; then
PF="No plasmids detected in database"
fi
fi
echo $PF | tee PLASMIDS
echo "$PF" | tee PLASMIDS

mv results_tab.tsv ~{samplename}_results.tsv
mv Hit_in_genome_seq.fsa ~{samplename}_seqs.fsa
mv -v results_tab.tsv ~{samplename}_results.tsv
mv -v Hit_in_genome_seq.fsa ~{samplename}_seqs.fsa

>>>
output {
Expand Down
13 changes: 11 additions & 2 deletions tasks/taxon_id/task_kraken2.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,15 @@ task kraken2_standalone {
percentage_human=$(grep "Homo sapiens" ~{samplename}.report.txt | cut -f 1)
if [ -z "$percentage_human" ] ; then percentage_human="0" ; fi
echo $percentage_human | tee PERCENT_HUMAN

# rename classified and unclassified read files if SE
if [ -e "~{samplename}.classified#.fastq.gz" ]; then
mv "~{samplename}.classified#.fastq.gz" ~{samplename}.classified_1.fastq.gz
fi
if [ -e "~{samplename}.unclassified#.fastq.gz" ]; then
mv "~{samplename}.unclassified#.fastq.gz" ~{samplename}.unclassified_1.fastq.gz
fi

>>>
output {
String kraken2_version = read_string("VERSION")
Expand All @@ -119,10 +128,10 @@ task kraken2_standalone {
File kraken2_report = "~{samplename}.report.txt"
File kraken2_classified_report = "~{samplename}.classifiedreads.txt.gz"
File kraken2_unclassified_read1 = "~{samplename}.unclassified_1.fastq.gz"
File kraken2_unclassified_read2 = "~{samplename}.unclassified_2.fastq.gz"
File? kraken2_unclassified_read2 = "~{samplename}.unclassified_2.fastq.gz"
File kraken2_classified_read1 = "~{samplename}.classified_1.fastq.gz"
File kraken2_classified_read2 = "~{samplename}.classified_2.fastq.gz"
Float kraken2_percent_human = read_float("PERCENT_HUMAN")
File? kraken2_classified_read2 = "~{samplename}.classified_2.fastq.gz"
}
runtime {
docker: "~{docker}"
Expand Down
2 changes: 1 addition & 1 deletion tasks/utilities/task_kmc.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ task kmc {
tail -n8 LOG > ~{samplename}_kmer_stats.txt
>>>
output {
String est_genome_size = read_string("UNIQUE_COUNTED")
Int est_genome_size = read_int("UNIQUE_COUNTED")
File kmer_stats = "~{samplename}_kmer_stats.txt"
String kmc_version = read_string("VERSION")
}
Expand Down
4 changes: 2 additions & 2 deletions tests/workflows/theiaprok/test_wf_theiaprok_illumina_pe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
- path: miniwdl_run/call-merlin_magic/workflow.log
contains: ["wdl", "theiaprok_illumina_pe", "merlin", "done"]
- path: miniwdl_run/call-plasmidfinder/command
md5sum: 61f7be9cfd36e3a48585e7f64cbcfe35
md5sum: 3b70033058bf91c04337e38bfd038b5a
- path: miniwdl_run/call-plasmidfinder/inputs.json
- path: miniwdl_run/call-plasmidfinder/outputs.json
- path: miniwdl_run/call-plasmidfinder/stderr.txt
Expand Down Expand Up @@ -556,7 +556,7 @@
- path: miniwdl_run/wdl/tasks/gene_typing/task_bakta.wdl
md5sum: 0bed8fb60786095843a67b1ad03051dc
- path: miniwdl_run/wdl/tasks/gene_typing/task_plasmidfinder.wdl
md5sum: 6ca295b4dcdbe95dd86516ba0a4073f8
md5sum: 8730e07b1c7ab9d2434a7838ddb1fc72
- path: miniwdl_run/wdl/tasks/gene_typing/task_prokka.wdl
md5sum: 8e8423b99d5cd3e92bb89b3c3211d432
- path: miniwdl_run/wdl/tasks/gene_typing/task_resfinder.wdl
Expand Down
4 changes: 2 additions & 2 deletions tests/workflows/theiaprok/test_wf_theiaprok_illumina_se.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@
- path: miniwdl_run/call-merlin_magic/workflow.log
contains: ["wdl", "theiaprok_illumina_se", "merlin", "done"]
- path: miniwdl_run/call-plasmidfinder/command
md5sum: 61f7be9cfd36e3a48585e7f64cbcfe35
md5sum: 3b70033058bf91c04337e38bfd038b5a
- path: miniwdl_run/call-plasmidfinder/inputs.json
- path: miniwdl_run/call-plasmidfinder/outputs.json
- path: miniwdl_run/call-plasmidfinder/stderr.txt
Expand Down Expand Up @@ -526,7 +526,7 @@
- path: miniwdl_run/wdl/tasks/gene_typing/task_bakta.wdl
md5sum: 0bed8fb60786095843a67b1ad03051dc
- path: miniwdl_run/wdl/tasks/gene_typing/task_plasmidfinder.wdl
md5sum: 6ca295b4dcdbe95dd86516ba0a4073f8
md5sum: 8730e07b1c7ab9d2434a7838ddb1fc72
- path: miniwdl_run/wdl/tasks/gene_typing/task_prokka.wdl
md5sum: 8e8423b99d5cd3e92bb89b3c3211d432
- path: miniwdl_run/wdl/tasks/gene_typing/task_resfinder.wdl
Expand Down
2 changes: 1 addition & 1 deletion workflows/theiaprok/wf_theiaprok_ont.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ workflow theiaprok_ont {
String? nanoplot_version = nanoplot_raw.nanoplot_version
String? nanoplot_docker = nanoplot_raw.nanoplot_docker
# Read QC - kmc outputs
String? kmc_est_genome_size = read_qc_trim.est_genome_size
Int? kmc_est_genome_size = read_qc_trim.est_genome_size
File? kmc_kmer_stats = read_qc_trim.kmc_kmer_stats
String? kmc_version = read_qc_trim.kmc_version
# Read QC - rasusa outputs
Expand Down
2 changes: 1 addition & 1 deletion workflows/utilities/wf_read_QC_trim_ont.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ workflow read_QC_trim_ont {
}
output {
# kmc outputs
String est_genome_size = kmc.est_genome_size
Int est_genome_size = kmc.est_genome_size
File kmc_kmer_stats = kmc.kmer_stats
String kmc_version = kmc.kmc_version

Expand Down

0 comments on commit faf939c

Please sign in to comment.