Skip to content

Commit e812daf

Browse files
author
Charles Plessy
committed
Disable ENCODE and Zebrafish support.
The requireNamespace() calls cause a WARNING if the packages are not in the Suggests line of DESCRIPTION. The warnign causes GitHub CI to stop in error. Adding the packages in Suggests causes the CI to crash at package install time because they are only available from http://promshift.genereg.net/CAGEr/PackageSource. I attempted to solve this using the following in DESCRIPTION Remotes: - url::http://promshift.genereg.net/CAGEr/PackageSource/ENCODEprojectCAGE_1.0.1.tar.gz, - url::http://promshift.genereg.net/CAGEr/PackageSource/ZebrafishDevelopmentalCAGE_0.99.0.tar.gz However, this causes crashes because ENCODEprojectCAGE needs pdflatex to build. I do not know how to support that in Win and Mac, therefore I am giving up for the momment. The best solution would be to get these packages in Bioconductor too.
1 parent cc7cba6 commit e812daf

File tree

1 file changed

+69
-67
lines changed

1 file changed

+69
-67
lines changed

R/ImportMethods.R

+69-67
Original file line numberDiff line numberDiff line change
@@ -822,44 +822,45 @@ setGeneric("importPublicData",
822822
}
823823

824824
.importPublicData_ENCODE <- function (dataset, group = NULL, sample = NULL) {
825-
if (length(unique(dataset))>1) stop ("Merging datasets not supported yet.")
826-
if (! requireNamespace("ENCODEprojectCAGE"))
827-
stop ("This function requires the ", dQuote("ENCODEprojectCAGE"), " package.",
828-
" package; please install it from http://promshift.genereg.net/CAGEr/PackageSource/.")
829-
if (dataset == "ENCODEtissueCAGEfly") {
830-
if (group != "embryo") stop("Only 'embryo' is allowed as group for dataset 'ENCODEtissueCAGEfly'.")
831-
if (sample != "mixed_embryos_0-24hr") stop("Only 'mixed_embryos_0-24hr' is allowed as sample for dataset 'ENCODEtissueCAGEfly'.")
832-
if (! requireNamespace("BSgenome.Dmelanogaster.UCSC.dm3"))
833-
stop ("This function requires the ", dQuote("BSgenome.Dmelanogaster.UCSC.dm3"), " package.")
834-
genome.name <- "BSgenome.Dmelanogaster.UCSC.dm3"
835-
ENCODEtissueCAGEfly <- NULL
836-
data("ENCODEtissueCAGEfly", package = "ENCODEprojectCAGE", envir = environment())
837-
df <- ENCODEtissueCAGEfly$embryo
838-
} else {
839-
if (! requireNamespace("BSgenome.Hsapiens.UCSC.hg19"))
840-
stop ("This function requires the ", dQuote("BSgenome.Hsapiens.UCSC.hg19"), " package.")
841-
genome.name <- "BSgenome.Hsapiens.UCSC.hg19"
842-
ENCODEhumanCellLinesSamples <- NULL
843-
data("ENCODEhumanCellLinesSamples", package = "ENCODEprojectCAGE", envir = environment())
844-
info.df <- ENCODEhumanCellLinesSamples
845-
if(!(all(dataset %in% info.df$dataset)))
846-
stop("Specified dataset(s) not found! Call data(ENCODEhumanCellLinesSamples) and check 'dataset' column for available ENCODE datasets!")
847-
if(!(all(group %in% info.df[info.df$dataset == dataset,"group"])))
848-
stop("Some of the provided groups cannot be found in the specified dataset!")
849-
if(!(all(sample %in% info.df[,"sample"])))
850-
stop("Some of the provided samples cannot be found!")
851-
data(list= dataset, package = "ENCODEprojectCAGE", envir = environment())
852-
df <- get(dataset)[[group]]
853-
}
854-
se <- .df2SE(df, sample, genome.name)
855-
ce <- CAGEexp(genomeName = genome.name,
856-
colData = DataFrame( sampleLabels = make.names(sample),
857-
inputFiles = NA,
858-
inputFilesType = 'ctss',
859-
librarySizes = sapply(assay(se), sum),
860-
row.names = make.names(sample)))
861-
CTSStagCountSE(ce) <- se
862-
ce
825+
stop("ENCODE data support disabled until I find a way to suggest ENCODEprojectCAGE without causing CI crash in GitHub because of WARNING.")
826+
# if (length(unique(dataset))>1) stop ("Merging datasets not supported yet.")
827+
# if (! requireNamespace("ENCODEprojectCAGE"))
828+
# stop ("This function requires the ", dQuote("ENCODEprojectCAGE"), " package.",
829+
# " package; please install it from http://promshift.genereg.net/CAGEr/PackageSource/.")
830+
# if (dataset == "ENCODEtissueCAGEfly") {
831+
# if (group != "embryo") stop("Only 'embryo' is allowed as group for dataset 'ENCODEtissueCAGEfly'.")
832+
# if (sample != "mixed_embryos_0-24hr") stop("Only 'mixed_embryos_0-24hr' is allowed as sample for dataset 'ENCODEtissueCAGEfly'.")
833+
# if (! requireNamespace("BSgenome.Dmelanogaster.UCSC.dm3"))
834+
# stop ("This function requires the ", dQuote("BSgenome.Dmelanogaster.UCSC.dm3"), " package.")
835+
# genome.name <- "BSgenome.Dmelanogaster.UCSC.dm3"
836+
# ENCODEtissueCAGEfly <- NULL
837+
# data("ENCODEtissueCAGEfly", package = "ENCODEprojectCAGE", envir = environment())
838+
# df <- ENCODEtissueCAGEfly$embryo
839+
# } else {
840+
# if (! requireNamespace("BSgenome.Hsapiens.UCSC.hg19"))
841+
# stop ("This function requires the ", dQuote("BSgenome.Hsapiens.UCSC.hg19"), " package.")
842+
# genome.name <- "BSgenome.Hsapiens.UCSC.hg19"
843+
# ENCODEhumanCellLinesSamples <- NULL
844+
# data("ENCODEhumanCellLinesSamples", package = "ENCODEprojectCAGE", envir = environment())
845+
# info.df <- ENCODEhumanCellLinesSamples
846+
# if(!(all(dataset %in% info.df$dataset)))
847+
# stop("Specified dataset(s) not found! Call data(ENCODEhumanCellLinesSamples) and check 'dataset' column for available ENCODE datasets!")
848+
# if(!(all(group %in% info.df[info.df$dataset == dataset,"group"])))
849+
# stop("Some of the provided groups cannot be found in the specified dataset!")
850+
# if(!(all(sample %in% info.df[,"sample"])))
851+
# stop("Some of the provided samples cannot be found!")
852+
# data(list= dataset, package = "ENCODEprojectCAGE", envir = environment())
853+
# df <- get(dataset)[[group]]
854+
# }
855+
# se <- .df2SE(df, sample, genome.name)
856+
# ce <- CAGEexp(genomeName = genome.name,
857+
# colData = DataFrame( sampleLabels = make.names(sample),
858+
# inputFiles = NA,
859+
# inputFilesType = 'ctss',
860+
# librarySizes = sapply(assay(se), sum),
861+
# row.names = make.names(sample)))
862+
# CTSStagCountSE(ce) <- se
863+
# ce
863864
}
864865

