Skip to content

Commit

Permalink
adjust argument names, reduce test data size
Browse files Browse the repository at this point in the history
  • Loading branch information
emmarousseau committed Oct 1, 2024
1 parent e2b3458 commit 10549b2
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 33 deletions.
12 changes: 6 additions & 6 deletions src/rseqc/rseqc_bamstat/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ authors:
argument_groups:
- name: "Input"
arguments:
- name: "--input"
- name: "--input_file"
alternatives: -i
type: file
required: true
description: Input alignment file in BAM or SAM format.
- name: "--map_qual"
- name: "--mapq"
alternatives: -q
type: integer
example: 30
description: |
Expand All @@ -45,10 +47,8 @@ test_resources:

engines:
- type: docker
image: ubuntu:22.04
setup:
- type: apt
packages: [ python3-pip ]
image: python:3.10
setup:
- type: python
packages: [ RSeQC ]
- type: docker
Expand Down
4 changes: 2 additions & 2 deletions src/rseqc/rseqc_bamstat/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
set -eo pipefail

bam_stat.py \
--input "${par_input}" \
${par_map_qual:+--mapq "${par_map_qual}"} \
--input-file "${par_input_file}" \
${par_mapq:+--mapq "${par_mapq}"} \
> $par_output
10 changes: 5 additions & 5 deletions src/rseqc/rseqc_bamstat/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

# define input and output for script

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

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

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

exit_code=$?
Expand All @@ -26,15 +26,15 @@ diff "$meta_resources_dir/test_data/ref_output.txt" "$meta_resources_dir/$output

echo ">>> Test 2: Test with non-default mapping quality threshold"

output_summary="mapping_quality_mapq_30.txt"
output_summary="mapping_quality_mapq_50.txt"

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

"$meta_executable" \
--input "$meta_resources_dir/test_data/$input_bam" \
--input_file "$meta_resources_dir/test_data/$input_bam" \
--output "$output_summary" \
--map_qual 50
--mapq 50

exit_code=$?
[[ $exit_code != 0 ]] && echo "Non zero exit code: $exit_code" && exit 1
Expand Down
20 changes: 10 additions & 10 deletions src/rseqc/rseqc_bamstat/test_data/ref_output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
#All numbers are READ count
#==================================================

Total records: 200
Total records: 90

QC failed: 0
Optical/PCR duplicate: 0
Non primary hits 0
Unmapped reads: 3
mapq < mapq_cut (non-unique): 1
Unmapped reads: 1
mapq < mapq_cut (non-unique): 0

mapq >= mapq_cut (unique): 196
Read-1: 99
Read-2: 97
Reads map to '+': 98
Reads map to '-': 98
Non-splice reads: 196
mapq >= mapq_cut (unique): 89
Read-1: 45
Read-2: 44
Reads map to '+': 44
Reads map to '-': 45
Non-splice reads: 89
Splice reads: 0
Reads mapped in proper pairs: 192
Reads mapped in proper pairs: 88
Proper-paired reads map to different chrom:0
20 changes: 10 additions & 10 deletions src/rseqc/rseqc_bamstat/test_data/ref_output_mapq.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
#All numbers are READ count
#==================================================

Total records: 200
Total records: 90

QC failed: 0
Optical/PCR duplicate: 0
Non primary hits 0
Unmapped reads: 3
mapq < mapq_cut (non-unique): 20
Unmapped reads: 1
mapq < mapq_cut (non-unique): 6

mapq >= mapq_cut (unique): 177
Read-1: 88
Read-2: 89
Reads map to '+': 96
Reads map to '-': 81
Non-splice reads: 177
mapq >= mapq_cut (unique): 83
Read-1: 42
Read-2: 41
Reads map to '+': 44
Reads map to '-': 39
Non-splice reads: 83
Splice reads: 0
Reads mapped in proper pairs: 175
Reads mapped in proper pairs: 83
Proper-paired reads map to different chrom:0
Binary file added src/rseqc/rseqc_bamstat/test_data/sample.bam
Binary file not shown.
Binary file not shown.

0 comments on commit 10549b2

Please sign in to comment.