aboutsummaryrefslogtreecommitdiff
path: root/workflows
diff options
context:
space:
mode:
Diffstat (limited to 'workflows')
-rw-r--r--workflows/fastq2fasta/bam2fasta.cwl2
-rw-r--r--workflows/fastq2fasta/bcftools-consensus.cwl9
-rw-r--r--workflows/fastq2fasta/bcftools-view-qc.cwl2
-rw-r--r--workflows/fastq2fasta/fastq2fasta.cwl2
4 files changed, 13 insertions, 2 deletions
diff --git a/workflows/fastq2fasta/bam2fasta.cwl b/workflows/fastq2fasta/bam2fasta.cwl
index efe580f..dd4020b 100644
--- a/workflows/fastq2fasta/bam2fasta.cwl
+++ b/workflows/fastq2fasta/bam2fasta.cwl
@@ -15,6 +15,7 @@ inputs:
threads:
type: int
default: 4
+ sample_id: string
outputs:
out_fasta:
@@ -61,5 +62,6 @@ steps:
in:
ref_fasta: fasta
vcf: bcftools_index_after_qc/indexed
+ sample_id: sample_id
out: [out_fasta]
run: bcftools-consensus.cwl
diff --git a/workflows/fastq2fasta/bcftools-consensus.cwl b/workflows/fastq2fasta/bcftools-consensus.cwl
index c111792..dffdbe3 100644
--- a/workflows/fastq2fasta/bcftools-consensus.cwl
+++ b/workflows/fastq2fasta/bcftools-consensus.cwl
@@ -4,20 +4,27 @@ cwlVersion: v1.1
hints:
DockerRequirement:
dockerPull: "quay.io/biocontainers/bcftools:1.10.2--hd2cd319_0"
+ ShellCommandRequirement: {}
baseCommand: bcftools
arguments:
- consensus
- - -i'QUAL > 1 && GT="A"'
+ - -i
+ - 'QUAL > 1 && GT="a"'
- -Hla
- -f
- $(inputs.ref_fasta)
- $(inputs.vcf)
+ - {shellQuote: false, valueFrom: "|"}
+ - sed
+ - "s/^>.*/>$(inputs.sample_id)/g"
inputs:
- id: ref_fasta
type: File
- id: vcf
type: File
secondaryFiles: [.csi]
+ - id: sample_id
+ type: string
outputs:
- id: out_fasta
type: stdout
diff --git a/workflows/fastq2fasta/bcftools-view-qc.cwl b/workflows/fastq2fasta/bcftools-view-qc.cwl
index 477c596..336f455 100644
--- a/workflows/fastq2fasta/bcftools-view-qc.cwl
+++ b/workflows/fastq2fasta/bcftools-view-qc.cwl
@@ -8,7 +8,7 @@ baseCommand: bcftools
arguments:
- view
- -i
- - 'QUAL>1 && (GT="AA" || GT="Aa")'
+ - 'QUAL > 1 && GT="a"'
- -Oz
- --threads=$(inputs.threads)
- $(inputs.bcf)
diff --git a/workflows/fastq2fasta/fastq2fasta.cwl b/workflows/fastq2fasta/fastq2fasta.cwl
index 0cf5c48..d529d99 100644
--- a/workflows/fastq2fasta/fastq2fasta.cwl
+++ b/workflows/fastq2fasta/fastq2fasta.cwl
@@ -22,6 +22,7 @@ inputs:
type: int
default: 4
metadata: File?
+ sample_id: string
outputs:
out_fasta:
@@ -57,5 +58,6 @@ steps:
bam: samtools-sort/sorted_bam
fasta: ref_fasta
threads: threads
+ sample_id: sample_id
out: [out_fasta]
run: bam2fasta.cwl