diff options
author | Peter Amstutz | 2020-06-22 18:23:40 +0000 |
---|---|---|
committer | Peter Amstutz | 2020-06-22 18:25:45 +0000 |
commit | 76883d02e6073f990ea980dad1f8cf21121255ff (patch) | |
tree | 0fe93dadf69cb5c0c09ff9b98fe18e5baacdd6c4 /workflows/fastq2fasta | |
parent | fcf300d0df032f569f21b3ef75a78bb163f55da0 (diff) | |
download | bh20-seq-resource-76883d02e6073f990ea980dad1f8cf21121255ff.tar.gz bh20-seq-resource-76883d02e6073f990ea980dad1f8cf21121255ff.tar.lz bh20-seq-resource-76883d02e6073f990ea980dad1f8cf21121255ff.zip |
Adjust QC filter and relabel output sequence with sample_id
Diffstat (limited to 'workflows/fastq2fasta')
-rw-r--r-- | workflows/fastq2fasta/bam2fasta.cwl | 2 | ||||
-rw-r--r-- | workflows/fastq2fasta/bcftools-consensus.cwl | 9 | ||||
-rw-r--r-- | workflows/fastq2fasta/bcftools-view-qc.cwl | 2 | ||||
-rw-r--r-- | workflows/fastq2fasta/fastq2fasta.cwl | 2 |
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 |