diff --git a/test/snpEff-job.yml b/test/snpEff-job.yml new file mode 100644 index 000000000..8d1b4f8a9 --- /dev/null +++ b/test/snpEff-job.yml @@ -0,0 +1,14 @@ +genome: hg19 + +variant_calling_file: + class: File + path: "/data_small/small_vcf/NA12878.sorted.vcf" + +nodownload: true + +output_format: vcf + +data_dir: + class: Directory + location: "/data_small/snpEff_hg19/data" + diff --git a/tools/snpEff.cwl b/tools/snpEff.cwl new file mode 100644 index 000000000..2fd0e8d47 --- /dev/null +++ b/tools/snpEff.cwl @@ -0,0 +1,82 @@ +#!/usr/bin/env cwl-runner + +cwlVersion: v1.0 +class: CommandLineTool + +hints: + DockerRequirement: + dockerPull: quay.io/snpeff:4.3 + +requirements: + - class: InlineJavascriptRequirement + +inputs: + + data_dir: + type: Directory + inputBinding: + prefix: "-dataDir" + position: 1 + + no_stats: + type: boolean? + inputBinding: + prefix: "-noStats" + position: 2 + + csvStats: + type: boolean? + inputBinding: + prefix: "-csvStats" + position: 3 + + output_format: + type: + type: enum + symbols: [ vcf, gatk, bed, bedAnn ] + default: vcf + inputBinding: + prefix: -o + position: 4 + + nodownload: + type: boolean? + inputBinding: + prefix: -nodownload + position: 5 + + verbose: + type: boolean? + inputBinding: + prefix: -v + position: 6 + + genome: + type: string + inputBinding: + position: 7 + + variant_calling_file: + type: File + format: "http://edamontology.org/format_3016" + inputBinding: + position: 8 + +stdout: $(inputs.variant_calling_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + '.ann.vcf') + +outputs: + annotated_vcf: + type: stdout + + summary_html: + type: File? + outputBinding: + glob: "snpEff_summary.html" + + summary_txt: + type: File? + outputBinding: + glob: "snpEff_genes.txt" + +baseCommand: [ snpEff ] +arguments: [ "ann", "-stats", "snpEff_summary.html" ] diff --git a/tools/snpEff_Dockerfile b/tools/snpEff_Dockerfile new file mode 100644 index 000000000..7baa5fe92 --- /dev/null +++ b/tools/snpEff_Dockerfile @@ -0,0 +1,20 @@ +FROM java:8-jdk + +RUN apt-get update && apt-get install -y unzip wget + +WORKDIR /usr/local +RUN wget https://sourceforge.net/projects/snpeff/files/snpEff_v4_3_core.zip +RUN unzip snpEff_v4_3_core.zip +RUN rm snpEff_v4_3_core.zip + +RUN chmod a+x /usr/local/snpEff/scripts/snpEff + +ENV PATH /usr/local/snpEff/scripts:$PATH + +RUN mkdir /data +WORKDIR /data + +RUN groupadd -r -g 1000 ubuntu && useradd -r -g ubuntu -u 1000 ubuntu +USER ubuntu + +CMD ["/bin/bash"]