-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3af66f8
commit 6ddfd7d
Showing
3 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |