Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

Snpeff hocine #101

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions test/snpEff-job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
genome: hg19

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets not add test data for now; thanks though!

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"

82 changes: 82 additions & 0 deletions tools/snpEff.cwl
Original file line number Diff line number Diff line change
@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does snpEff accept the prefixed options in any order? Most tools do, so if that is true then just specify the prefix to inputBinding and drop the unneeded position.


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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

inputBinding:
prefix: -o
position: 4

nodownload:
type: boolean?
inputBinding:
prefix: -nodownload
position: 5

verbose:
type: boolean?
inputBinding:
prefix: -v
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would either always specify this (as an argument) or never include it.

position: 6

genome:
type: string
inputBinding:
position: 7

variant_calling_file:
type: File
format: "http://edamontology.org/format_3016"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

inputBinding:
position: 8

stdout: $(inputs.variant_calling_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + '.ann.vcf')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the goal of this line? Why not use a fixed file name or no name at all?


outputs:
annotated_vcf:
type: stdout

summary_html:
type: File?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this truly an optional output?

outputBinding:
glob: "snpEff_summary.html"

summary_txt:
type: File?
outputBinding:
glob: "snpEff_genes.txt"

baseCommand: [ snpEff ]
arguments: [ "ann", "-stats", "snpEff_summary.html" ]
20 changes: 20 additions & 0 deletions tools/snpEff_Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]