Get Bioc package list
suppressPackageStartupMessages ({
library (BiocPkgTools)
library (dplyr)
library (DT)
})
BiocManager:: version ()
pkg <- biocPkgList (repo = "BioCsoft" )
'getOption("repos")' replaces Bioconductor standard repositories, see 'help("repositories", package = "BiocManager")'
for details.
Replacement repositories:
CRAN: https://cloud.r-project.org
# pkg <- biocPkgList(repo = c("BioCsoft", "BioCann", "BioCexp", "BioCworkflows"))
Get licenses
sort (table (pkg$ License, useNA = "ifany" ))
AGPL-3 | file LICENSE Apache License (== 2.0) + file LICENSE
1 1
Apache License (== 2.0) | file LICENSE Apache License (>= 2.0)
1 1
Apache License (>= 2.0) | file LICENSE Apache License 2.0 | file LICENSE
1 1
Artistic 2.0 Artistic-2.0 | GPL-2 + file LICENSE
1 1
BSD 3-clause License + file LICENSE BSD_2_clause
1 1
BSD_3_clause CC BY-SA 4.0 + file LICENSE
1 1
CC0 CeCILL | file LICENSE
1 1
CPL Creative Commons Attribution 4.0 International License
1 1
EPL (>= 1.0) GNU General Public License version 3
1 1
GPL (==2) GPL (>= 2.1)
1 1
GPL (>=2 ) GPL 3
1 1
GPL version 3 GPL-3 + file LICENCE
1 1
GPL-3 bioconductor.org GPL(>= 2)
1 1
GPL(>=3) LGPL (>= 2.1) | file LICENSE
1 1
LGPL (>= 3.0) LGPL (>= 3); File LICENSE
1 1
LGPL-2.1 LGPL-3 + file LICENSE
1 1
MIT | file LICENSE MIT License
1 1
MIT+ file LICENSE Mozilla Public License 2.0
1 1
Unlimited Apache License (== 2.0)
1 2
Artistic-1.0 CC BY 4.0
2 2
CC BY-NC-ND 4.0 CC BY-NC-ND 4.0 + file LICENSE
2 2
EPL GPL (>= 3.0)
2 2
GPL (>=2.0) GPL (>=3.0)
2 2
GPL (>2) GPL (http://www.gnu.org/copyleft/gpl.html)
2 2
GPL version 2 GPL Version 2 or later
2 2
LGPL (>= 2.1) LGPL (>=3)
2 2
LGPL-2.1 | file LICENSE AGPL-3 + file LICENSE
2 3
Artistic License 2.0 Artistic-2.0 + file LICENSE
3 3
CeCILL GPL (>= 2.0)
3 3
GPL (>= 2) + file LICENSE GPL (>= 3) + file LICENSE
3 3
GPL (>=3) + file LICENSE Apache License (>= 2)
3 4
GPL-2 | file LICENSE LGPL (>=2)
4 4
MIT + file LICENCE AGPL-3.0-only
4 5
Apache License 2.0 GPL-2 + file LICENSE
5 5
GPL-2 | GPL-3 LGPL-2
5 5
GPL(>=2) MIT
6 7
BSD_2_clause + file LICENSE LGPL (>= 2.0)
8 8
LGPL (>= 3) GPL (>=3)
9 10
Artistic-2.0 | file LICENSE GPL-3 | file LICENSE
12 14
BSD_3_clause + file LICENSE AGPL-3
15 19
LGPL (>= 2) GPL
19 22
LGPL-3 file LICENSE
36 37
LGPL GPL (>=2)
39 47
GPL-3 + file LICENSE GPL (>= 3)
59 62
GPL (>= 2) GPL-2
183 235
MIT + file LICENSE GPL-3
309 480
Artistic-2.0
511
Clean up
## Get unique licenses
lic <- unique (pkg$ License)
lic <- lic[! is.na (lic)]
alres <- lapply (structure (lic, names = lic), tools::: analyze_license)
## Get information about the licenses
alres <- do.call (dplyr:: bind_rows, lapply (names (alres), function (nm) {
a <- alres[[nm]]
data.frame (License = nm,
LicenseStandardizable = a$ is_standardizable,
LicenseVerified = a$ is_verified,
LicenseStandardization = a$ standardization,
LicenseCanonical = a$ is_canonical,
LicenseFOSS = a$ is_FOSS,
LicenseRestrictsUse = a$ restricts_use)
}))
## Add additional column removing the "+/| file LICENSE" part (if we want to
## assume that this is compatible with the main license indication)
alres$ LicenseStandardizationShort <- gsub ("[ ]* \\ +* \\ |*[ ]*file LICEN[SC]E" ,
"" , alres$ LicenseStandardization)
dim (alres)
length (unique (alres$ LicenseStandardizationShort))
DT:: datatable (alres,
extensions = "FixedColumns" ,
rownames = FALSE ,
options = list (scrollX = TRUE ,
fixedColumns = list (leftColumns = 1 ),
search = list (regex = FALSE , caseInsensitive = TRUE ),
pageLength = 20 ))
## Add license columns to pkg list
pkg <- pkg %>%
dplyr:: select (Package, Maintainer, License, hasLICENSE) %>%
dplyr:: left_join (alres, by = "License" )
dim (pkg)
DT:: datatable (pkg,
extensions = "FixedColumns" ,
rownames = FALSE ,
options = list (scrollX = TRUE ,
fixedColumns = list (leftColumns = 1 ),
search = list (regex = FALSE , caseInsensitive = TRUE ),
pageLength = 20 ))
Tabulate licenses
sort (table (pkg$ LicenseStandardizationShort, useNA = "ifany" ))
Artistic-2.0 | GPL-2 BSD 3-clause License
1 1
CC BY-SA 4.0 CC0
1 1
CPL Creative Commons Attribution 4.0 International License
1 1
EPL (>= 1.0) GNU General Public License version 3
1 1
GPL (== 2) GPL (>= 2.1)
1 1
LGPL (>= 3.0) MIT License
1 1
Mozilla Public License 2.0 Unlimited
1 1
Apache License (>= 2.0) Artistic-1.0
2 2
CC BY 4.0 EPL
2 2
GPL (> 2) Artistic License 2.0
2 3
LGPL (>= 2.1) LGPL-2.1
3 3
Apache License (== 2.0) Apache License (>= 2)
4 4
CC BY-NC-ND 4.0 CeCILL
4 4
GPL (>= 3.0) GPL (>= 2.0)
4 5
GPL-2 | GPL-3 LGPL-2
5 5
Apache License 2.0 LGPL (>= 2.0)
6 8
BSD_2_clause <NA>
9 9
LGPL (>= 3) BSD_3_clause
11 16
GPL AGPL-3
22 23
LGPL (>= 2)
23 37
LGPL-3 LGPL
37 39
GPL (>= 3) GPL (>= 2)
79 243
GPL-2 MIT
246 322
Artistic-2.0 GPL-3
527 556
Some cases that may need attention
We attempt to estimate the fraction of packages that are provided under an OSI approved license. It should be noted that, automatically performed, this will necessary be a rough estimate, e.g. since there are several packages that do not mention the license explicitly in the DESCRIPTION file but only provide the license text in a separate LICENSE file.
totalNbrPkg <- nrow (pkg)
ccLicensed <- pkg$ Package[grep ("CC|Creative Commons" , pkg$ LicenseStandardizationShort)]
fileLicense <- pkg$ Package[which (pkg$ LicenseStandardizationShort == "" )]
licUnlimited <- pkg$ Package[which (pkg$ LicenseStandardizationShort == "Unlimited" )]
licNotStandardizable <- pkg$ Package[is.na (pkg$ LicenseStandardizationShort)]
fractionOSIApproved <- 1 - length (unique (c (ccLicensed, fileLicense,
licUnlimited, licNotStandardizable)))/ totalNbrPkg
print (paste0 ("Rough estimate of fraction packages with OSI approved license: " ,
signif (100 * fractionOSIApproved, digits = 4 ), "%" ))
[1] "Rough estimate of fraction packages with OSI approved license: 97.54%"
Packages that have just a ‘file LICENSE’
These need to be checked manually.
.makeLinkToLicense <- function (pkg, text) {
sprintf ('<a href="%s" target="_blank"> %s</a>' ,
paste0 ("https://bioconductor.org/packages/devel/bioc/licenses/" ,
pkg, "/LICENSE" ),
text)
}
DT:: datatable (subset (pkg, LicenseStandardizationShort == "" ) %>%
dplyr:: mutate (License = vapply (seq_along (License), function (i) {
.makeLinkToLicense (Package[i], License[i])
}, "NA" )),
extensions = "FixedColumns" ,
rownames = FALSE ,
escape = FALSE ,
options = list (scrollX = TRUE ,
fixedColumns = list (leftColumns = 1 ),
search = list (regex = FALSE , caseInsensitive = TRUE ),
pageLength = 20 ))
Packages that have license “Unlimited”
DT:: datatable (subset (pkg, LicenseStandardizationShort == "Unlimited" ),
extensions = "FixedColumns" ,
rownames = FALSE ,
options = list (scrollX = TRUE ,
fixedColumns = list (leftColumns = 1 ),
search = list (regex = FALSE , caseInsensitive = TRUE ),
pageLength = 20 ))
Packages that have licenses that can not be standardized
Some of these may be false positives.
DT:: datatable (subset (pkg, is.na (LicenseStandardizationShort)),
extensions = "FixedColumns" ,
rownames = FALSE ,
options = list (scrollX = TRUE ,
fixedColumns = list (leftColumns = 1 ),
search = list (regex = FALSE , caseInsensitive = TRUE ),
pageLength = 20 ))
The rest of the licenses appear to be approved open source licenses (https://opensource.org/licenses/alphabetical ).
Session info
R Under development (unstable) (2025-01-08 r87545)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 24.04.1 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so; LAPACK version 3.12.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
time zone: Etc/UTC
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] DT_0.33 dplyr_1.1.4 BiocPkgTools_1.25.2 htmlwidgets_1.6.4
loaded via a namespace (and not attached):
[1] xfun_0.50 bslib_0.8.0 gh_1.4.1 Biobase_2.67.0 tzdb_0.4.0
[6] vctrs_0.6.5 tools_4.5.0 crosstalk_1.2.1 bitops_1.0-9 generics_0.1.3
[11] stats4_4.5.0 curl_6.1.0 RUnit_0.4.33 tibble_3.2.1 RSQLite_2.3.9
[16] blob_1.2.4 pkgconfig_2.0.3 dbplyr_2.5.0 graph_1.85.1 lifecycle_1.0.4
[21] compiler_4.5.0 stringr_1.5.1 biocViews_1.75.0 sass_0.4.9 htmltools_0.5.8.1
[26] RCurl_1.98-1.16 yaml_2.3.10 jquerylib_0.1.4 pillar_1.10.1 whisker_0.4.1
[31] cachem_1.1.0 tidyselect_1.2.1 rvest_1.0.4 digest_0.6.37 stringi_1.8.4
[36] fastmap_1.2.0 cli_3.6.3 magrittr_2.0.3 RBGL_1.83.0 XML_3.99-0.18
[41] crul_1.5.0 withr_3.0.2 readr_2.1.5 filelock_1.0.3 bit64_4.5.2
[46] rmarkdown_2.29 httr_1.4.7 igraph_2.1.3 bit_4.5.0.1 hms_1.1.3
[51] memoise_2.0.1 evaluate_1.0.1 knitr_1.49 BiocFileCache_2.15.0 rlang_1.1.4
[56] glue_1.8.0 DBI_1.2.3 httpcode_0.3.0 BiocManager_1.30.25 xml2_1.3.6
[61] fauxpas_0.5.2 BiocGenerics_0.53.3 rorcid_0.7.0 jsonlite_1.8.9 R6_2.5.1