Skip to content

Commit 12e6eb0

Browse files
committed
minor bugfixes
1 parent f0bf2d5 commit 12e6eb0

7 files changed

Lines changed: 42 additions & 8 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Suggests:
6262
covr,
6363
TxDb.Hsapiens.UCSC.hg19.knownGene,
6464
org.Hs.eg.db,
65+
AnnotationDbi,
6566
LinkingTo:
6667
Rcpp,
6768
RcppArmadillo

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ exportMethods(strandSpecific)
9797
exportMethods(workingDir)
9898
import(BiocParallel)
9999
import(data.table)
100+
importFrom(AnnotationDbi,select)
100101
importFrom(BBmisc,"%nin%")
101102
importFrom(BBmisc,chunk)
102103
importFrom(BBmisc,is.error)

R/FRASER-package.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
### Annotation
3333
#'
3434
#' @importFrom biomaRt useEnsembl getBM
35+
#' @importFrom AnnotationDbi select
3536
#'
3637
#'
3738
### Plotting

R/annotationOfRanges.R

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
#' @param GRCh GRCh version to connect to. If this is NULL, then the current
1919
#' GRCh38 is used. Otherwise, this can only be 37 (default) at the moment
2020
#' (see \code{\link{useEnsebml}}).
21-
#' @param txdb A TxDb object (default: TxDb.Hsapiens.UCSC.hg19.knownGene).
22-
#' @param orgDb An orgDb object (default: org.Hs.eg.db).
21+
#' @param txdb A TxDb object. If this is NULL, then the default one is used,
22+
#' currently this is TxDb.Hsapiens.UCSC.hg19.knownGene
23+
#' @param orgDb An orgDb object If this is NULL, then the default one is used,
24+
#' currently this is org.Hs.eg.db
2325
#'
2426
#' @return FraseRDataSet
2527
#'
@@ -87,13 +89,28 @@ annotateRanges <- function(fds, feature="hgnc_symbol", featureName=feature,
8789
#' @export
8890
annotateRangesWithTxDb <- function(fds, feature="SYMBOL",
8991
featureName="hgnc_symbol",
90-
txdb=TxDb.Hsapiens.UCSC.hg19.knownGene,
91-
orgDb=org.Hs.eg.db){
92+
txdb=NULL, orgDb=NULL){
9293

9394
# check input
9495
stopifnot(is(fds, "FraseRDataSet"))
9596
if(length(fds) == 0) return(fds)
9697

98+
if(is.null(txdb)){
99+
if(requireNamespace("TxDb.Hsapiens.UCSC.hg19.knownGene")){
100+
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
101+
} else{
102+
stop("Please provide a TxDb object as input.")
103+
}
104+
105+
}
106+
if(is.null(orgDb)){
107+
if(requireNamespace("org.Hs.eg.db")){
108+
orgDb <- org.Hs.eg.db
109+
} else{
110+
stop("Please provide an OrgDb object to extract gene symbols")
111+
}
112+
}
113+
97114
for(i in c("psi3", "psiSite")){
98115
# get GRanges object with the split reads which should be annotated
99116
gr <- rowRanges(fds, type=i)

R/methods-makeExampleObj.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
#' \code{makeFittedExampleFraseRDataSet} additionally runs the FRASER
66
#' pipeline.
77
#'
8+
#' @param workingDir directory where to store HDF5 and RDS files. Defaults to
9+
#' the current tempory R session folder.
10+
#' @param rerun Defaults to \code{FALSE}. If set to \code{TRUE} it reruns the
11+
#' full fit of the model.
12+
#'
813
#' @return FraseRDataSet
914
#'
1015
#' @examples

man/annotateRanges.Rd

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/makeExampleFraseRDataSet.Rd

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)