Skip to content
Snippets Groups Projects
Commit b4695209 authored by Adrian Zimmer's avatar Adrian Zimmer
Browse files

Dockerize + restructure kallisto_quant

parent a7581967
No related branches found
No related tags found
No related merge requests found
cores: 4
sh_script:
out_folder: ./kallisto_results
in_kallisto_index:
class: File
path: ../../workflows/kallisto_quant.sh
arc_root: /Users/dominikbrilhaus/gitlab_dataplant/samplearc_rnaseq
out_folder: runs/kallisto_quant/kallisto_results
in_kallisto_index: runs/kallisto_index/kallisto_index
in_fastq_folder: assays/Talinum_RNASeq_minimal/dataset
path: ../kallisto_index/out/kallisto_index
in_fastq_dir:
class: Directory
path: ../../assays/Talinum_RNASeq_minimal/dataset
kallisto_bootstrap: 100
kallisto_threads: 4
kallisto_fragmentLength: 200
......
#!/usr/bin/env cwl-runner
cwlVersion: v1.2.0-dev1
class: Workflow
inputs:
out_folder:
type: string
in_kallisto_index:
type: File
in_fastq_dir:
type: Directory
kallisto_bootstrap:
type: int
kallisto_threads:
type: int
kallisto_fragmentLength:
type: int
kallisto_stdDev:
type: int
outputs:
out_dir:
type:
type: array
items: Directory
outputSource: kallisto_quant/outdir
steps:
kallisto_quant:
run: ../../workflows/kallisto_quant/workflow.cwl
in:
out_folder: out_folder
in_kallisto_index: in_kallisto_index
in_fastq_dir: in_fastq_dir
kallisto_bootstrap: kallisto_bootstrap
kallisto_threads: kallisto_threads
kallisto_fragmentLength: kallisto_fragmentLength
kallisto_stdDev: kallisto_stdDev
out: [outdir]
\ No newline at end of file
......@@ -20,26 +20,25 @@
#### Read arguments from CLI
################################################
arc_root=$1
out_folder=$2
in_kallisto_index=$3
in_fastq_folder=$4
kallisto_bootstrap=$5
kallisto_threads=$6
kallisto_fragmentLength=$7
kallisto_stdDev=$8
out_folder=$1
in_kallisto_index=$2
in_fastq_folder=$3
kallisto_bootstrap=$4
kallisto_threads=$5
kallisto_fragmentLength=$6
kallisto_stdDev=$7
################################################
#### If it does not exist, create out dir
################################################
mkdir -p "$arc_root/$out_folder/"
mkdir -p "$out_folder"
################################################
#### Store fastq files in variable
################################################
fastq_files=$(ls "${arc_root}"/"${in_fastq_folder}"/*fastq*)
fastq_files=$(ls "${in_fastq_folder}"/*fastq*)
################################################
#### Loop over fastq files and quantify reads
......@@ -52,7 +51,7 @@ for j in $fastq_files; do
echo $sampleName
kallisto quant --single -b $kallisto_bootstrap -t $kallisto_threads -l $kallisto_fragmentLength -s $kallisto_stdDev -i "$arc_root/$in_kallisto_index" -o "$arc_root/$out_folder/$sampleName" $j
kallisto quant --single -b $kallisto_bootstrap -t $kallisto_threads -l $kallisto_fragmentLength -s $kallisto_stdDev -i "$in_kallisto_index" -o "$out_folder/$sampleName" $j
echo 'Kallisto done'
......
#!/usr/bin/env cwl-runner
cwlVersion: v1.2
cwlVersion: v1.2.0-dev1
class: CommandLineTool
hints:
DockerRequirement:
dockerPull: zlskidmore/kallisto:0.48.0
requirements:
- class: InitialWorkDirRequirement
listing:
- class: File
location: kallisto_quant.sh
baseCommand:
- bash
arguments:
- position: 0
valueFrom: ./kallisto_quant.sh
inputs:
- id: sh_script
type: File
inputBinding:
position: 0
- id: arc_root
- id: out_folder
type: string
inputBinding:
position: 1
- id: out_folder
type: string
- id: in_kallisto_index
type: File
inputBinding:
position: 2
- id: in_kallisto_index
type: string
- id: in_fastq_dir
type: Directory
inputBinding:
position: 3
- id: in_fastq_folder
type: string
inputBinding:
position: 4
- id: kallisto_bootstrap
type: int
inputBinding:
position: 5
position: 4
- id: kallisto_threads
type: int
inputBinding:
position: 6
position: 5
- id: kallisto_fragmentLength
type: int
inputBinding:
position: 7
position: 6
- id: kallisto_stdDev
type: int
inputBinding:
position: 8
position: 7
outputs:
- id: outdir
......@@ -48,6 +52,3 @@ outputs:
items: Directory
outputBinding:
glob: $(runtime.outdir)/$(inputs.out_folder)
baseCommand:
- bash
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment