This page was generated on 2019-04-09 13:31:01 -0400 (Tue, 09 Apr 2019).
##############################################################################
##############################################################################
###
### Running command:
###
### /Library/Frameworks/R.framework/Versions/Current/Resources/bin/R CMD check --install=check:seq2pathway.install-out.txt --library=/Library/Frameworks/R.framework/Versions/Current/Resources/library --no-vignettes --timings seq2pathway_1.15.0.tar.gz
###
##############################################################################
##############################################################################
* using log directory ‘/Users/biocbuild/bbs-3.9-bioc/meat/seq2pathway.Rcheck’
* using R Under development (unstable) (2018-11-27 r75683)
* using platform: x86_64-apple-darwin15.6.0 (64-bit)
* using session charset: UTF-8
* using option ‘--no-vignettes’
* checking for file ‘seq2pathway/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘seq2pathway’ version ‘1.15.0’
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘seq2pathway’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... NOTE
FAIME_EmpiricalP: no visible global function definition for ‘data’
FAIME_EmpiricalP: no visible binding for global variable
‘gencode_coding’
FisherTest_GO_BP_MF_CC: no visible global function definition for
‘data’
FisherTest_GO_BP_MF_CC: no visible binding for global variable
‘GO_BP_list’
FisherTest_GO_BP_MF_CC: no visible binding for global variable
‘GO_MF_list’
FisherTest_GO_BP_MF_CC: no visible binding for global variable
‘GO_CC_list’
FisherTest_GO_BP_MF_CC: no visible binding for global variable
‘Des_BP_list’
FisherTest_GO_BP_MF_CC: no visible binding for global variable
‘Des_MF_list’
FisherTest_GO_BP_MF_CC: no visible binding for global variable
‘Des_CC_list’
FisherTest_GO_BP_MF_CC: no visible binding for global variable
‘GO_GENCODE_df_hg_v20’
FisherTest_GO_BP_MF_CC: no visible binding for global variable
‘GO_GENCODE_df_hg_v19’
FisherTest_GO_BP_MF_CC: no visible binding for global variable
‘GO_GENCODE_df_mm_vM4’
FisherTest_GO_BP_MF_CC: no visible binding for global variable
‘GO_GENCODE_df_mm_vM1’
FisherTest_GO_BP_MF_CC: no visible global function definition for
‘fisher.test’
FisherTest_GO_BP_MF_CC: no visible global function definition for
‘p.adjust’
FisherTest_MsigDB: no visible global function definition for ‘data’
FisherTest_MsigDB: no visible binding for global variable
‘Msig_GENCODE_df_hg_v20’
FisherTest_MsigDB: no visible binding for global variable
‘Msig_GENCODE_df_hg_v19’
FisherTest_MsigDB: no visible binding for global variable
‘Msig_GENCODE_df_mm_vM4’
FisherTest_MsigDB: no visible binding for global variable
‘Msig_GENCODE_df_mm_vM1’
FisherTest_MsigDB: no visible global function definition for
‘fisher.test’
FisherTest_MsigDB: no visible global function definition for ‘p.adjust’
KSrank: no visible global function definition for ‘ks.test’
KSrank_EmpiricalP: no visible global function definition for ‘data’
KSrank_EmpiricalP: no visible binding for global variable
‘gencode_coding’
KSrank_EmpiricalP: no visible global function definition for ‘ks.test’
Normalize_F: no visible global function definition for ‘head’
cumulativerank_EmpiricalP: no visible global function definition for
‘data’
cumulativerank_EmpiricalP: no visible binding for global variable
‘gencode_coding’
gene2pathway_test: no visible global function definition for ‘data’
gene2pathway_test: no visible binding for global variable ‘GO_BP_list’
gene2pathway_test: no visible binding for global variable ‘GO_MF_list’
gene2pathway_test: no visible binding for global variable ‘GO_CC_list’
gene2pathway_test: no visible binding for global variable ‘Des_BP_list’
gene2pathway_test: no visible binding for global variable ‘Des_CC_list’
gene2pathway_test: no visible binding for global variable ‘Des_MF_list’
plotTop10: no visible binding for global variable ‘Fisher_odds’
plotTop10: no visible binding for global variable ‘FDR’
plotTop10: no visible global function definition for ‘barplot’
plotTop10: no visible global function definition for ‘lines’
plotTop10: no visible global function definition for ‘text’
plotTop10: no visible global function definition for ‘abline’
rungene2pathway_EmpiricalP: no visible global function definition for
‘txtProgressBar’
rungene2pathway_EmpiricalP: no visible global function definition for
‘setTxtProgressBar’
runseq2gene: no visible global function definition for ‘write.table’
runseq2gene: no visible global function definition for ‘read.table’
runseq2pathway: no visible global function definition for ‘data’
runseq2pathway: no visible binding for global variable ‘GO_BP_list’
runseq2pathway: no visible binding for global variable ‘GO_MF_list’
runseq2pathway: no visible binding for global variable ‘GO_CC_list’
runseq2pathway: no visible binding for global variable ‘Des_BP_list’
runseq2pathway: no visible binding for global variable ‘Des_CC_list’
runseq2pathway: no visible binding for global variable ‘Des_MF_list’
runseq2pathway: no visible global function definition for ‘write.table’
runseq2pathway: no visible global function definition for ‘read.table’
Undefined global functions or variables:
Des_BP_list Des_CC_list Des_MF_list FDR Fisher_odds GO_BP_list
GO_CC_list GO_GENCODE_df_hg_v19 GO_GENCODE_df_hg_v20
GO_GENCODE_df_mm_vM1 GO_GENCODE_df_mm_vM4 GO_MF_list
Msig_GENCODE_df_hg_v19 Msig_GENCODE_df_hg_v20 Msig_GENCODE_df_mm_vM1
Msig_GENCODE_df_mm_vM4 abline barplot data fisher.test gencode_coding
head ks.test lines p.adjust read.table setTxtProgressBar text
txtProgressBar write.table
Consider adding
importFrom("graphics", "abline", "barplot", "lines", "text")
importFrom("stats", "fisher.test", "ks.test", "p.adjust")
importFrom("utils", "data", "head", "read.table", "setTxtProgressBar",
"txtProgressBar", "write.table")
to your NAMESPACE file.
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... WARNING
Codoc mismatches from documentation object 'plotTop10':
plotTop10
Code: function(res, fdr = 0.05, or = 2, myfileID = NULL)
Docs: function(res, fdr = 0.01, or = 1.5)
Argument names in code not in docs:
myfileID
Mismatches in argument default values:
Name: 'fdr' Code: 0.05 Docs: 0.01
Name: 'or' Code: 2 Docs: 1.5
* checking Rd \usage sections ... WARNING
Documented arguments not in \usage in documentation object 'plotTop10':
‘myfileID’
Functions with \usage entries need to have the appropriate \alias
entries, and all their arguments documented.
The \usage entries must correspond to syntactically valid R code.
See chapter ‘Writing R documentation files’ in the ‘Writing R
Extensions’ manual.
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking sizes of PDF files under ‘inst/doc’ ... OK
* checking installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... ERROR
Running examples in ‘seq2pathway-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: runseq2pathway
> ### Title: An function to perform the runseq2pathway algorithm(s).
> ### Aliases: runseq2pathway
> ### Keywords: methods
>
> ### ** Examples
>
> data(Chipseq_Peak_demo)
> require(seq2pathway.data)
Loading required package: seq2pathway.data
> data(MsigDB_C5, package="seq2pathway.data")
> #generate a demo GSA.genesets object
> demoDB <- MsigDB_C5
> x=10
> for(i in 1:3) demoDB[[i]]<-MsigDB_C5[[i]][1:x]
> res3=runseq2pathway(inputfile=Chipseq_Peak_demo,
+ genome="hg19", search_radius=100, promoter_radius=50, promoter_radius2=0,
+ FAIMETest=TRUE, FisherTest=FALSE,
+ DataBase=demoDB, min_Intersect_Count=1)
[1] "python process start: 2019-04-09 03:43:39.080066"
[2] "Load Reference"
[3] "Check Reference files"
[4] "fixed reference done: 2019-04-09 03:44:28.327052"
[5] "Start Annotation"
[6] "Finish Annotation"
[7] "python process end: 2019-04-09 03:44:28.330627"
[1] "Start test.............."
Warning: 5 or fewer samples, this method of probe collapse is unreliable...
...Running anyway, but we suggest trying another method (for example, *mean*).
[1] "Peak_Gene_Collapse....... done"
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
seq2pathway
--- call from context ---
runseq2pathway(inputfile = Chipseq_Peak_demo, genome = "hg19",
search_radius = 100, promoter_radius = 50, promoter_radius2 = 0,
FAIMETest = TRUE, FisherTest = FALSE, DataBase = demoDB,
min_Intersect_Count = 1)
--- call from argument ---
if (DataBase %in% c("GOterm", "BP", "CC", "MF")) {
if (DataBase %in% c("GOterm", "BP")) {
GO_BP_FAIME <- rungene2pathway(dat = dat_CP, gsmap = GO_BP_list,
alpha = alpha, logCheck = logCheck, method = "FAIME",
na.rm = na.rm)
GO_BP_FAIME_N <- Normalize_F(input = GO_BP_FAIME)
GO_BP_FAIME_Pvalue <- rungene2pathway_EmpiricalP(dat = dat_CP,
gsmap = GO_BP_list, alpha = alpha, logCheck = logCheck,
method = "FAIME", B = B, na.rm = na.rm)
GO_BP_N_P <- merge(GO_BP_FAIME_N, GO_BP_FAIME_Pvalue,
by = "row.names", all = TRUE)
rownames(GO_BP_N_P) <- GO_BP_N_P$Row.names
GO_BP_N_P <- GO_BP_N_P[, -1]
for (i in 1:nrow(GO_BP_N_P)) {
intsect <- intersect(toupper(rownames(dat_CP)), toupper(unlist(GO_BP_list[names(GO_BP_list) ==
rownames(GO_BP_N_P)[i]])))
GO_BP_N_P$Intersect_Count[i] <- length(intsect)
GO_BP_N_P$Intersect_gene[i] <- paste(intsect, collapse = " ")
GO_BP_N_P$Intersect_element[i] <- paste(as.vector(dat_collapsed[dat_collapsed$gene %in%
intsect, c(1)]), collapse = " ")
rm(intsect)
GO_BP_N_P$Des[i] <- as.character(Des_BP_list[which(names(Des_BP_list) ==
rownames(GO_BP_N_P)[i])])
}
GO_BP_N_P <- GO_BP_N_P[GO_BP_N_P$Intersect_Count >= min_Intersect_Count,
]
GO_BP_N_P <- GO_BP_N_P[, c(ncol(GO_BP_N_P), 1:(ncol(GO_BP_N_P) -
1))]
n.list = n.list + 1
gene2pathway_result[[n.list]] <- GO_BP_N_P
names(gene2pathway_result)[n.list] <- c("GO_BP")
}
if (DataBase %in% c("GOterm", "MF")) {
GO_MF_FAIME <- rungene2pathway(dat = dat_CP, gsmap = GO_MF_list,
alpha = alpha, logCheck = logCheck, method = "FAIME",
na.rm = na.rm)
GO_MF_FAIME_N <- Normalize_F(input = GO_MF_FAIME)
GO_MF_FAIME_Pvalue <- rungene2pathway_EmpiricalP(dat = dat_CP,
gsmap = GO_MF_list, alpha = alpha, logCheck = logCheck,
method = "FAIME", B = B, na.rm = na.rm)
GO_MF_N_P <- merge(GO_MF_FAIME_N, GO_MF_FAIME_Pvalue,
by = "row.names", all = TRUE)
rownames(GO_MF_N_P) <- GO_MF_N_P$Row.names
GO_MF_N_P <- GO_MF_N_P[, -1]
for (i in 1:nrow(GO_MF_N_P)) {
intsect <- intersect(toupper(rownames(dat_CP)), toupper(unlist(GO_MF_list[names(GO_MF_list) ==
rownames(GO_MF_N_P)[i]])))
GO_MF_N_P$Intersect_Count[i] <- length(intsect)
GO_MF_N_P$Intersect_gene[i] <- paste(intsect, collapse = " ")
GO_MF_N_P$Intersect_element[i] <- paste(as.vector(dat_collapsed[dat_collapsed$gene %in%
intsect, c(1)]), collapse = " ")
rm(intsect)
GO_MF_N_P$Des[i] <- as.character(Des_MF_list[which(names(Des_MF_list) ==
rownames(GO_MF_N_P)[i])])
}
GO_MF_N_P <- GO_MF_N_P[GO_MF_N_P$Intersect_Count >= min_Intersect_Count,
]
GO_MF_N_P <- GO_MF_N_P[, c(ncol(GO_MF_N_P), 1:(ncol(GO_MF_N_P) -
1))]
n.list = n.list + 1
gene2pathway_result[[n.list]] <- GO_MF_N_P
names(gene2pathway_result)[n.list] <- c("GO_MF")
}
if (DataBase %in% c("GOterm", "CC")) {
GO_CC_FAIME <- rungene2pathway(dat = dat_CP, gsmap = GO_CC_list,
alpha = alpha, logCheck = logCheck, method = "FAIME",
na.rm = na.rm)
GO_CC_FAIME_N <- Normalize_F(input = GO_CC_FAIME)
GO_CC_FAIME_Pvalue <- rungene2pathway_EmpiricalP(dat = dat_CP,
gsmap = GO_CC_list, alpha = alpha, logCheck = logCheck,
method = "FAIME", B = B, na.rm = na.rm)
GO_CC_N_P <- merge(GO_CC_FAIME_N, GO_CC_FAIME_Pvalue,
by = "row.names", all = TRUE)
rownames(GO_CC_N_P) <- GO_CC_N_P$Row.names
GO_CC_N_P <- GO_CC_N_P[, -1]
for (i in 1:nrow(GO_CC_N_P)) {
intsect <- intersect(toupper(rownames(dat_CP)), toupper(unlist(GO_CC_list[names(GO_CC_list) ==
rownames(GO_CC_N_P)[i]])))
GO_CC_N_P$Intersect_Count[i] <- length(intsect)
GO_CC_N_P$Intersect_gene[i] <- paste(intsect, collapse = " ")
GO_CC_N_P$Intersect_element[i] <- paste(as.vector(dat_collapsed[dat_collapsed$gene %in%
intsect, c(1)]), collapse = " ")
rm(intsect)
GO_CC_N_P$Des[i] <- as.character(Des_CC_list[which(names(Des_CC_list) ==
rownames(GO_CC_N_P)[i])])
}
GO_CC_N_P <- GO_CC_N_P[GO_CC_N_P$Intersect_Count >= min_Intersect_Count,
]
GO_CC_N_P <- GO_CC_N_P[, c(ncol(GO_CC_N_P), 1:(ncol(GO_CC_N_P) -
1))]
n.list = n.list + 1
gene2pathway_result[[n.list]] <- GO_CC_N_P
names(gene2pathway_result)[n.list] <- c("GO_CC")
}
} else {
dat_FAIME <- rungene2pathway(dat = dat_CP, gsmap = DataBase,
alpha = alpha, logCheck = logCheck, method = "FAIME",
na.rm = na.rm)
N_FAIME <- Normalize_F(input = dat_FAIME)
dat_FAIME_Pvalue <- rungene2pathway_EmpiricalP(dat = dat_CP,
gsmap = DataBase, alpha = alpha, logCheck = logCheck,
method = "FAIME", B = B, na.rm = na.rm)
N_FAIME <- as.matrix(N_FAIME)
dat_FAIME_Pvalue <- as.matrix(dat_FAIME_Pvalue)
DB_N_P <- cbind(N_FAIME, as.matrix(dat_FAIME_Pvalue[match(rownames(N_FAIME),
rownames(dat_FAIME_Pvalue)), ]))
colnames(DB_N_P) <- c("score2pathscore_Normalized", "score2pathscore_Pvalue")
DB_N_P <- as.data.frame(DB_N_P)
for (i in 1:nrow(DB_N_P)) {
if (class(DataBase) == "GSA.genesets") {
intsect <- intersect(toupper(rownames(dat_CP)), toupper(unlist(DataBase$genesets[which(DataBase$geneset.names ==
rownames(DB_N_P)[i])])))
}
else if (class(DataBase) == "list") {
intsect <- intersect(toupper(rownames(dat_CP)), toupper(unlist(DataBase[names(DataBase) ==
rownames(DB_N_P)[i]])))
}
DB_N_P$Intersect_Count[i] <- length(intsect)
DB_N_P$Intersect_gene[i] <- paste(intsect, collapse = " ")
DB_N_P$Intersect_element[i] <- paste(as.vector(dat_collapsed[dat_collapsed$gene %in%
intsect, c(1)]), collapse = " ")
rm(intsect)
if (class(DataBase) == "GSA.genesets") {
DB_N_P$Des[i] <- as.character(DataBase$geneset.descriptions[which(DataBase$geneset.names ==
rownames(DB_N_P)[i])])
}
}
DB_N_P <- DB_N_P[DB_N_P$Intersect_Count >= min_Intersect_Count,
]
gene2pathway_result <- DB_N_P[, c(ncol(DB_N_P), 1:(ncol(DB_N_P) -
1))]
}
--- R stacktrace ---
where 1: runseq2pathway(inputfile = Chipseq_Peak_demo, genome = "hg19",
search_radius = 100, promoter_radius = 50, promoter_radius2 = 0,
FAIMETest = TRUE, FisherTest = FALSE, DataBase = demoDB,
min_Intersect_Count = 1)
--- value of length: 3 type: logical ---
[1] FALSE FALSE FALSE
--- function from context ---
function (inputfile, search_radius = 150000, promoter_radius = 200,
promoter_radius2 = 100, genome = c("hg38", "hg19", "mm10",
"mm9"), adjacent = FALSE, SNP = FALSE, PromoterStop = FALSE,
NearestTwoDirection = TRUE, UTR3 = FALSE, DataBase = c("GOterm"),
FAIMETest = FALSE, FisherTest = TRUE, collapsemethod = c("MaxMean",
"function", "ME", "maxRowVariance", "MinMean", "absMinMean",
"absMaxMean", "Average"), alpha = 5, logCheck = FALSE,
B = 100, na.rm = FALSE, min_Intersect_Count = 5)
{
options(warn = -1)
if (missing(inputfile)) {
stop("please give the input file")
}
if (!class(inputfile) %in% c("data.frame", "GRanges")) {
stop("please check the format of input file")
}
if (missing(DataBase)) {
DataBase = "GOterm"
}
if (missing(FAIMETest)) {
FAIMETest = FALSE
}
if (missing(FisherTest)) {
FisherTest = TRUE
}
if (missing(genome)) {
genome = "hg19"
}
if (missing(search_radius)) {
search_radius = 150000
}
if (missing(promoter_radius)) {
promoter_radius = 200
}
if (missing(promoter_radius2)) {
promoter_radius2 = 100
}
if (missing(SNP)) {
SNP = "False"
}
if (missing(adjacent)) {
adjacent = "False"
}
if (missing(PromoterStop)) {
PromoterStop = "False"
}
if (missing(NearestTwoDirection)) {
NearestTwoDirection = "True"
}
if (missing(UTR3)) {
UTR3 = "False"
}
if (missing(collapsemethod)) {
collapsemethod = "MaxMean"
}
if (missing(B)) {
B = 100
}
if (missing(alpha)) {
alpha = 5
}
if (missing(logCheck)) {
logCheck = FALSE
}
if (missing(na.rm)) {
na.rm = FALSE
}
if (missing(min_Intersect_Count)) {
min_Intersect_Count = 5
}
if (SNP %in% c("T", "TRUE", "True", TRUE)) {
SNP = "True"
}
if (SNP %in% c("F", "FALSE", "False", FALSE)) {
SNP = "False"
}
if (PromoterStop %in% c("T", "TRUE", "True", TRUE)) {
PromoterStop = "True"
}
if (PromoterStop %in% c("F", "FALSE", "False", FALSE)) {
PromoterStop = "False"
}
if (NearestTwoDirection %in% c("T", "TRUE", "True", TRUE)) {
NearestTwoDirection = "True"
}
if (NearestTwoDirection %in% c("F", "FALSE", "False", FALSE)) {
NearestTwoDirection = "False"
}
if (UTR3 %in% c("T", "TRUE", "True", TRUE)) {
UTR3 = "True"
}
if (UTR3 %in% c("F", "FALSE", "False", FALSE)) {
UTR3 = "False"
}
if (adjacent %in% c("T", "TRUE", "True", TRUE)) {
adjacent = "True"
}
if (adjacent %in% c("F", "FALSE", "False", FALSE)) {
adjacent = "False"
}
if (adjacent == "True") {
search_radius = 0
}
if (length(genome > 1))
genome = genome[1]
if (!collapsemethod %in% c("MaxMean", "function", "ME", "maxRowVariance",
"MinMean", "absMinMean", "absMaxMean", "Average")) {
stop("please check the collapsemethod")
}
data(GO_BP_list, package = "seq2pathway.data")
data(GO_MF_list, package = "seq2pathway.data")
data(GO_CC_list, package = "seq2pathway.data")
data(Des_BP_list, package = "seq2pathway.data")
data(Des_CC_list, package = "seq2pathway.data")
data(Des_MF_list, package = "seq2pathway.data")
seq2gene_result <- runseq2gene(inputfile = inputfile, search_radius = search_radius,
promoter_radius = promoter_radius, promoter_radius2 = promoter_radius2,
genome = genome, adjacent = adjacent, SNP = SNP, PromoterStop = PromoterStop,
NearestTwoDirection = NearestTwoDirection, UTR3 = UTR3)
seq2gene_result_fornext <- seq2gene_result[[2]]
seq2gene_result_fornext <- seq2gene_result_fornext[, c(1,
13)]
genename <- unique(seq2gene_result_fornext[, 2])
print("Start test..............")
if (FisherTest == TRUE) {
if (DataBase %in% c("GOterm", "BP", "MF", "CC")) {
FS_test <- FisherTest_GO_BP_MF_CC(gs = as.vector(genename),
genome = genome, min_Intersect_Count = min_Intersect_Count,
Ontology = DataBase)
}
else {
FS_test <- FisherTest_MsigDB(gsmap = DataBase, gs = as.vector(genename),
genome = genome, min_Intersect_Count = min_Intersect_Count)
}
}
if (FAIMETest == TRUE) {
tmpinfile = tempfile()
if (class(inputfile) == "data.frame") {
if (ncol(inputfile) < 5) {
stop("please check the format of the input data, some column is missing")
}
write.table(inputfile, file = tmpinfile, sep = "\t",
quote = FALSE, row.names = FALSE)
}
if (class(inputfile) == "GRanges") {
test <- as.data.frame(inputfile)
if (ncol(test) < 7) {
stop("please check the format of the input data, some column is missing")
}
if (ncol(test) >= 7) {
write.table(test[, c(6, 1, 2, 3, 7)], file = tmpinfile,
sep = "\t", quote = FALSE, row.names = FALSE)
}
}
peak_fornext <- read.table(file = tmpinfile, header = TRUE,
sep = "\t")
if (ncol(peak_fornext) < 5)
stop("Please check input file format, some required column is missing.")
peak_fornext <- peak_fornext[, c(1, 5)]
peak_anno_score <- merge(seq2gene_result_fornext, peak_fornext,
by = names(seq2gene_result_fornext)[1], all = TRUE)
dat_collapsed <- Peak_Gene_Collapse(input = peak_anno_score,
collapsemethod = collapsemethod)
dat_CP <- data.frame(dat_collapsed[, c(2:ncol(dat_collapsed))])
rownames(dat_CP) <- rownames(dat_collapsed)
colnames(dat_CP) <- colnames(dat_collapsed)[2:ncol(dat_collapsed)]
dat_collapsed$gene <- as.vector(toupper(rownames(dat_collapsed)))
gene2pathway_result <- list()
n.list = 0
if (DataBase %in% c("GOterm", "BP", "CC", "MF")) {
if (DataBase %in% c("GOterm", "BP")) {
GO_BP_FAIME <- rungene2pathway(dat = dat_CP,
gsmap = GO_BP_list, alpha = alpha, logCheck = logCheck,
method = "FAIME", na.rm = na.rm)
GO_BP_FAIME_N <- Normalize_F(input = GO_BP_FAIME)
GO_BP_FAIME_Pvalue <- rungene2pathway_EmpiricalP(dat = dat_CP,
gsmap = GO_BP_list, alpha = alpha, logCheck = logCheck,
method = "FAIME", B = B, na.rm = na.rm)
GO_BP_N_P <- merge(GO_BP_FAIME_N, GO_BP_FAIME_Pvalue,
by = "row.names", all = TRUE)
rownames(GO_BP_N_P) <- GO_BP_N_P$Row.names
GO_BP_N_P <- GO_BP_N_P[, -1]
for (i in 1:nrow(GO_BP_N_P)) {
intsect <- intersect(toupper(rownames(dat_CP)),
toupper(unlist(GO_BP_list[names(GO_BP_list) ==
rownames(GO_BP_N_P)[i]])))
GO_BP_N_P$Intersect_Count[i] <- length(intsect)
GO_BP_N_P$Intersect_gene[i] <- paste(intsect,
collapse = " ")
GO_BP_N_P$Intersect_element[i] <- paste(as.vector(dat_collapsed[dat_collapsed$gene %in%
intsect, c(1)]), collapse = " ")
rm(intsect)
GO_BP_N_P$Des[i] <- as.character(Des_BP_list[which(names(Des_BP_list) ==
rownames(GO_BP_N_P)[i])])
}
GO_BP_N_P <- GO_BP_N_P[GO_BP_N_P$Intersect_Count >=
min_Intersect_Count, ]
GO_BP_N_P <- GO_BP_N_P[, c(ncol(GO_BP_N_P), 1:(ncol(GO_BP_N_P) -
1))]
n.list = n.list + 1
gene2pathway_result[[n.list]] <- GO_BP_N_P
names(gene2pathway_result)[n.list] <- c("GO_BP")
}
if (DataBase %in% c("GOterm", "MF")) {
GO_MF_FAIME <- rungene2pathway(dat = dat_CP,
gsmap = GO_MF_list, alpha = alpha, logCheck = logCheck,
method = "FAIME", na.rm = na.rm)
GO_MF_FAIME_N <- Normalize_F(input = GO_MF_FAIME)
GO_MF_FAIME_Pvalue <- rungene2pathway_EmpiricalP(dat = dat_CP,
gsmap = GO_MF_list, alpha = alpha, logCheck = logCheck,
method = "FAIME", B = B, na.rm = na.rm)
GO_MF_N_P <- merge(GO_MF_FAIME_N, GO_MF_FAIME_Pvalue,
by = "row.names", all = TRUE)
rownames(GO_MF_N_P) <- GO_MF_N_P$Row.names
GO_MF_N_P <- GO_MF_N_P[, -1]
for (i in 1:nrow(GO_MF_N_P)) {
intsect <- intersect(toupper(rownames(dat_CP)),
toupper(unlist(GO_MF_list[names(GO_MF_list) ==
rownames(GO_MF_N_P)[i]])))
GO_MF_N_P$Intersect_Count[i] <- length(intsect)
GO_MF_N_P$Intersect_gene[i] <- paste(intsect,
collapse = " ")
GO_MF_N_P$Intersect_element[i] <- paste(as.vector(dat_collapsed[dat_collapsed$gene %in%
intsect, c(1)]), collapse = " ")
rm(intsect)
GO_MF_N_P$Des[i] <- as.character(Des_MF_list[which(names(Des_MF_list) ==
rownames(GO_MF_N_P)[i])])
}
GO_MF_N_P <- GO_MF_N_P[GO_MF_N_P$Intersect_Count >=
min_Intersect_Count, ]
GO_MF_N_P <- GO_MF_N_P[, c(ncol(GO_MF_N_P), 1:(ncol(GO_MF_N_P) -
1))]
n.list = n.list + 1
gene2pathway_result[[n.list]] <- GO_MF_N_P
names(gene2pathway_result)[n.list] <- c("GO_MF")
}
if (DataBase %in% c("GOterm", "CC")) {
GO_CC_FAIME <- rungene2pathway(dat = dat_CP,
gsmap = GO_CC_list, alpha = alpha, logCheck = logCheck,
method = "FAIME", na.rm = na.rm)
GO_CC_FAIME_N <- Normalize_F(input = GO_CC_FAIME)
GO_CC_FAIME_Pvalue <- rungene2pathway_EmpiricalP(dat = dat_CP,
gsmap = GO_CC_list, alpha = alpha, logCheck = logCheck,
method = "FAIME", B = B, na.rm = na.rm)
GO_CC_N_P <- merge(GO_CC_FAIME_N, GO_CC_FAIME_Pvalue,
by = "row.names", all = TRUE)
rownames(GO_CC_N_P) <- GO_CC_N_P$Row.names
GO_CC_N_P <- GO_CC_N_P[, -1]
for (i in 1:nrow(GO_CC_N_P)) {
intsect <- intersect(toupper(rownames(dat_CP)),
toupper(unlist(GO_CC_list[names(GO_CC_list) ==
rownames(GO_CC_N_P)[i]])))
GO_CC_N_P$Intersect_Count[i] <- length(intsect)
GO_CC_N_P$Intersect_gene[i] <- paste(intsect,
collapse = " ")
GO_CC_N_P$Intersect_element[i] <- paste(as.vector(dat_collapsed[dat_collapsed$gene %in%
intsect, c(1)]), collapse = " ")
rm(intsect)
GO_CC_N_P$Des[i] <- as.character(Des_CC_list[which(names(Des_CC_list) ==
rownames(GO_CC_N_P)[i])])
}
GO_CC_N_P <- GO_CC_N_P[GO_CC_N_P$Intersect_Count >=
min_Intersect_Count, ]
GO_CC_N_P <- GO_CC_N_P[, c(ncol(GO_CC_N_P), 1:(ncol(GO_CC_N_P) -
1))]
n.list = n.list + 1
gene2pathway_result[[n.list]] <- GO_CC_N_P
names(gene2pathway_result)[n.list] <- c("GO_CC")
}
}
else {
dat_FAIME <- rungene2pathway(dat = dat_CP, gsmap = DataBase,
alpha = alpha, logCheck = logCheck, method = "FAIME",
na.rm = na.rm)
N_FAIME <- Normalize_F(input = dat_FAIME)
dat_FAIME_Pvalue <- rungene2pathway_EmpiricalP(dat = dat_CP,
gsmap = DataBase, alpha = alpha, logCheck = logCheck,
method = "FAIME", B = B, na.rm = na.rm)
N_FAIME <- as.matrix(N_FAIME)
dat_FAIME_Pvalue <- as.matrix(dat_FAIME_Pvalue)
DB_N_P <- cbind(N_FAIME, as.matrix(dat_FAIME_Pvalue[match(rownames(N_FAIME),
rownames(dat_FAIME_Pvalue)), ]))
colnames(DB_N_P) <- c("score2pathscore_Normalized",
"score2pathscore_Pvalue")
DB_N_P <- as.data.frame(DB_N_P)
for (i in 1:nrow(DB_N_P)) {
if (class(DataBase) == "GSA.genesets") {
intsect <- intersect(toupper(rownames(dat_CP)),
toupper(unlist(DataBase$genesets[which(DataBase$geneset.names ==
rownames(DB_N_P)[i])])))
}
else if (class(DataBase) == "list") {
intsect <- intersect(toupper(rownames(dat_CP)),
toupper(unlist(DataBase[names(DataBase) ==
rownames(DB_N_P)[i]])))
}
DB_N_P$Intersect_Count[i] <- length(intsect)
DB_N_P$Intersect_gene[i] <- paste(intsect, collapse = " ")
DB_N_P$Intersect_element[i] <- paste(as.vector(dat_collapsed[dat_collapsed$gene %in%
intsect, c(1)]), collapse = " ")
rm(intsect)
if (class(DataBase) == "GSA.genesets") {
DB_N_P$Des[i] <- as.character(DataBase$geneset.descriptions[which(DataBase$geneset.names ==
rownames(DB_N_P)[i])])
}
}
DB_N_P <- DB_N_P[DB_N_P$Intersect_Count >= min_Intersect_Count,
]
gene2pathway_result <- DB_N_P[, c(ncol(DB_N_P), 1:(ncol(DB_N_P) -
1))]
}
print("gene2pathway analysis is done")
}
if (exists("gene2pathway_result") & exists("FS_test")) {
TotalResult <- list()
TotalResult[[1]] <- seq2gene_result
names(TotalResult)[1] <- "seq2gene_result"
TotalResult[[2]] <- gene2pathway_result
names(TotalResult)[2] <- "gene2pathway_result.FAIME"
TotalResult[[3]] <- FS_test
names(TotalResult)[3] <- "gene2pathway_result.FET"
TotalResult[[4]] <- dat_CP
names(TotalResult)[4] <- "gene_collapse"
}
else if (exists("gene2pathway_result") & exists("FS_test") ==
FALSE) {
TotalResult <- list()
TotalResult[[1]] <- seq2gene_result
names(TotalResult)[1] <- "seq2gene_result"
TotalResult[[2]] <- gene2pathway_result
names(TotalResult)[2] <- "gene2pathway_result.FAIME"
TotalResult[[3]] <- dat_CP
names(TotalResult)[3] <- "gene_collapse"
}
else if (exists("gene2pathway_result") == FALSE & exists("FS_test")) {
TotalResult <- list()
TotalResult[[1]] <- seq2gene_result
names(TotalResult)[1] <- "seq2gene_result"
TotalResult[[2]] <- FS_test
names(TotalResult)[2] <- "gene2pathway_result.FET"
}
return(TotalResult)
}
<bytecode: 0x7f973ecbddd0>
<environment: namespace:seq2pathway>
--- function search by body ---
Function runseq2pathway in namespace seq2pathway has this body.
----------- END OF FAILURE REPORT --------------
Fatal error: the condition has length > 1
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking running R code from vignettes ... SKIPPED
* checking re-building of vignette outputs ... SKIPPED
* checking PDF version of manual ... OK
* DONE
Status: 1 ERROR, 2 WARNINGs, 1 NOTE
See
‘/Users/biocbuild/bbs-3.9-bioc/meat/seq2pathway.Rcheck/00check.log’
for details.