Skip to content

Commit

Permalink
Upgrade mapping_quality_stats tool (#665)
Browse files Browse the repository at this point in the history
* Update sample.bam

* bump versions and fix tool dev url

* update test in mississippi

* Update pr.yaml

* Update mapping_quality_stats.r
  • Loading branch information
drosofff authored Feb 10, 2024
1 parent 1bcc034 commit 2661225
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ jobs:
- name: lintr
run: |
library(lintr)
linters <- linters_with_defaults(line_length_linter = NULL, cyclocomp_linter = NULL, object_usage_linter = NULL, object_name_linter = NULL)
linters <- linters_with_defaults(indentation_linter(indent = 4L), line_length_linter = NULL, cyclocomp_linter = NULL, object_usage_linter = NULL, object_name_linter = NULL)
con <- file("repository_list.txt", "r")
status <- 0
while (TRUE) {
Expand Down
2 changes: 1 addition & 1 deletion tools/mapping_quality_stats/.shed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ categories:
- Statistics

homepage_url: http://artbio.fr
remote_repository_url: https://github.com/ARTbio/tools-artbio/tree/master/tools/mapping_quality_stats
remote_repository_url: https://github.com/ARTbio/tools-artbio/tree/main/tools/mapping_quality_stats
toolshed:
- toolshed

10 changes: 5 additions & 5 deletions tools/mapping_quality_stats/mapping_quality_stats.r
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## Setup R error handling to go to stderr
options(show.error.messages = FALSE,
error = function() {
cat(geterrmessage(), file = stderr())
q("no", 1, FALSE)
}
error = function() {
cat(geterrmessage(), file = stderr())
q("no", 1, FALSE)
}
)


Expand All @@ -14,7 +14,7 @@ library(ggplot2)
option_list <- list(
make_option(c("-i", "--input"), type = "character", help = "Path to tabular file"),
make_option(c("-o", "--output"), type = "character", help = "path to the pdf plot")
)
)

parser <- OptionParser(usage = "%prog [options] file", option_list = option_list)
args <- parse_args(parser)
Expand Down
19 changes: 12 additions & 7 deletions tools/mapping_quality_stats/mapping_quality_stats.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
<tool id="mapqstatistics" name="Mapping Quality Stats" version="0.19.1+galaxy0">
<description></description>
<requirements>
<requirement type="package" version="1.7.1">r-optparse</requirement>
<requirement type="package" version="3.3.6">r-ggplot2</requirement>
<requirement type="package" version="0.19.1">pysam</requirement>
</requirements>
<tool id="mapqstatistics" name="Mapping Quality Stats" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
<description></description>
<macros>
<token name="@TOOL_VERSION@">0.22.0</token>
<token name="@VERSION_SUFFIX@">0</token>
<token name="@PROFILE@">23.0</token>
</macros>
<requirements>
<requirement type="package" version="1.7.4">r-optparse</requirement>
<requirement type="package" version="3.4.4">r-ggplot2</requirement>
<requirement type="package" version="@TOOL_VERSION@">pysam</requirement>
</requirements>
<stdio>
<exit_code range="1:" level="fatal" description="Tool exception" />
</stdio>
Expand Down
Binary file modified tools/mapping_quality_stats/test-data/distribution.pdf
Binary file not shown.
41 changes: 19 additions & 22 deletions tools/mapping_quality_stats/test-data/distribution.tab
Original file line number Diff line number Diff line change
@@ -1,32 +1,29 @@
mapq number_of_alignments
0 54
0 33
6 1
8 2
12 1
14 2
16 1
17 1
21 3
23 1
24 1
25 1
30 2
33 6
40 9
44 2
45 9
46 6
47 180
48 196
49 60
50 17
51 7
52 11
53 4
54 6
33 2
40 1
44 1
45 3
46 3
47 105
48 103
49 26
50 14
51 1
52 8
53 2
54 4
55 1
56 8
57 9
58 10
59 10
60 10496
56 5
57 2
58 6
59 4
60 5273
Binary file modified tools/mapping_quality_stats/test-data/sample.bam
Binary file not shown.

0 comments on commit 2661225

Please sign in to comment.