BiocPackage-class: A class for representing files in a Bioconductor package

BiocPackage-classR Documentation

A class for representing files in a Bioconductor package

Description

The BiocPackage class is used to represent a Bioconductor package. It is used by BiocCheck to store information about the package being checked. The class has several methods to identify the type of package, check for common issues, and store metadata about the package.

Usage

.BiocPackage

Format

An object of class BiocPackage of length 1.

Value

An object of class BiocPackage

Fields

isValid

logical indicating whether the package's DESCRIPTION file was able to be read without any errors

isTar

logical indicating whether the package is a tarball

isSourceDir

logical indicating whether the package being checked is from a source directory

isInfrastructure

logical indicating whether the package is an Bioconductor infrastructure package based on the biocViews field

usesRoxygen

logical indicating whether the package uses roxygen2 documentation

usesRdpack

logical indicating whether the package uses Rdpack package

DESCRIPTION

matrix containing the DCF contents of the DESCRIPTION file

dependencies

character vector of package dependencies

readError

character error message if the DESCRIPTION file could not be read

packageVersion

character version of the package

packageType

character indicating the type of package based on the biocViews field; can be NA_character_ there are invalid biocViews terms

sourceDir

character path to the source directory

vignettesDir

character path to the vignettes directory

RSources

character vector of R source files

VigSources

character vector of vignette source files

manSources

character vector of Rd source files

BiocCheckDir

character path to the directory where the package BiocCheck logs are written

packageName

character name of the package

tarFilename

character filename of the tarball

metadata

list containing metadata about the package

methods

  • initialize: Initialize a BiocPackage object

  • getPackageDir: Get the package directory

  • getRSources: Get the R source files

  • getVigSources: Get the vignette source files

  • getManSources: Get the Rd source files

  • getBiocCheckDir: Get the directory where the BiocCheck logs are written

  • getBiocViews: Get the biocViews field from the DESCRIPTION file

  • getPackageType: Get the package type based on the biocViews field

  • readDESCRIPTION: Read the DESCRIPTION file

  • getVigBuilder: Get the vignette builder

  • getAllDependencies: Get all dependencies from the DESCRIPTION file

  • findInfrastructure: Is the package an infrastructure package?

  • findRoxygen: Does the package use roxygen2?

  • getPackageVersion: Get the package version

  • untarTarball: Untar the source tarball

Examples


# Create a BiocPackage object
packageDirectory <- "path/to/package"
if (dir.exists(packageDirectory))
    .bioctest <- .BiocPackage$initialize(packageDirectory)

.bioctest <- BiocCheck:::.BiocPackage

.bioctest$DESCRIPTION


Bioconductor/BiocCheck documentation built on Sept. 8, 2024, 11:48 a.m.