Skip to content

Commit

Permalink
complete script for qualimap
Browse files Browse the repository at this point in the history
  • Loading branch information
dorien-er committed Jun 7, 2024
1 parent 9a6730f commit e9dbe7c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 29 deletions.
29 changes: 10 additions & 19 deletions src/qualimap/qualimap_rnaseq/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,22 @@ argument_groups:

- name: "Output"
arguments:
- name: "--output_dir"
- name: "--output"
direction: output
type: file
required: false
default: $id.qualimap_output
description: path to output directory for raw data and report.
- name: "--output_pdf"
type: file
direction: output
required: false
must_exist: false
default: $id.report.pdf
description: path to output file for pdf report.
- name: "--output_format"
type: string
required: false
default: html
description: Format of the output report (PDF or HTML, default is HTML)
required: true
example: rnaseq_qc_results.txt
description: Text file containing the RNAseq QC results.
- name: "--output_counts"
type: file
required: false
description: Output file for computed counts. If only name of the file is provided, then the file will be saved in the output folder.
- name: "--output_file"
direction: output
description: Output file for computed counts.
- name: "--output_report"
type: file
direction: output
required: false
description: Output file for PDF report (default value is report.pdf).
description: PDF report output file.

- name: "Optional"
arguments:
Expand Down Expand Up @@ -86,6 +76,7 @@ argument_groups:
default: 4G
description: maximum Java heap memory size, default = 4G.


resources:
- type: bash_script
path: script.sh
Expand Down
35 changes: 25 additions & 10 deletions src/qualimap/qualimap_rnaseq/script.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,37 @@
#!/bin/bash

sleep 10000

set -eo pipefail

mkdir -p $par_output_dir
tmp_dir=$(mktemp -d -p "$meta_temp_dir" qualimap_XXXXXXXXX)


if [ -n "$par_output_file" ]; then
outfile=$(basename "$par_output_file")
fi

if [ -n "$par_output_counts" ]; then
counts=$(basename "$par_output_counts")
fi

qualimap rnaseq \
# --algorithm=$par_algorithm \
--java-mem-size=$par_java_memory_size \
--algorithm $par_algorithm \
--num-pr-bases $par_pr_bases \
--num-tr-bias $par_tr_bias \
--sequencing-protocol $par_sequencing_protocol \
-bam $par_input \
-gtf $par_gtf \
${par_paired:+-pe} \
${par_sorted:+-s} \
-outdir $par_output_dir \
# -oc $par_output_counts \
# -outfile $par_output_file \
-outformat $par_output_format
-outdir "$tmp_dir" \
-outformat pdf \
${par_output_file:+-outfile "$outfile"} \
${par_output_counts:+-oc "$counts"}

mv "$tmp_dir/rnaseq_qc_results.txt" "$par_output"

if [ -n "$par_output_file" ]; then
mv "$tmp_dir/$outfile" "$par_output_file"
fi

if [ -n "$par_output_counts" ]; then
mv "$tmp_dir/$counts" "$par_output_counts"
fi

0 comments on commit e9dbe7c

Please sign in to comment.