https://github.com/bioconductor/generics

https://github.com/bioconductor/generics

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.4%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: Bioconductor
  • Language: R
  • Default Branch: devel
  • Size: 46.9 KB
Statistics
  • Stars: 0
  • Watchers: 6
  • Forks: 0
  • Open Issues: 1
  • Releases: 0
Created over 10 years ago · Last pushed over 3 years ago
Metadata Files
Readme

README.Rmd

---
output:
  md_document:
    variant: markdown_github
---



```{r, echo = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)
```

[![Travis-CI Build Status](https://travis-ci.org/Bioconductor/generics.svg?branch=master)](https://travis-ci.org/Bioconductor/generics)
[![Coverage Status](https://img.shields.io/codecov/c/github/Bioconductor/generics/master.svg)](https://codecov.io/github/Bioconductor/generics?branch=master)

# Example packages using generics package #
## select ##
 - https://github.com/jimhester/dplyr/tree/generics - https://travis-ci.org/hadley/dplyr/jobs/96281463#L1445-L1540
 - https://github.com/jimhester/AnnotationDbi/tree/generics - https://gist.github.com/jimhester/8044628a6183c118ce0b
 - https://github.com/jimhester/GenomicFeatures/tree/generics

# Summary of Conflicting Functions #
```{r}
# Get all conflicting functions from two namespaces
conflicts2 <- function(x, y) {
    Filter(Negate(function(x) grepl("\\.__T__", x)),
           intersect(getNamespaceExports(x), getNamespaceExports(y)))
}

# CRAN packages from https://support.rstudio.com/hc/en-us/articles/201057987-Quick-list-of-useful-R-packages
CRAN <- c(
"base",
"stats",
"graphics",
"RMySQL",
"RSQLite",
"XLConnect",
"xlsx",
"foreign",
"readr",
"haven",
"dplyr",
"tidyr",
"stringr",
"lubridate",
"ggplot2",
"ggvis",
"rgl",
"htmlwidgets",
"leaflet",
"dygraphs",
"DT",
"DiagrammeR",
"networkD3",
"googleVis",
"car",
"mgcv",
"lme4",
"nlme",
"randomForest",
"multcomp",
"vcd",
"glmnet",
"survival",
"caret",
"shiny",
"rmarkdown",
"knitr",
"xtable",
"sp",
"maptools",
"maps",
"ggmap",
"zoo",
"xts",
"quantmod",
"Rcpp",
"data.table",
"parallel",
"XML",
"jsonlite",
"httr",
"rvest",
"devtools",
"testthat",
"roxygen2")

# Bioc Packages from top 25 of https://www.bioconductor.org/packages/stats/
Bioc <- c(
"BiocInstaller",
"BiocGenerics",
"IRanges",
"Biobase",
"AnnotationDbi",
"GenomeInfoDb",
"S4Vectors",
"zlibbioc",
"Biostrings",
"limma",
"XVector",
"GenomicRanges",
"BiocParallel",
"annotate",
"Rsamtools",
"genefilter",
"rtracklayer",
"biomaRt",
"graph",
"GenomicAlignments",
"GenomicFeatures",
"preprocessCore",
"affy",
"BSgenome",
"geneplotter")

suppressPackageStartupMessages(invisible(lapply(c(CRAN, Bioc), library, character.only = TRUE, quietly = TRUE)))

all <- expand.grid(CRAN = CRAN, Bioconductor = Bioc, stringsAsFactors = FALSE)

all$conflicts <- Map(conflicts2, all[[1]], all[[2]])

# Filter out all the generics defined in methods

gen_defs <- function(namespace) {
    gens <- getGenerics(where=asNamespace(namespace))

    Map(function(f, package)
        get(f, envir = asNamespace(package), mode = "function"),
        gens@.Data, gens@package)
}

filter_defs <- c(gen_defs("methods"),
                 gen_defs("BiocGenerics"))

in_defs <- function(x, defs) {
    any(as.logical(
        lapply(defs,
            function(xx) {
                identical(xx, x) || .hasSlot(xx, "default") && identical(xx@default@.Data, x)
            })))
}

filter_methods <- function(x, package) {
    if (!length(x)) return(x)
    funs <- lapply(x, get, envir = asNamespace(package), mode = "function")
    in_methods <- vapply(funs, in_defs, logical(1), defs = filter_defs)
    x[!in_methods]
}

all$conflicts <- Map(filter_methods, all$conflicts, all$CRAN)

all$`S3 Generics` <- Map(function(package, funs)
    Filter(function(x) pryr:::is_s3_generic(x, env = asNamespace(package)), funs),
    all$CRAN, all$conflicts)

all$`S4 Generics` <- Map(function(package, funs)
    Filter(function(x) isGeneric(x, where = asNamespace(package)), funs),
    all$CRAN, all$conflicts)

all$normal <- Map(function(conflicts, S3, S4) conflicts[!(conflicts %in% S3 | conflicts %in% S4)],
    all$conflicts, all$`S3 Generics`, all$`S4 Generics`)

res <- all[lengths(all$conflicts) > 0, ]
knitr::kable(res, row.names = FALSE)
```

## Tabulated by function ##
```{r, results = 'asis'}
library(tidyr)
res2 <- unique(unnest(res, conflicts)[c("CRAN", "conflicts")])
res3 <- spread(res2, conflicts, CRAN, fill="")
res4 <- lapply(res3, function(x) x[x != ""])
do.call(`cat`, c(Map(function(nme, pkgs) {
  paste0(" - ", nme, " - ", paste0(pkgs, collapse = ", "))
    }, names(res4), res4, USE.NAMES = FALSE), list(sep = "\n")))
```

Owner

  • Name: Bioconductor
  • Login: Bioconductor
  • Kind: organization

Software for the analysis and comprehension of high-throughput genomic data

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 1
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • jimhester (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels