Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
emmarousseau committed Sep 23, 2024
1 parent 3af66f8 commit 6ddfd7d
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 0 deletions.
59 changes: 59 additions & 0 deletions src/rseqc/rseqc_bamstat/config.vsh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: rseqc_bamstat
namespace: rseqc
keywords: [ rnaseq, genomics ]
description: Generate statistics from a bam file.
links:
homepage: https://rseqc.sourceforge.net/
documentation: https://rseqc.sourceforge.net/#bam-stat-py
issue_tracker: https://github.com/MonashBioinformaticsPlatform/RSeQC/issues
repository: https://github.com/MonashBioinformaticsPlatform/RSeQC
references:
doi: 10.1093/bioinformatics/bts356
license: GPL-3.0
authors:
- __merge__: /src/_authors/emma_rousseau.yaml
roles: [ author, maintainer ]

argument_groups:
- name: "Input"
arguments:
- name: "--input"
type: file
required: true
description: input alignment file in BAM or SAM format

- name: "--map_qual"
type: integer
required: false
default: 30
description: Minimum mapping quality (phred scaled) to determine uniquely mapped reads, default=30.
min: 0

- name: "Output"
arguments:
- name: "--output"
type: file
direction: output
required: false
default: $id.mapping_quality.txt
description: output file (txt) with mapping quality statistics

resources:
- type: bash_script
path: script.sh
test_resources:
- type: bash_script
path: test.sh
- path: /testData/unit_test_resources/sarscov2/test.paired_end.sorted.bam

engines:
- type: docker
image: ubuntu:22.04
setup:
- type: apt
packages: [ python3-pip ]
- type: python
packages: [ RSeQC ]
runners:
- type: executable
- type: nextflow
8 changes: 8 additions & 0 deletions src/rseqc/rseqc_bamstat/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

set -eo pipefail

bam_stat.py \
--input $par_input \
--mapq $par_map_qual \
> $par_output
23 changes: 23 additions & 0 deletions src/rseqc/rseqc_bamstat/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

# define input and output for script

input_bam="test.paired_end.sorted.bam"
output_summary="mapping_quality.txt"

# run executable and tests
echo "> Running $meta_functionality_name."

"$meta_executable" \
--input "$meta_resources_dir/$input_bam" \
--output "$output_summary"

exit_code=$?
[[ $exit_code != 0 ]] && echo "Non zero exit code: $exit_code" && exit 1

echo ">> Checking whether output can be found and has content"

[ ! -f "$output_summary" ] && echo "$output_summary file missing" && exit 1
[ ! -s "$output_summary" ] && echo "$output_summary file is empty" && exit 1

exit 0

0 comments on commit 6ddfd7d

Please sign in to comment.