Skip to content

Commit

Permalink
v1.11.9 -- update docs
Browse files Browse the repository at this point in the history
* Ran `usethis::use_roxygen_md()` + `roxygen2md::roxygen2md()` + `devtools::document()`
* Fixed the roxygen tag for an internal function
  • Loading branch information
lcolladotor committed Aug 27, 2019
1 parent a6f1918 commit 6c56fe8
Show file tree
Hide file tree
Showing 47 changed files with 369 additions and 365 deletions.
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: recount
Title: Explore and download data from the recount project
Version: 1.11.8
Date: 2019-07-01
Version: 1.11.9
Date: 2019-08-27
Authors@R: c(person("Leonardo", "Collado-Torres", role = c("aut", "cre"),
email = "[email protected]", comment = c(ORCID = "0000-0003-2140-308X")),
person("Abhinav", "Nellore", role = "ctb",
Expand Down Expand Up @@ -71,3 +71,4 @@ BugReports: https://support.bioconductor.org/t/recount/
biocViews: Coverage, DifferentialExpression, GeneExpression, RNASeq, Sequencing,
Software, DataImport, ImmunoOncology
RoxygenNote: 6.1.1
Roxygen: list(markdown = TRUE)
14 changes: 7 additions & 7 deletions R/abstract_search.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
#' package.
#'
#' @param query A character vector with the text to search for via
#' \link[base]{grep} in the abstract info available at \link{recount_abstract}.
#' [grep][base::grep] in the abstract info available at [recount_abstract].
#' @param id_only Whether to only return the project id or to return summary
#' information for the project(s) that match the query.
#' @param ... Additional arguments passed to \link[base]{grep}.
#' @param ... Additional arguments passed to [grep][base::grep].
#'
#' @return If \code{id_only = TRUE} it returns a character vector with the
#' project SRA ids (accession numbers). If \code{id_only = FALSE} it returns a
#' subset of \link{recount_abstract} for the abstracts that contained the query.
#' @return If `id_only = TRUE` it returns a character vector with the
#' project SRA ids (accession numbers). If `id_only = FALSE` it returns a
#' subset of [recount_abstract] for the abstracts that contained the query.
#'
#' @details Both the query and the abstracts are searched in lower case.
#'
#' For a more powerful search use the recount project website at
#' \url{https://jhubiostatistics.shinyapps.io/recount/}.
#' <https://jhubiostatistics.shinyapps.io/recount/>.
#'
#' @seealso \link{browse_study}, \link{recount_abstract}
#' @seealso [browse_study], [recount_abstract]
#'
#' @author Leonardo Collado-Torres
#' @export
Expand Down
34 changes: 17 additions & 17 deletions R/add_metadata.R
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
#' Add additional curated metadata to a recount rse object
#'
#' This function appends sample metadata information to a
#' \link[SummarizedExperiment]{RangedSummarizedExperiment-class} from the
#' [RangedSummarizedExperiment-class][SummarizedExperiment::RangedSummarizedExperiment-class] from the
#' recount2 project. The sample metadata comes from curated efforts
#' independent from the original recount2 project. Currently the only
#' information comes from the recount_brain project described in more detail
#' at \url{http://lieberinstitute.github.io/recount-brain/}.
#' at <http://lieberinstitute.github.io/recount-brain/>.
#'
#'
#' @param rse A \link[SummarizedExperiment]{RangedSummarizedExperiment-class}
#' object as downloaded with \link{download_study}. If this argument is
#' @param rse A [RangedSummarizedExperiment-class][SummarizedExperiment::RangedSummarizedExperiment-class]
#' object as downloaded with [download_study]. If this argument is
#' not specified, the function will return the raw metadata table.
#' @param source A valid source name. The only supported options at this
#' moment are \code{recount_brain_v1} and \code{recount_brain_v2}.
#' @param is_tcga Set to \code{TRUE} only when \code{rse} is from TCGA.
#' Otherwise set to \code{FALSE} (default).
#' @param verbose If \code{TRUE} it will print a message of where the
#' moment are `recount_brain_v1` and `recount_brain_v2`.
#' @param is_tcga Set to `TRUE` only when `rse` is from TCGA.
#' Otherwise set to `FALSE` (default).
#' @param verbose If `TRUE` it will print a message of where the
#' predictions file is being downloaded to.
#'
#' @return A \link[SummarizedExperiment]{RangedSummarizedExperiment-class}
#' object with the sample metadata columns appended to the \code{colData()}
#' @return A [RangedSummarizedExperiment-class][SummarizedExperiment::RangedSummarizedExperiment-class]
#' object with the sample metadata columns appended to the `colData()`
#' slot.
#'
#' @details
#' For \code{source = "recount_brain_v1"} and
#' \code{source = "recount_brain_v2"}, the metadata columns are
#' described at \url{http://lieberinstitute.github.io/recount-brain/}.
#' Alternatively, you can explore \code{recount_brain_v2} interactively at
#' \url{https://jhubiostatistics.shinyapps.io/recount-brain/}.
#' For `source = "recount_brain_v1"` and
#' `source = "recount_brain_v2"`, the metadata columns are
#' described at <http://lieberinstitute.github.io/recount-brain/>.
#' Alternatively, you can explore `recount_brain_v2` interactively at
#' <https://jhubiostatistics.shinyapps.io/recount-brain/>.
#'
#' If you use the recount_brain data please cite the Razmara et al.
#' bioRxiv, 2019 \url{https://www.biorxiv.org/content/10.1101/618025v1}.
#' bioRxiv, 2019 <https://www.biorxiv.org/content/10.1101/618025v1>.
#' A bib file is available via citation('recount')[5].
#'
#'
#' @references
#' Razmara et al, bioRxiv, 2019.
#' \url{https://www.biorxiv.org/content/10.1101/618025v1}
#' <https://www.biorxiv.org/content/10.1101/618025v1>
#'
#' @author Leonardo Collado-Torres
#' @export
Expand Down
24 changes: 12 additions & 12 deletions R/add_predictions.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
#' Shannon Ellis et al (2017) predicted phenotypes based on expression data for
#' the samples in the recount2 project. Using this function you can add the
#' predictions to a
#' \link[SummarizedExperiment]{RangedSummarizedExperiment-class} object
#' to the \code{colData()} slot.
#' [RangedSummarizedExperiment-class][SummarizedExperiment::RangedSummarizedExperiment-class] object
#' to the `colData()` slot.
#'
#' @param rse A \link[SummarizedExperiment]{RangedSummarizedExperiment-class}
#' object as downloaded with \link{download_study}. If this argument is
#' @param rse A [RangedSummarizedExperiment-class][SummarizedExperiment::RangedSummarizedExperiment-class]
#' object as downloaded with [download_study]. If this argument is
#' not specified, the function will return the full predictions table.
#' @param is_tcga Set to \code{TRUE} only when \code{rse} is from TCGA.
#' Otherwise set to \code{FALSE} (default).
#' @param is_tcga Set to `TRUE` only when `rse` is from TCGA.
#' Otherwise set to `FALSE` (default).
#' @param version The version number for the predicted phenotypes data. It has
#' to match one of the available numbers at
#' \url{https://github.com/leekgroup/recount-website/blob/master/predictions/}.
#' <https://github.com/leekgroup/recount-website/blob/master/predictions/>.
#' Feel free to check if there is a newer version than the default. The version
#' used is printed as part of the file name.
#' @param verbose If \code{TRUE} it will print a message of where the
#' @param verbose If `TRUE` it will print a message of where the
#' predictions file is being downloaded to.
#'
#' @return A \link[SummarizedExperiment]{RangedSummarizedExperiment-class}
#' object with the prediction columns appended to the \code{colData()} slot.
#' @return A [RangedSummarizedExperiment-class][SummarizedExperiment::RangedSummarizedExperiment-class]
#' object with the prediction columns appended to the `colData()` slot.
#' The predicted phenotypes are:
#' \describe{
#' \item{sex }{ male or female,}
Expand All @@ -31,8 +31,8 @@
#' For each of the predicted phenotypes there are several columns as described
#' next:
#' \describe{
#' \item{reported_phenotype }{ \code{NA} when not available,}
#' \item{predicted_phenotype }{ \code{NA} when we did not predict, "Unassigned"
#' \item{reported_phenotype }{ `NA` when not available,}
#' \item{predicted_phenotype }{ `NA` when we did not predict, "Unassigned"
#' when prediction was ambiguous,}
#' \item{accuracy_phenotype }{ accuracy is assigned per dataset based on
#' comparison to samples for which we had reported phenotype information so
Expand Down
12 changes: 6 additions & 6 deletions R/all_metadata.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
#' Download the metadata from all the projects. This can be useful for finding
#' samples of interests across all projects.
#'
#' @param subset Either \code{sra}, \code{gtex} or \code{tcga}. Specifies
#' @param subset Either `sra`, `gtex` or `tcga`. Specifies
#' which metadata file to download.
#' @param verbose If \code{TRUE} it will print a message of where the file is
#' @param verbose If `TRUE` it will print a message of where the file is
#' being downloaded to.
#'
#' @return A \link[S4Vectors]{DataFrame-class} object with the phenotype
#' @return A [DataFrame-class][S4Vectors::DataFrame-class] object with the phenotype
#' metadata.
#'
#' @author Leonardo Collado-Torres
Expand All @@ -20,17 +20,17 @@
#'
#' metadata <- all_metadata()
#'
#' @details Note that for \code{subset = 'gtex'}, there are more variables than
#' @details Note that for `subset = 'gtex'`, there are more variables than
#' the ones we have for 'sra'. This information corresponds to file
#' GTEx_Data_V6_Annotations_SampleAttributesDS.txt available at
#' \url{http://www.gtexportal.org/home/datasets}. There you can find the
#' <http://www.gtexportal.org/home/datasets>. There you can find the
#' information describing these variables.
#'
#' For TCGA we acquired metadata information from 3 different sources:
#' - GDC: via a json query
#' - CGC: via json queries and a custom script to merge the tables
#' - TCGAbiolinks: we used to to parse GDC's XML files
#' For more information, check \url{https://github.com/leekgroup/recount-website/tree/master/metadata/tcga_prep}.
#' For more information, check <https://github.com/leekgroup/recount-website/tree/master/metadata/tcga_prep>.
#'

all_metadata <- function(subset = 'sra', verbose = TRUE) {
Expand Down
2 changes: 1 addition & 1 deletion R/browse_study.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#'
#' @author Leonardo Collado-Torres
#' @export
#' @seealso \link{abstract_search}
#' @seealso [abstract_search]
#'
#' @importFrom utils browseURL
#'
Expand Down
50 changes: 25 additions & 25 deletions R/coverage_matrix.R
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
#' Given a set of regions for a chromosome, compute the coverage matrix for a
#' given SRA study.
#'
#' Given a set of genomic regions as created by \link{expressed_regions}, this
#' Given a set of genomic regions as created by [expressed_regions], this
#' function computes the coverage matrix for a library size of 40 million 100 bp
#' reads for a given SRA study.
#'
#' @inheritParams expressed_regions
#' @param regions A \link[GenomicRanges]{GRanges-class} object with regions
#' for \code{chr} for which to calculate the coverage matrix.
#' @param regions A [GRanges-class][GenomicRanges::GRanges-class] object with regions
#' for `chr` for which to calculate the coverage matrix.
#' @param chunksize A single integer vector defining the chunksize to use for
#' computing the coverage matrix. Regions will be split into different chunks
#' which can be useful when using a parallel instance as defined by
#' \code{bpparam}.
#' @param bpparam A \link[BiocParallel]{BiocParallelParam-class} instance which
#' `bpparam`.
#' @param bpparam A [BiocParallelParam-class][BiocParallel::BiocParallelParam-class] instance which
#' will be used to calculate the coverage matrix in parallel. By default,
#' \link[BiocParallel]{SerialParam-class} will be used.
#' @param verboseLoad If \code{TRUE} basic status updates for loading the data
#' [SerialParam-class][BiocParallel::SerialParam-class] will be used.
#' @param verboseLoad If `TRUE` basic status updates for loading the data
#' will be printed.
#' @param scale If \code{TRUE}, the coverage counts will be scaled to read
#' counts based on a library size of 40 million reads. Set \code{scale} to
#' \code{FALSE} if you want the raw coverage counts. The scaling method is by
#' AUC, as in the default option of \link{scale_counts}.
#' @param round If \code{TRUE}, the counts are rounded to integers. Set to
#' \code{TRUE} if you want to match the defaults of \link{scale_counts}.
#' @param scale If `TRUE`, the coverage counts will be scaled to read
#' counts based on a library size of 40 million reads. Set `scale` to
#' `FALSE` if you want the raw coverage counts. The scaling method is by
#' AUC, as in the default option of [scale_counts].
#' @param round If `TRUE`, the counts are rounded to integers. Set to
#' `TRUE` if you want to match the defaults of [scale_counts].
#'
#'
#' @return A \link[SummarizedExperiment]{RangedSummarizedExperiment-class}
#' @return A [RangedSummarizedExperiment-class][SummarizedExperiment::RangedSummarizedExperiment-class]
#' object with the counts stored in the assays slot.
#'
#' @details When using \code{outdir = NULL} the information will be accessed
#' @details When using `outdir = NULL` the information will be accessed
#' from the web on the fly. If you encounter internet access problems, it might
#' be best to first download the BigWig files using \link{download_study}. This
#' be best to first download the BigWig files using [download_study]. This
#' might be the best option if you are accessing all chromosomes for a given
#' project and/or are thinking of using different sets of \code{regions} (for
#' example, from different cutoffs applied to \link{expressed_regions}).
#' Alternatively check the \code{SciServer} section on the vignette to see
#' project and/or are thinking of using different sets of `regions` (for
#' example, from different cutoffs applied to [expressed_regions]).
#' Alternatively check the `SciServer` section on the vignette to see
#' how to access all the recount data via a R Jupyter Notebook.
#'
#' If you have \code{bwtool} installed, you can use
#' \url{https://github.com/LieberInstitute/recount.bwtool} for faster results.
#' Note that you will need to run \link{scale_counts} after running
#' \code{coverage_matrix_bwtool()}.
#' If you have `bwtool` installed, you can use
#' <https://github.com/LieberInstitute/recount.bwtool> for faster results.
#' Note that you will need to run [scale_counts] after running
#' `coverage_matrix_bwtool()`.
#'
#' @author Leonardo Collado-Torres
#' @export
Expand All @@ -49,8 +49,8 @@
#' @import derfinder GenomicRanges RCurl BiocParallel
#' SummarizedExperiment S4Vectors
#'
#' @seealso \link{download_study}, \link[derfinder]{findRegions},
#' \link[derfinder]{railMatrix}
#' @seealso [download_study], [findRegions][derfinder::findRegions],
#' [railMatrix][derfinder::railMatrix]
#'
#' @examples
#'
Expand Down
18 changes: 9 additions & 9 deletions R/download_retry.R
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
#' Retry multiple times to download a file
#'
#' This function is based on the Bioconductor guidelines for querying data from
#' the web at \url{http://bioconductor.org/developers/how-to/web-query/}. It
#' will run \link[downloader]{download} a set of \code{N.TRIES} times before
#' the web at <http://bioconductor.org/developers/how-to/web-query/>. It
#' will run [download][downloader::download] a set of `N.TRIES` times before
#' giving up. We implemented this function to reduce the number of Bioconductor
#' build errors due to the occassional errors from our data hosting server.
#'
#' @param url The URL to download. Passed to \link[downloader]{download}.
#' @param url The URL to download. Passed to [download][downloader::download].
#' @param destfile The destination file. Defaults to the base name of the URL.
#' Passed to \link[downloader]{download}.
#' @param mode Mode for writing the file. The default \code{wb} is used for
#' binary files. This value is passed to \link[downloader]{download} which
#' passes it to \link[utils]{download.file}.
#' Passed to [download][downloader::download].
#' @param mode Mode for writing the file. The default `wb` is used for
#' binary files. This value is passed to [download][downloader::download] which
#' passes it to [download.file][utils::download.file].
#' @param N.TRIES The number of download attempts before giving up; default: 3.
#' Should be an integer of length one with a value greater than 0.
#' @param ... Additional arguments passed to \link[downloader]{download}.
#' @param ... Additional arguments passed to [download][downloader::download].
#'
#' @return An invisible integer code as specified in
#' \link[utils]{download.file}.
#' [download.file][utils::download.file].
#' @export
#'
#' @examples
Expand Down
Loading

0 comments on commit 6c56fe8

Please sign in to comment.