Skip to content

Commit

Permalink
Fixed warning on BBS
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixErnst committed Mar 19, 2024
1 parent 0f89d2a commit 39a45a2
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 17 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: Structstrings
Title: Implementation of the dot bracket annotations with Biostrings
Version: 1.19.0
Date: 2020-12-13
Version: 1.19.1
Date: 2024-03-19
Authors@R: person("Felix G.M.","Ernst",
email = "felix.gm.ernst@outlook.com",
role = c("aut", "cre"),
Expand Down Expand Up @@ -43,7 +43,7 @@ Suggests:
tRNAscanImport,
BiocStyle
VignetteBuilder: knitr
RoxygenNote: 7.1.1
RoxygenNote: 7.3.1
Collate:
'Structstrings.R'
'AllGenerics.R'
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Generated by roxygen2: do not edit by hand

S3method(add_colors,DotBracket)
export("dotbracket<-")
export(DB)
export(DBDF)
Expand Down
2 changes: 1 addition & 1 deletion R/Structstrings-DotBracketString.R
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ make_DOTBRACKET_COLORED_LETTERS <- function()
}

add_colors <- function(x) UseMethod("add_colors")
add_colors.default <- identity
#' @export
add_colors.DotBracket <- .add_DotBracket_colors

setMethod("show", "DotBracketString",
Expand Down
4 changes: 3 additions & 1 deletion R/Structstrings.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@
#' tRNA Genes." Nucleic Acids Research 37 (suppl_1): D159–D162.
#' \href{https://doi.org/10.1093/nar/gkn772}{doi:10.1093/nar/gkn772}.
#'
#' @docType package
#' @name Structstrings
NULL

#' @keywords internal
"_PACKAGE"

#' @useDynLib Structstrings
#' @import methods
#' @import S4Vectors
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Structstrings: implementation of the dot bracket annotations with Biostrings <img src="https://raw.githubusercontent.com/Bioconductor/BiocStickers/master/Structstrings/Structstrings.png" height="300" align="right">

<!-- badges: start -->
[![R-CMD-check](https://github.com/FelixErnst/Structstrings/workflows/R-CMD-check-bioc/badge.svg)](https://github.com/FelixErnst/Structstrings/actions?query=workflow:R-CMD-check-bioc)
[![R-CMD-check](https://github.com/FelixErnst/Structstrings/workflows/R-CMD-check-bioc-devel/badge.svg)](https://github.com/FelixErnst/EpiTxDb/actions/)
[![BioC Build](https://bioconductor.org/shields/build/devel/bioc/Structstrings.svg)](http://bioconductor.org/checkResults/devel/bioc-LATEST/Structstrings/)
[![codecov](https://codecov.io/gh/FelixErnst/Structstrings/branch/master/graph/badge.svg)](https://codecov.io/gh/FelixErnst/Structstrings)
[![BioC Years](https://bioconductor.org/shields/years-in-bioc/Structstrings.svg)](https://doi.org/doi:10.18129/B9.bioc.Structstrings)
Expand Down
22 changes: 22 additions & 0 deletions man/Structstrings-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/Structstrings.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 3 additions & 10 deletions src/DotBracketDataFrame_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ SEXP new_DotBracketDFrameList(SEXP unlistData, SEXP partitioning)
return ans;
}

long *get_base_pairing_per_char_pair(R_xlen_t length,
const char *str,
char bracket_open,
char bracket_close)
long *get_base_pairing_per_char_pair(R_xlen_t length, const char *str, char bracket_open, char bracket_close)
{
long *table, *stack, i,j,hx;

Expand All @@ -40,9 +37,7 @@ long *get_base_pairing_per_char_pair(R_xlen_t length,
} else if(str[i-1] == bracket_close){
j = stack[--hx];
if (hx<0) {
error("unbalanced '%s%s' brackets in dot bracket structure",
bracket_open,
bracket_close);
error("unbalanced '%s%s' brackets in dot bracket structure", bracket_open, bracket_close);
free(stack);
return NULL;
}
Expand All @@ -54,9 +49,7 @@ long *get_base_pairing_per_char_pair(R_xlen_t length,
}
free(stack);
if (hx != 0) {
error("unbalanced '%s%s' brackets in dot bracket structure",
bracket_open,
bracket_close);
error("unbalanced '%s%s' brackets in dot bracket structure", bracket_open, bracket_close);
return NULL;
}
return(table);
Expand Down
Binary file added src/Structstrings.so
Binary file not shown.

0 comments on commit 39a45a2

Please sign in to comment.