865866
.importPublicData_F34 <- function (dataset, group = NULL, sample = NULL) {
@@ -945,35 +946,36 @@ setGeneric("importPublicData",
945946
}
946947

947948
.importPublicData_ZF <- function(group = "development", sample = NULL) {
948-
if (group != "development")
949-
stop("Invalid group name! There is only one group in this dataset named 'development'.")
950-
if (! requireNamespace("ZebrafishDevelopmentalCAGE"))
951-
stop ("This function requires the ", dQuote("ZebrafishDevelopmentalCAGE"),
952-
" package; please install it from http://promshift.genereg.net/CAGEr/PackageSource/.")
953-
if (! requireNamespace("BSgenome.Drerio.UCSC.danRer7"))
954-
stop ("This function requires the ", dQuote("BSgenome.Drerio.UCSC.danRer7"), " package.")
955-
956-
ZebrafishSamples <- NULL
957-
data("ZebrafishSamples", package = "ZebrafishDevelopmentalCAGE", envir = environment())
958-
959-
validSampleNames <- levels(ZebrafishSamples$sample)
960-
if (is.null(sample )) sample <- validSampleNames
961-
if ( ! all(sample %in% validSampleNames))
962-
stop("At least one sample name is not valid. ",
963-
"Valid sample names are: ", paste(validSampleNames, collapse = ", "), ".")
964-
965-
ZebrafishCAGE <- NULL
966-
data("ZebrafishCAGE", package = "ZebrafishDevelopmentalCAGE", envir = environment())
967-
# The vignette of ZebrafishDevelopmentalCAGE states that the provided coordinates are 1-based.
968-
ctssSE <- .df2SE(ZebrafishCAGE$development, sample, "BSgenome.Drerio.UCSC.danRer7")
969-
ce <- CAGEexp(genomeName = "BSgenome.Drerio.UCSC.danRer7",
970-
colData = DataFrame( sampleLabels = sample,
971-
inputFiles = NA,
972-
inputFilesType = 'ctss',
973-
librarySizes = sapply(assay(ctssSE), sum),
974-
row.names = sample))
975-
CTSStagCountSE(ce) <- ctssSE
976-
ce
949+
stop("Zebrafish data support disabled until I find a way to suggest ZebrafishDevelopmentalCAGE without causing CI crash in GitHub because of WARNING.")
950+
# if (group != "development")
951+
# stop("Invalid group name! There is only one group in this dataset named 'development'.")
952+
# if (! requireNamespace("ZebrafishDevelopmentalCAGE"))
953+
# stop ("This function requires the ", dQuote("ZebrafishDevelopmentalCAGE"),
954+
# " package; please install it from http://promshift.genereg.net/CAGEr/PackageSource/.")
955+
# if (! requireNamespace("BSgenome.Drerio.UCSC.danRer7"))
956+
# stop ("This function requires the ", dQuote("BSgenome.Drerio.UCSC.danRer7"), " package.")
957+
#
958+
# ZebrafishSamples <- NULL
959+
# data("ZebrafishSamples", package = "ZebrafishDevelopmentalCAGE", envir = environment())
960+
#
961+
# validSampleNames <- levels(ZebrafishSamples$sample)
962+
# if (is.null(sample )) sample <- validSampleNames
963+
# if ( ! all(sample %in% validSampleNames))
964+
# stop("At least one sample name is not valid. ",
965+
# "Valid sample names are: ", paste(validSampleNames, collapse = ", "), ".")
966+
#
967+
# ZebrafishCAGE <- NULL
968+
# data("ZebrafishCAGE", package = "ZebrafishDevelopmentalCAGE", envir = environment())
969+
# # The vignette of ZebrafishDevelopmentalCAGE states that the provided coordinates are 1-based.
970+
# ctssSE <- .df2SE(ZebrafishCAGE$development, sample, "BSgenome.Drerio.UCSC.danRer7")
971+
# ce <- CAGEexp(genomeName = "BSgenome.Drerio.UCSC.danRer7",
972+
# colData = DataFrame( sampleLabels = sample,
973+
# inputFiles = NA,
974+
# inputFilesType = 'ctss',
975+
# librarySizes = sapply(assay(ctssSE), sum),
976+
# row.names = sample))
977+
# CTSStagCountSE(ce) <- ctssSE
978+
# ce
977979
}
978980

979981
#' @rdname importPublicData

0 commit comments

Comments
 (0)