Skip to content

Commit

Permalink
Merge pull request #4 from fjrmoreews/variation
Browse files Browse the repository at this point in the history
Variation
  • Loading branch information
cjuigne authored Jun 5, 2020
2 parents e5aaf2c + e81d65c commit c11ed7e
Show file tree
Hide file tree
Showing 11 changed files with 1,389 additions and 13 deletions.
67 changes: 67 additions & 0 deletions Variation/job-variation_PE.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#fastp
reads_reverse:
- {class: File, path: ./data/SRR10903402/reverse.fastqsanger, format: http://edamontology.org/format_1931}
reads_forward:
- {class: File, path: ./data/SRR10903402/forward.fastqsanger, format: http://edamontology.org/format_1931}
min_length_required: 15
disable_trim_poly_g: false
force_polyg_tail_trimming: true
#samtools_view_filter
exclude_unmapped: false
count: false

reference_in:
class: File
path: ./data/covid19.fa
format: http://edamontology.org/format_1929
end_to_end_very_sensitive: true
bankfile:
class: File
path: ./data/NC_045512.2
genome_reference: covid19

#picard_MarkDuplicates
alignments_are_sorted: true
remove_duplicates: true
duplicate_scoring_strategy: SUM_OF_BASE_QUALITIES
optical_duplicate_pixel_distance: 100

#lofreq_call
min_cov: 50
max_depth: 1000000
min_bq: 30
min_alt_bq: 30
min_mq: 20
max_mq: 255
min_jq: 0
min_alt_jq: 0
def_alt_jq: 0
#pvalue_cutoff: 0.1
#bonferroni: 'dynamic'
threads: 1
call_indels: true

udLength: 0
formatEff: true
classic: true
inputFormat: vcf
outputFormat: vcf
importGenome: true

extractFields:
- "CHROM"
- "POS"
- "REF"
- "ALT"
- "DP"
- "AF"
- "SB"
- "DP4"
- "EFF[*].IMPACT"
- "EFF[*].FUNCLASS"
- "EFF[*].EFFECT"
- "EFF[*].GENE"
- "EFF[*].CODON"
empty_text: "."

IndexName: covid19.fa
49 changes: 49 additions & 0 deletions Variation/tools/bwa-index.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool

requirements:
DockerRequirement:
dockerPull: "quay.io/biocontainers/bwa:0.7.17--ha92aebf_3"
InlineJavascriptRequirement: {}

inputs:
InputFile:
type: File
format: edam:format_1929 # FASTA
inputBinding:
position: 200

IndexName:
type: string
inputBinding:
prefix: "-p"
#valueFrom: $(self + ".bwt")
#Optional arguments
algoType:
type:
- "null"
- type: enum
symbols:
- is
- bwtsw
inputBinding:
prefix: "-a"

baseCommand: [bwa, index]

outputs:
index:
type: File
secondaryFiles:
# - $(inputs.IndexName).bwt.bwt
- $(inputs.IndexName).sa
- $(inputs.IndexName).pac
- $(inputs.IndexName).ann
- $(inputs.IndexName).amb
outputBinding:
glob: $(inputs.IndexName).bwt
$namespaces:
edam: http://edamontology.org/
$schemas:
- http://edamontology.org/EDAM_1.18.owl
134 changes: 134 additions & 0 deletions Variation/tools/bwa-mem.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool

requirements:
DockerRequirement:
dockerPull: "quay.io/biocontainers/bwa:0.7.17--ha92aebf_3"

inputs:
InputFile:
type: File[]
format:
- edam:format_1930 # FASTA
- edam:format_1931 # FASTQ
inputBinding:
position: 201

Index:
type: File
inputBinding:
position: 200
secondaryFiles:
- .fai
- .amb
- .ann
- .bwt
- .pac
- .sa

#Optional arguments

Threads:
type: int?
inputBinding:
prefix: "-t"

MinSeedLen:
type: int?
inputBinding:
prefix: "-k"

BandWidth:
type: int?
inputBinding:
prefix: "-w"

ZDropoff:
type: int?
inputBinding:
prefix: "-d"

SeedSplitRatio:
type: float?
inputBinding:
prefix: "-r"

MaxOcc:
type: int?
inputBinding:
prefix: "-c"

MatchScore:
type: int?
inputBinding:
prefix: "-A"

MmPenalty:
type: int?
inputBinding:
prefix: "-B"

GapOpenPen:
type: int?
inputBinding:
prefix: "-O"

GapExtPen:
type: int?
inputBinding:
prefix: "-E"

ClipPen:
type: int?
inputBinding:
prefix: "-L"

UnpairPen:
type: int?
inputBinding:
prefix: "-U"

RgLine:
type: string?
inputBinding:
prefix: "-R"

VerboseLevel:
type: int?
inputBinding:
prefix: "-v"

isOutSecAlign:
type: boolean?
inputBinding:
prefix: "-a"

isMarkShortSplit:
type: boolean?
inputBinding:
prefix: "-M"

isUseHardClip:
type: boolean?
inputBinding:
prefix: "-H"

isMultiplexedPair:
type: boolean?
inputBinding:
prefix: "-p"


baseCommand: [bwa, mem]

stdout: unsorted_reads.sam

outputs:
reads_stdout:
type: stdout
format: edam:format_2572
$namespaces:
edam: http://edamontology.org/
$schemas:
- http://edamontology.org/EDAM_1.18.owl
26 changes: 16 additions & 10 deletions Variation/tools/fastp.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ doc: |
Modified from https://github.com/nigyta/bact_genome/blob/master/cwl/tool/fastp/fastp.cwl
requirements:
InlineJavascriptRequirement: {}
hints:
DockerRequirement:
dockerPull: quay.io/biocontainers/fastp:0.20.0--hdbcaa40_0

baseCommand: [fastp]

arguments:
- -o
- $(inputs.fastq1.nameroot).fastp.fastq
- prefix: -o
valueFrom: $(inputs.fastq1.nameroot).fastp.fastq
- |
${
if (inputs.fastq2){
Expand All @@ -34,9 +35,15 @@ arguments:
inputs:
fastq1:
type: File
format:
- edam:format_1930 # FASTA
- edam:format_1931 # FASTQ
inputBinding:
prefix: -i
fastq2:
format:
- edam:format_1930 # FASTA
- edam:format_1931 # FASTQ
type: File?
inputBinding:
prefix: -I
Expand Down Expand Up @@ -80,19 +87,14 @@ inputs:
outputs:
out_fastq1:
type: File
format: $(inputs.fastq1.format)
outputBinding:
glob: $(inputs.fastq1.nameroot).fastp.fastq
out_fastq2:
type: File?
format: $(inputs.fastq2.format)
outputBinding:
glob: |
${
if (inputs.fastq2){
return inputs.fastq2.nameroot + ".fastp.fastq"
} else {
return 'no_file'
}
}
glob: $(inputs.fastq2.nameroot).fastp.fastq
html_report:
type: File
outputBinding:
Expand All @@ -102,3 +104,7 @@ outputs:
outputBinding:
glob: fastp.json

$namespaces:
edam: http://edamontology.org/
$schemas:
- http://edamontology.org/EDAM_1.18.owl
35 changes: 35 additions & 0 deletions Variation/tools/get_secondaryfiles.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
class: CommandLineTool
cwlVersion: v1.0
requirements:
InlineJavascriptRequirement: {}
InitialWorkDirRequirement:
listing:
- $(inputs.sequence)
- $(inputs.bwa_index)
baseCommand: [ls]
inputs:
sequence:
type: File
secondaryFiles: .fai

bwa_index:
type: File
secondaryFiles:
- $(self.nameroot).ann
- $(self.nameroot).amb
- $(self.nameroot).pac
- $(self.nameroot).sa

outputs:
sequences_with_index:
type: File
secondaryFiles:
- $(inputs.bwa_index.nameroot).bwt
- $(inputs.bwa_index.nameroot).sa
- $(inputs.bwa_index.nameroot).pac
- $(inputs.bwa_index.nameroot).ann
- $(inputs.bwa_index.nameroot).amb
- $(inputs.sequence.basename).fai
outputBinding:
glob: $(inputs.sequence.basename)

18 changes: 18 additions & 0 deletions Variation/tools/mergetab.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
cwlVersion: v1.0
class: CommandLineTool
requirements:
InlineJavascriptRequirement: {}
baseCommand: [ls]
inputs:
out_fastq1: File
out_fastq2: File
outputs:
tab:
type: File[]
outputBinding:
outputEval: |
${var tab=[]
tab.push(inputs.out_fastq1)
tab.push(inputs.out_fastq2)
return tab;
}
Loading

0 comments on commit c11ed7e

Please sign in to comment.