Found 86918 results in 8562 files, showing top 50 files (show more).
biodbKegg:R/KeggPathwayConn.R: [ ]
61:         path <- self$getEntry(path.id)
59:     for (path.id in id) {
127:     for (path.id in id) {
304:     path_idx <- sub('^[^0-9]+', '', id)
322:     path_idx <- sub('^[^0-9]+', '', id)
29: KeggPathwayConn <- R6::R6Class("KeggPathwayConn",
40:     super$initialize(db.name='pathway', db.abbrev='path', ...)
62:         if ( ! is.null(path) && path$hasField('kegg.module.id')) {
65:             for (mod.id in path$getFieldValue('kegg.module.id')) {
144:             graph[[path.id]]=list(vertices=vert, edges=edg)
147:             graph[[path.id]]=NULL
309:         params=c(org_name='map', mapno=path_idx,
325:     img_filename <- paste0('pathwaymap-', path_idx)
331:             biodb::error0('Impossible to find pathway image path inside',
335:         tmp_file <- file.path(cache$getTmpFolderPath(),
2: #' The connector class to KEGG Pathway database.
16: #' conn=mybiodb$getFactory()$createConn('kegg.pathway')
18: #' # Retrieve all reactions related to a mouse pathway:
21: #' # Get a pathway graph
44: #' Retrieves all reactions part of a KEGG pathway. Connects to
45: #'     KEGG databases, and walk through all pathways submitted, and
58:     # Loop on all Pathway IDs
89: #' Takes a list of pathways IDs and converts them to the specified organism,
92: #' @param org The organism in which to search for pathways, as a KEGG organism
113: #' Builds a pathway graph in the form of two tables of vertices and edges,
115: #' @param id A character vector of KEGG pathway entry IDs.
120: #' @return A named list whose names are the pathway IDs, and values are lists
126:     # Loop on all pathway IDs
158: #' Builds a pathway graph, as an igraph object, using KEGG database.
159: #' @param id A character vector of KEGG pathway entry IDs.
196: #' Create a pathway graph picture, with some of its elements colorized.
197: #' @param id A KEGG pathway ID.
227: #' Extracts shapes from a pathway map image.
228: #' @param id A KEGG pathway ID.
303:     # Extract pathway number
308:         'show_pathway'),
329:             'src="([^"]+)"(\\s+.*)?\\s+(name|id)="pathwayimage"')
332:                 ' HTML page for pathway ID ', id, '.')
342:     img_file <- cache$getFilePath(cid, img_filename, 'png')
22: #' graph=conn$buildPathwayGraph('mmu00260')
98: convertToOrgPathways=function(id, org) {
122: buildPathwayGraph=function(id, directed=FALSE, drop=TRUE) {
166: getPathwayIgraph=function(id, directed=FALSE, drop=TRUE) {
173:         g <- self$buildPathwayGraph(id=id, directed=directed, drop=FALSE)
210:         pix <- private$getPathwayImage(id)
213:         shapes <- self$extractPathwayMapShapes(id=id, color2ids=color2ids)
233: ,extractPathwayMapShapes=function(id, color2ids) {
237:     html <- private$getPathwayHtml(id)
301: ,getPathwayHtml=function(id) {
319: getPathwayImage=function(id) {
321:     html <- private$getPathwayHtml(id)
CHRONOS:R/pathwayToGraph.R: [ ]
101:         path <- paste(dir, file, sep='//')
34:         paths <- list.files(xmlDir) 
83: pathwayToGraph <- function (i, ...)
3: createPathwayGraphs <- function(org, pathways, edgeTypes, doubleEdges, choice,
141: getPathwayType                    <- function(filepath, file)
159: metabolicPathwayToGraph           <- function(filepath)
347: nonMetabolicPathwayToGraph <- function(filepath, doubleEdges, groupMode)
102:         gr   <- metabolicPathwayToGraph(path)
119:         path <- paste(dir, file, sep='//')
120:         gr   <- nonMetabolicPathwayToGraph(path, doubleEdges, groupMode)
225: removeCompoundsMetabolicGraph     <- function(path)
228:     if(path$name != gsub('ec','',path$name)) { nodeType<-"enzyme" }
229:     enzymes  <- which(path$vertices$type == nodeType)
230:     vid      <- path$vertices$id
233:     if ( length(path$edges) > 0 )
243:             for (r1 in path$edges[path$edges$e1 == 
244:                                 path$vertices[,'id'][enzymes[j]],]$e2)  
247:                 for (r2 in path$edges[path$edges$e1 == 
248:                                 path$vertices[,'id'][which(vid == r1)],]$e2)
252:                     nid <- vid[which(path$vertices$id == r2)]
267:     xid    <- path$vertices$id[enzymes]
268:     names  <- path$vertices$names[enzymes]       
513: removeCompoundsNonMetabolicGraph <- function(path, unique, edgeTypes)
515:     if (is.null(path)) return(NULL)
516:     vid      <- as.numeric(path$vertices$id)
517:     etype    <- path$vertices$type
519:     if(path$name != gsub('ko','',path$name)) { nodeType <- "ortholog" }
522:     genesIndx <- which(path$vertices$type == nodeType)
528:         neighbors <- path$edges$e2[path$edges$e1 == vid[gi]]
546:                 idx1 <- which( path$edges$e1 == vid[gi] )
547:                 idx2 <- which( path$edges$e2 == vid[nbrId] )
549:                 TT   <- c( TT, paste((path$edges$type[idx]), collapse='_') )
557:                 cpdNeighbors <- path$edges$e2[ 
558:                                         which(path$edges$e1 == vid[nbrId]) ]
586:         names            <- unique(path$vertices$names[genesIndx])
598:             idx1 <- which(path$vertices$id == source[i])
599:             idx2 <- which(path$vertices$id == destin[i])
600:             source[i] <- names[ names == path$vertices$names[idx1] ]
601:             destin[i] <- names[ names == path$vertices$names[idx2] ]
623:         gids                <- path$vertices$id[genesIndx]
624:         names               <- unname(path$vertices$names[genesIndx])
31:     # Choose valid pathways
32:     if (missing(pathways))  
37:     if (!missing(pathways)) 
39:         paths <- paste(org, pathways, '.xml', sep='') 
44:     # Create compact adjacency matrices for given pathways.
45:     types  <- getPathwayType(paste(xmlDir, paths, sep='//'))
46:     N <- length(paths)
56:                     funcName=pathwayToGraph,
59:                     N=length(paths),
61:                     xmlDir, paths, types, FALSE, edgeTypes, 
64:     names(cAdjMats) <- gsub('.xml', '', paths)
67:     eAdjMats <- .doSafeParallel(funcName=pathwayToGraph,
70:                                 N=length(paths),
72:                                 xmlDir, paths, types, TRUE, edgeTypes, 
75:     names(eAdjMats) <- gsub('.xml', '', paths)
143:     types <- vector(mode='numeric', length=length(filepath))
144:     for (i in 1:length(filepath))
146:         num <- tail(unlist(strsplit(filepath[i], '//')), 1)
156: # Graph from Metabolic Pathways
161:     xmlDoc <- tryCatch(xmlTreeParse(filepath,error=NULL),
344: # Graph from Mon Metabolic Pathways
350:     xmlDoc         <- tryCatch(xmlTreeParse(filepath,error=NULL),
49:         'nonMetabolicPathwayToGraph', 'expandMetabolicGraph', 
51:         'metabolicPathwayToGraph', 'expandNonMetabolicGraph',
609:                 # Set new interaction types to apathetic
732:     # apathetic  3
NoRCE:R/pathway.R: [ ]
351:   path <- merge(merge1, symb, by = "gene")
65:     pathTable <- unique(keggPathwayDB(org_assembly))
71:     pathfreq <- as.data.frame(table(annot$pathway))
99:     pathT <- as.character(freq$Var1[enrich])
118:     pathways <- data.frame(unique(pathT))
203:     pathTable <- unique(reactomePathwayDB(org_assembly))
209:     pathfreq <- as.data.frame(table(annot$pathway))
235:     pathT <- as.character(freq$Var1[enrich])
540:   pathTable <- unique(WikiPathwayDB(org_assembly))
545:   pathfreq <- as.data.frame(table(annot$pathID))
571:   pathT <- as.character(freq$Var1[enrich])
578:   pathTerms <- as.character(r$pathTerm[match(pathT, r$pathID)])
628: pathwayEnrichment <- function(genes,
678:   pathfreq <- as.data.frame(table(annot$pathTerm))
710:   pathT <- as.character(freq$Var1[enrich])
718:   pathTerms <- as.character(r$pathTerm[match(pathT, r$pathID)])
270: reactomePathwayDB <- function(org_assembly = c("hg19",
357: keggPathwayDB <- function(org_assembly = c("hg19",
433: WikiPathwayDB <- function(org_assembly = c("hg19",
15: #' @param gmtFile File path of the gmt file
91:         file.path(x[1], x[2]))
95:         file.path(x[1], x[2]))
155: #' @param gmtFile File path of the gmt file
228:       file.path(x[1], x[2]))
231:       file.path(x[1], x[2]))
353:   return(path)
499: #' @param gmtFile File path of the gmt file
563:       file.path(x[1], x[2]))
567:       file.path(x[1], x[2]))
608: #' @param gmtFile File path of the gmt file
703:     file.path(x[1], x[2]))
706:     file.path(x[1], x[2]))
1: #' KEGG pathway enrichment
22: #' @return KEGG pathway enrichment results
68:     annot <- pathTable[which(pathTable$symbol %in% genes$g),]
72:     pathfreq <- pathfreq[which(pathfreq$Freq > 0),]
75:     geneSize = length(unique(pathTable$symbol))
77:     bckfreq <- as.data.frame(table(pathTable$pathway))
78:     notGene <- bckfreq[bckfreq$Var1 %in% pathfreq$Var1,]
79:     freq <- merge(pathfreq, notGene, by = "Var1")
104:     r <- annot[annot$pathway %in% pathT,]
106:     for (i in seq_along(pathT))
108:       if (length(which(pathT[i] == r$pathway)) > 0)
113:               as.character(r[which(pathT[i] == r$pathway),]$symbol)),
114:                      paste(pathT[i])))
119:     tmp <- character(length(pathT))
120:     if (nrow(pathways) > 0) {
122:         unlist(lapply(seq_len(nrow(pathways)), function(x)
123:           tmp[x] <- try(KEGGREST::keggGet(pathT[x])[[1]]$NAME)
129:         ID = pathT,
141: #' Reactome pathway enrichment
163: #' @return Reactome pathway enrichment results
206:     annot <- pathTable[which(pathTable$symbol %in% genes$g),]
210:     pathfreq <- pathfreq[which(pathfreq$Freq > 0),]
212:     geneSize = length(unique(pathTable$symbol))
214:     bckfreq <- as.data.frame(table(pathTable$pathway))
215:     notGene <- bckfreq[bckfreq$Var1 %in% pathfreq$Var1,]
216:     freq <- merge(pathfreq, notGene, by = "Var1")
240:     r <- annot[annot$pathway %in% pathT,]
244:     for (i in seq_along(pathT))
246:       if (length(which(pathT[i] == r$pathway)) > 0)
251:               list(as.character(r[which(pathT[i] == r$pathway),]$symbol)),
252:                      paste(pathT[i])))
258:         ID = pathT,
259:         Term = as.character(rt[order(match(rt$pathway, pathT)), ]$name),
279:   table1 <- data.frame(pathway = rep(names(xx), lapply(xx, length)),
282:   pn <- data.frame(pathway = rep(names(pn), lapply(pn, length)),
288:     ty <- table1[grepl("^R-HSA", table1$pathway),]
289:     pn1 <- pn[grepl("^R-HSA", pn$pathway),]
296:     ty <- table1[grepl("^R-MMU", table1$pathway),]
297:     pn1 <- pn[grepl("^R-MMU", pn$pathway),]
304:     ty <- table1[grepl("^R-DRE", table1$pathway),]
305:     pn1 <- pn[grepl("^R-DRE", pn$pathway),]
312:     ty <- table1[grepl("^R-RNO", table1$pathway),]
313:     pn1 <- pn[grepl("^R-RNO", pn$pathway),]
320:     ty <- table1[grepl("^R-CEL", table1$pathway),]
321:     pn1 <- pn[grepl("^R-CEL", pn$pathway),]
328:     ty <- table1[grepl("^R-SCE", table1$pathway),]
329:     pn1 <- pn[grepl("^R-SCE", pn$pathway),]
342:     ty <- table1[grepl("^R-DME", table1$pathway),]
343:     pn1 <- pn[grepl("^R-DME", pn$pathway),]
349:                   by = "pathway",
369:     kegg <- org.Hs.eg.db::org.Hs.egPATH2EG
377:     kegg <- org.Mm.eg.db::org.Mm.egPATH2EG
385:     kegg <- org.Dr.eg.db::org.Dr.egPATH2EG
393:     kegg <- org.Rn.eg.db::org.Rn.egPATH2EG
401:     kegg <- org.Ce.eg.db::org.Ce.egPATH2EG
409:     kegg <- org.Sc.sgd.db::org.Sc.sgdPATH2ORF
417:     kegg <- org.Dm.eg.db::org.Dm.egPATH2EG
423:   pathTable <-
424:     data.frame(pathway = paste0(prefix, rep(names(kegg2),
429:   pathTable <- merge(pathTable, x, by = "gene")
430:   return(pathTable)
472:     do.call(rbind, strsplit(as.character(gmtFile$pathTerm), '%'))
478:         pathID = tmp[, 3],
479:         pathTerm = tmp[, 1]
506: #' @return Wiki Pathway Enrichment
543:   annot <- pathTable[which(pathTable$gene %in% genes$g),]
546:   pathfreq <- pathfreq[which(pathfreq$Freq > 0),]
548:   geneSize = length(unique(pathTable$gene))
549:   bckfreq <- as.data.frame(table(pathTable$pathID))
550:   notGene <- bckfreq[bckfreq$Var1 %in% pathfreq$Var1,]
551:   freq <- merge(pathfreq, notGene, by = "Var1")
576:   r <- annot[annot$pathID %in% pathT,]
579:   for (i in seq_along(pathT))
581:     if (length(which(pathT[i] == r$pathID)) > 0)
585:           list(as.character(r[which(pathT[i] == r$pathID),]$gene)),
586:                           paste(pathT[i])))
593:       ID = pathT,
594:       Term = pathTerms,
604: #' For a given gmt file of a specific pathway database, pathway enrichment
626: #' @return Pathway Enrichment
670:     pathTable <-
675:     pathTable <- geneListEnrich(f = gmtFile, isSymbol = isSymbol)
677:   annot <- pathTable[which(pathTable$symbol %in% genes$g),]
679:   pathfreq <- pathfreq[which(pathfreq$Freq > 0),]
683:     geneSize = length(unique(pathTable$symbol))
688:   bckfreq <- as.data.frame(table(pathTable$pathTerm))
690:   notGene <- bckfreq[bckfreq$Var1 %in% pathfreq$Var1,]
691:   freq <- merge(pathfreq, notGene, by = "Var1")
716:   r <- annot[annot$pathTerm %in% pathT,]
720:   for (i in seq_along(pathT))
722:     if (length(which(pathT[i] == r$pathTerm)) > 0)
725:           list(as.character(r[which(pathT[i] == r$pathTerm),]$symbol)),
726:                           paste(pathT[i])))
731:       ID = pathT,
732:       Term = pathTerms,
742: #' Convert gmt formatted pathway file to the Pathway ID, Entrez, symbol
745: #' @param gmtName Custom pathway gmt file
814:     colnames(f) <- c('pathTerm', 'Entrez', 'symbol')
829:     colnames(f) <- c('pathTerm', 'symbol', 'Entrez')
851:     colnames(f) <- c('pathTerm', 'Entrez', 'symbol')
862:     colnames(f) <- c('pathTerm', 'symbol', 'Entrez')
278:   xx <- as.list(reactome.db::reactomePATHID2EXTID)
281:   pn <- as.list(reactome.db::reactomePATHID2NAME)
443:       rWikiPathways::downloadPathwayArchive(organism = "Homo sapiens",
447:       rWikiPathways::downloadPathwayArchive(organism = "Mus musculus",
451:       rWikiPathways::downloadPathwayArchive(organism = "Danio rerio",
455:       rWikiPathways::downloadPathwayArchive(organism = "Rattus norvegicus",
459:       rWikiPathways::downloadPathwayArchive(
463:       rWikiPathways::downloadPathwayArchive(
467:       rWikiPathways::downloadPathwayArchive(
485: #' WikiPathways Enrichment
seq2pathway:R/seq2pathway.r: [ ]
928:    path <-paste(system.file(package="seq2pathway"),
856: get_python3_command_path <- function()
859:   python3_command_path <- Sys.which2("python")
1029:     script_path <- file.path(tempdir(), name)
275: pathwaygene<-length(intersect(toupper(gene_list[[i]]),
484: pathwaygene<-length(intersect(toupper(gsmap$genesets[[i]]),
843:   cmdpath <- Sys.which(cmdname)
1051: runseq2pathway<-function(inputfile,
1161: gene2pathway_result<-list()
1310: gene2pathway_test<-function(dat,DataBase="GOterm",FisherTest=TRUE,
1344: gene2pathway_result<-list()
854: #get_python3_command_path: funtion from Herve Pages, Bioconductor Maintainance Team, Oct 9 2020
858: #  python3_command_path <- Sys.which2("python3") #3/3/2021 by Holly
860:   if (python3_command_path != "")
864:           return(python3_command_path)}
873: #  python3_command_path <- Sys.which2("python")
874:   python3_command_path <- Sys.which2("python3")  #3/3/2021 by Holly
875:   if (python3_command_path != ""){
876:     print(paste0("python3 found: ",python3_command_path))
877:     return(python3_command_path)}
880:        "  'python3' (or 'python') executable is in your PATH.")
924:     ### assign the path of main function
932:     path <-paste(system.file(package="seq2pathway"),
976: 		sink(file.path(tempdir(),name,fsep = .Platform$file.sep))} 
994:     cat("'", path, "').load_module()",sep="")
1030:     if (!file.exists(script_path))
1032:     mypython <- get_python3_command_path()
1034:     response <- system2(mypython, args=script_path,
75: data(gencode_coding,package="seq2pathway.data")
155: data(gencode_coding,package="seq2pathway.data")
214: ####load GP pathway information
216:    data(GO_BP_list,package="seq2pathway.data")
217:    data(GO_MF_list,package="seq2pathway.data")
218:    data(GO_CC_list,package="seq2pathway.data") 
219:    data(Des_BP_list,package="seq2pathway.data")
220:    data(Des_MF_list,package="seq2pathway.data")
221:    data(Des_CC_list,package="seq2pathway.data")
223:          data(GO_BP_list,package="seq2pathway.data") 
224:          data(Des_BP_list,package="seq2pathway.data")
226:               data(GO_MF_list,package="seq2pathway.data") 
227:               data(Des_MF_list,package="seq2pathway.data")
229:                   data(GO_CC_list,package="seq2pathway.data")
230:                   data(Des_CC_list,package="seq2pathway.data")
237: data(GO_GENCODE_df_hg_v36,package="seq2pathway.data")
240: data(GO_GENCODE_df_hg_v19,package="seq2pathway.data")
243: data(GO_GENCODE_df_mm_vM25,package="seq2pathway.data")
246: data(GO_GENCODE_df_mm_vM1,package="seq2pathway.data")
280: c<-pathwaygene-a
289: mdat[i,7]<-pathwaygene
321: pathwaygene<-length(intersect(toupper(GO_BP_list[[i]]),
326: c<-pathwaygene-a
335: mdat[i,7]<-pathwaygene
367: pathwaygene<-length(intersect(toupper(GO_CC_list[[i]]),
372: c<-pathwaygene-a
381: mdat[i,7]<-pathwaygene
413: pathwaygene<-length(intersect(toupper(GO_MF_list[[i]]),
418: c<-pathwaygene-a
427: mdat[i,7]<-pathwaygene
455: data(Msig_GENCODE_df_hg_v36,package="seq2pathway.data")
458: data(Msig_GENCODE_df_hg_v19,package="seq2pathway.data")
461: data(Msig_GENCODE_df_mm_vM25,package="seq2pathway.data")
464: data(Msig_GENCODE_df_mm_vM1,package="seq2pathway.data")
489: c<-pathwaygene-a
498: mdat[i,7]<-pathwaygene
549: data(gencode_coding,package="seq2pathway.data")
647: rungene2pathway <-
704: colnames(res) <- c(paste(colnames(dat),"2pathscore",sep=""))
705: print("gene2pathway calculates score....... done")
711: rungene2pathway_EmpiricalP <-
770: colnames(res) <- c(paste(colnames(dat),"2pathscore",sep=""))
829: colnames(res_p) <- c(paste(colnames(dat),"2pathscore_Pvalue",sep=""))
832: print("pathwayscore Empirical Pvalue calculation..........done")
849:   success <- grepl(pattern1, cmdpath, fixed=TRUE) ||
850:     grepl(pattern2, cmdpath, fixed=TRUE)
851:   if (success) cmdpath else ""
1007:     #cat(paste("inputpath=","'",inputpath,"/'",sep=""),sep="\n")
1009:     #cat(paste("outputpath=","'",outputpath,"/'",sep=""),sep="\n")
1018:     cat(paste("pwd=","'",system.file(package="seq2pathway.data"),"/extdata/'",sep=""),sep="\n")
1103: data(GO_BP_list,package="seq2pathway.data")
1104: data(GO_MF_list,package="seq2pathway.data")
1105: data(GO_CC_list,package="seq2pathway.data")
1106: data(Des_BP_list,package="seq2pathway.data")
1107: data(Des_CC_list,package="seq2pathway.data")
1108: data(Des_MF_list,package="seq2pathway.data")
1134: #############################rungene2pathway,normalization,empiricalP,summary table
1166: GO_BP_FAIME<-rungene2pathway(dat=dat_CP,gsmap=GO_BP_list,alpha=alpha,logCheck=logCheck,
1171: GO_BP_FAIME_Pvalue<-rungene2pathway_EmpiricalP(dat=dat_CP,gsmap=GO_BP_list,
1174: ########gene2pathway table
1190: gene2pathway_result[[n.list]]<-GO_BP_N_P
1191: names(gene2pathway_result)[n.list]<-c("GO_BP")
1195: GO_MF_FAIME<-rungene2pathway(dat=dat_CP,gsmap=GO_MF_list,alpha=alpha,logCheck=logCheck,
1198: GO_MF_FAIME_Pvalue<-rungene2pathway_EmpiricalP(dat=dat_CP,gsmap=GO_MF_list,
1215: gene2pathway_result[[n.list]]<-GO_MF_N_P
1216: names(gene2pathway_result)[n.list]<-c("GO_MF")
1220: GO_CC_FAIME<-rungene2pathway(dat=dat_CP,gsmap=GO_CC_list,alpha=alpha,logCheck=logCheck,
1223: GO_CC_FAIME_Pvalue<-rungene2pathway_EmpiricalP(dat=dat_CP,gsmap=GO_CC_list,
1241: gene2pathway_result[[n.list]]<-GO_CC_N_P
1242: names(gene2pathway_result)[n.list]<-c("GO_CC")
1245: dat_FAIME<-rungene2pathway(dat=dat_CP,gsmap=DataBase,alpha=alpha,logCheck=logCheck,
1248: dat_FAIME_Pvalue<-rungene2pathway_EmpiricalP(dat=dat_CP,gsmap=DataBase,
1255: colnames(DB_N_P)<-c("score2pathscore_Normalized","score2pathscore_Pvalue")
1274: gene2pathway_result<-DB_N_P[,c(ncol(DB_N_P),1:(ncol(DB_N_P)-1))]
1276: print("gene2pathway analysis is done")
1279: if(exists("gene2pathway_result")&exists("FS_test")){
1283: TotalResult[[2]]<-gene2pathway_result
1284: names(TotalResult)[2]<-"gene2pathway_result.FAIME"
1286: names(TotalResult)[3]<-"gene2pathway_result.FET"
1289: }else if(exists("gene2pathway_result")&exists("FS_test")==FALSE){
1293: TotalResult[[2]]<-gene2pathway_result
1294: names(TotalResult)[2]<-"gene2pathway_result.FAIME"
1298: else if(exists("gene2pathway_result")==FALSE&exists("FS_test")){
1303: names(TotalResult)[2]<-"gene2pathway_result.FET"
1326: data(GO_BP_list,package="seq2pathway.data")
1327: data(GO_MF_list,package="seq2pathway.data")
1328: data(GO_CC_list,package="seq2pathway.data")
1329: data(Des_BP_list,package="seq2pathway.data")
1330: data(Des_CC_list,package="seq2pathway.data")
1331: data(Des_MF_list,package="seq2pathway.data")
1346: #############################rungene2pathway,normalization,empiricalP,summary table
1348: gene2pathway_result<-list()
1352:   GO_BP_method<-rungene2pathway(dat=dat,gsmap=GO_BP_list,alpha=alpha,logCheck=logCheck,
1358:     GO_BP_method_Pvalue<-rungene2pathway_EmpiricalP(dat=dat,gsmap=GO_BP_list,alpha=alpha,
1364:   ########gene2pathway table
1376:   gene2pathway_result[[n.list]]<-GO_BP_N_P
1377:   names(gene2pathway_result)[n.list]<-c("GO_BP")
1380:     GO_MF_method<-rungene2pathway(dat=dat,gsmap=GO_MF_list,alpha=alpha,logCheck=logCheck,
1384:       GO_MF_method_Pvalue<-rungene2pathway_EmpiricalP(dat=dat,gsmap=GO_MF_list,alpha=alpha,
1402:   gene2pathway_result[[n.list]]<-GO_MF_N_P
1403:   names(gene2pathway_result)[n.list]<-c("GO_MF")
1406:    GO_CC_method<-rungene2pathway(dat=dat,gsmap=GO_CC_list,alpha=alpha,logCheck=logCheck,
1410:       GO_CC_method_Pvalue<-rungene2pathway_EmpiricalP(dat=dat,gsmap=GO_CC_list,alpha=alpha,
1427:   gene2pathway_result[[n.list]]<-GO_CC_N_P
1428:   names(gene2pathway_result)[n.list]<-c("GO_CC")
1431: dat_method<-rungene2pathway(dat=dat,gsmap=DataBase,alpha=alpha,logCheck=logCheck,
1435: dat_method_Pvalue<-rungene2pathway_EmpiricalP(dat=dat,gsmap=DataBase,alpha=alpha,
1443: colnames(DB_N_P)<-c("score2pathscore_Normalized","score2pathscore_Pvalue")
1464: gene2pathway_result<-DB_N_P[,c(ncol(DB_N_P),1:(ncol(DB_N_P)-1))]
1466: print("gene2pathway analysis is done")
1470: if(exists("gene2pathway_result")&exists("FS_test")){
1472: TResult[[1]]<-gene2pathway_result
1473: names(TResult)[1]<-"gene2pathway_result.2"
1475: names(TResult)[2]<-"gene2pathway_result.FET"
1476: }else if(exists("gene2pathway_result")&exists("FS_test")==FALSE){
1477: TResult<-gene2pathway_result
1479: else if(exists("gene2pathway_result")==FALSE&exists("FS_test")){
cisPath:inst/extdata/D3/cisPath.js: [ ]
127: var path = svg.append('svg:g').selectAll('path'),
2499: function ShowShortestPath(){
2: var basePath1="./PPIinfo/";
3: var basePath2="./PPIinfo/";
2630: function ShowShortestPath1(){
2711: var swiss2paths={};
2765: function showPath10(){
2778: function addResultPath10(p){
2784: function addFirstPath10(p){
2800: function addLastPath10(p){
2823: function addPreviousPath10(p){
2842: function addNextPath10(p){
2560: var resultPaths=[];
2561: function ShowPaths(allPaths){
2616: function ShowPathView(index){
2712: function generatePaths(swiss, root){
2729: function ShowShortestPathExp(){
2763: var showPathFirst=0;
2764: var showPathEnd=10;
3044: function getCisPathJS(){
3065: function getCisPathJSRetry(urltry){
3096: function getPathsForTargetProtein(swissID){
3118: function getPathsForTargetProteinRetry(urltry){
53:   .append('svg:path')
68:   .append('svg:path')
94:   .append('svg:path')
109:   .append('svg:path')
115: var drag_line = svg.append('svg:path')
166:   path.attr('d', function(d) {
360:   // path (link) group
381:   path = path.data(links);
384:   path.classed('selected', function(d) { return d === selected_link; })
393:   path.enter().append('svg:path')
414:   path.exit().remove();
2384: ///////////////////////////////////////////////////////////////////////shortest path
2504:        alert("No path between this two proteins!");
2508:        alert("No path between this two proteins!");
2568:     addTh(mycurrent_row, "Path");
2601:         mycurrent_button.id = "path"+x;
2614:     ShowPathView("path0");
2701:        alert("Sorry, detect no path from "+swiss1+" to "+ swiss2);
3097:    var url="./js/"+swissID+"_path.js";
954: 	 document.getElementById("detectPath").disabled=true;
1380:   idx=pathLen-1-idx;
1415: 	var url=basePath2+sourceSwiss+".js";
1679: 	var url=basePath2+swiss1+".js";
1684:            if(this.url==(basePath2+swiss1+".js")){
1820:   var url=basePath2+"A0A5B9.js";
1827:         debugObj("basePath1:"+basePath1);
1831:         basePath1="../geneset20140628/";
1832:         basePath2="../20140628PPI/";
1833:         debugObj("basePath1:"+basePath1);
1845:   var url=basePath2+"gene2swiss.js";
1899: 	var url=basePath2+"swiss2gene.js";
1954: 	var url=basePath2+"swiss2swiss.js";
2021: 	var url=basePath1+"PPI.js";
2411:     	 ShowShortestPath();
2421:           document.getElementById("detectPath").disabled=false;
2426:        document.getElementById("detectPath").disabled=true;
2438:           document.getElementById("detectPath").disabled=false;
2443:        document.getElementById("detectPath").disabled=true;
2515:     document.getElementById("detectPath").disabled=true;
2530:           document.getElementById("detectPath").disabled=false;
2543:            setTimeout("ShowShortestPath1()",1000);
2549:     setTimeout("ShowShortestPath1()",1000);
2574: 	    mycurrent_row.id="pathrow"+x;
2608: 	showPath10();
2611:     document.getElementById("detectPath").disabled=false;
2625: 	  	document.getElementById("pathrow"+x).className="rowNotSelected";
2627: 	document.getElementById("pathrow"+i).className="rowSelected";
2705:     swiss2paths={};
2707:     debugObj(swiss2paths[swiss2]);
2708:     debugObj(swiss2paths[swiss2].length);
2709:     ShowPaths(swiss2paths[swiss2]);
2713:     swiss2paths[swiss]=[];
2715:        swiss2paths[swiss].push(swiss);
2724:         for(var y in swiss2paths[nodes[x]]){
2725:             swiss2paths[swiss].push(swiss2paths[nodes[x]][y]+"#"+swiss);
2760:     ShowShortestPath();
2771:     addResultPath10(p);
2772:     addFirstPath10(p);
2773:     addPreviousPath10(p);
2774:     addNextPath10(p);
2775:     addLastPath10(p);
2796:     resultSPAN.addEventListener("click", function(e){showPathFirst=0;showPath10();}, false);
2819:     resultSPAN.addEventListener("click", function(e){showPathFirst=newFirst;showPath10();}, false);
2838:     resultSPAN.addEventListener("click", function(e){showPathFirst=newFirst;showPath10();}, false);
2857:     resultSPAN.addEventListener("click", function(e){showPathFirst=newFirst;showPath10();}, false);
2879: 	  	document.getElementById("pathrow"+i).style.display="none";
2882:         document.getElementById("pathrow"+i).style.display="";
3020: ...(31 bytes skipped)...ange", function(e){document.getElementById('targetPtxt').value=this.value;checkValid2();ShowShortestPath();}, false);
3108:         json.paths.pop();
3109:     	ShowPaths(json.paths);
3138:         json.paths.pop();
3139:     	ShowPaths(json.paths);
956: 	 document.getElementById("allShortestPaths").style.display="none";
957: 	 document.getElementById("allShortestPathsP").style.display="none";
1253: 	graphName = "cisPathValue#"+graphName;
1267:       if(key.substr(0,13)!="cisPathValue#"){
1285: 	graphName = "cisPathValue#"+graphName;
1306: 	graphName = "cisPathValue#"+graphName;
1327:       if(key.substr(0,13)!="cisPathValue#"){
1418:     callback: "cisPathCallBack",
1682:        callback: "cisPathCallBack",
1823:     callback: "cisPathCallBack",
1850:     callback: "cisPathCallBack",
1880:     callback: "cisPathCallBack",
1905:     callback: "cisPathCallBack",
1935:     callback: "cisPathCallBack",
1960:     callback: "cisPathCallBack",
1990:     callback: "cisPathCallBack",
2025:     callback: "cisPathCallBack",
2063:     callback: "cisPathCallBack",
2110: 	getCisPathJS();
2378:     var graphName="cisPathHTML";
2476: function ShowShortestPathWorker(){
2477:    var worker = new Worker("./D3/cisPathWorker.js");
2480:       var resultPaths=event.data.resultPaths;
2481:       ShowPaths(resultPaths);
2484:       var resultPaths=[];
2485:       ShowPaths(resultPaths);
2514:     document.getElementById("detectPathExp").disabled=true;
2521:     document.getElementById("allShortestPaths").style.display="none";
2522:     document.getElementById("allShortestPathsP").style.display="none";
2529:           document.getElementById("detectPathExp").disabled=false;
2533:           getPathsForTargetProtein(swiss2);
2539:            ShowShortestPathWorker();
2562:     resultPaths=allPaths;
2563:     var table=document.getElementById("allShortestPaths");
2571: 	for(var x in allPaths){
2572: 	    var nodes=allPaths[x].split("#");
2602:         mycurrent_button.addEventListener("click", function(e){ShowPathView(this.id);}, false);
2607: 	showPathFirst=0;
2610:     document.getElementById("detectPathExp").disabled=false;
2612:     document.getElementById("allShortestPaths").style.display="";
2613:     document.getElementById("allShortestPathsP").style.display="";
2617:     var total=resultPaths.length;
2619:     var nodes=resultPaths[i].split("#");
2706:     generatePaths(swiss2, swiss1);
2723:         generatePaths(nodes[x], root);
2767:     var p=document.getElementById("allShortestPathsP");
2780:     var content="Results: "+showPathFirst+"-"+showPathEnd+" of "+resultPaths.length+" ";
2790:     if(showPathFirst==0){
2805: 	var newFirst=(resultPaths.length-resultPaths.length%10);
2806: 	if(newFirst==resultPaths.length){
2807: 	   newFirst=resultPaths.length-10;
2813:     if(showPathEnd==resultPaths.length){
2828:     if(showPathFirst==0){
2834:     var newFirst=showPathFirst-10;
2847:     if(showPathEnd==resultPaths.length){
2853:     var newFirst=showPathFirst+10;
2854:     if(newFirst >= resultPaths.length){
2855:        newFirst = (resultPaths.length-resultPaths.length%10);
2863: 	var total=resultPaths.length;
2864: 	if(showPathFirst >= total){
2865: 	   showPathFirst=(total-total%10);
2867: 	if(showPathFirst == total){
2868: 	   showPathFirst = total-10;
2870:     if(showPathFirst < 0){
2871: 	   showPathFirst = 0;
2873: 	showPathFirst=showPathFirst-(showPathFirst%10);
2874: 	showPathEnd=showPathFirst+10;
2875: 	if(showPathEnd > total){
2876: 	   showPathEnd = total;
2881:     for(var i=showPathFirst;i<showPathEnd;i++){
3049:     callback: "cisPathCallBack",
3061:         getCisPathJSRetry(this.url);
3078:     callback: "cisPathCallBack",
3090:         getCisPathJSRetry(this.url);
3101:      callback: "cisPathCallBack",
3114:         getPathsForTargetProteinRetry(this.url);
3131:     callback: "cisPathCallBack",
3144:         getPathsForTargetProteinRetry(this.url);
3151: 	document.getElementById("detectPathExp").disabled=true;
3156: 	document.getElementById("detectPathExp").disabled=false;
cisPath:inst/extdata/D3/cisPathWeb.js: [ ]
127: var path = svg.append('svg:g').selectAll('path'),
2501: function ShowShortestPath(){
2: var basePath1="./PPIinfo/";
3: var basePath2="./PPIinfo/";
2632: function ShowShortestPath1(){
2719: var swiss2paths={};
2753: function showPath10(){
2766: function addResultPath10(p){
2772: function addFirstPath10(p){
2788: function addLastPath10(p){
2811: function addPreviousPath10(p){
2830: function addNextPath10(p){
2548: var resultPaths=[];
2549: function ShowPaths(allPaths){
2615: function ShowPathView(index){
2720: function generatePaths(swiss, root){
2737: function ShowShortestPathExp(){
2751: var showPathFirst=0;
2752: var showPathEnd=10;
53:   .append('svg:path')
68:   .append('svg:path')
94:   .append('svg:path')
109:   .append('svg:path')
115: var drag_line = svg.append('svg:path')
166:   path.attr('d', function(d) {
360:   // path (link) group
381:   path = path.data(links);
384:   path.classed('selected', function(d) { return d === selected_link; })
393:   path.enter().append('svg:path')
414:   path.exit().remove();
2386: ///////////////////////////////////////////////////////////////////////shortest path
2506:        alert("No path between this two proteins!");
2510:        alert("No path between this two proteins!");
2554:     	 alert("Sorry, detect no path from "+swiss1+" to "+ swiss2);
2566:     addTh(mycurrent_row, "Path");
2599:         mycurrent_button.id = "path"+x;
2613:       ShowPathView("path0");
2705:        alert("Sorry, detect no path from "+name1+" to "+ name2);
954: 	 document.getElementById("detectPath").disabled=true;
1380:   idx=pathLen-1-idx;
1415: 	var url=basePath2+sourceSwiss+".js";
1679: 	var url=basePath2+swiss1+".js";
1684:            if(this.url==(basePath2+swiss1+".js")){
1820:   var url=basePath2+"A0A5B9.js";
1827:         debugObj("basePath1:"+basePath1);
1831:         basePath1="../geneset20140628/";
1832:         basePath2="../20140628PPI/";
1833:         debugObj("basePath1:"+basePath1);
1845:   var url=basePath2+"gene2swiss.js";
1899: 	var url=basePath2+"swiss2gene.js";
1954: 	var url=basePath2+"swiss2swiss.js";
2021: 	var url=basePath1+"PPI.js";
2413:     	 ShowShortestPath();
2423:           document.getElementById("detectPath").disabled=false;
2428:        document.getElementById("detectPath").disabled=true;
2440:           document.getElementById("detectPath").disabled=false;
2445:        document.getElementById("detectPath").disabled=true;
2517:     document.getElementById("detectPath").disabled=true;
2531:            setTimeout("ShowShortestPath1()",1000);
2537:     setTimeout("ShowShortestPath1()",1000);
2558:        document.getElementById("detectPath").disabled=false;
2572: 	    mycurrent_row.id="pathrow"+x;
2606: 	showPath10();
2610:     document.getElementById("detectPath").disabled=false;
2627: 	  	document.getElementById("pathrow"+x).className="rowNotSelected";
2629: 	document.getElementById("pathrow"+i).className="rowSelected";
2709:        document.getElementById("detectPath").disabled=false;
2713:     swiss2paths={};
2715:     debugObj(swiss2paths[swiss2]);
2716:     debugObj(swiss2paths[swiss2].length);
2717:     ShowPaths(swiss2paths[swiss2]);
2721:     swiss2paths[swiss]=[];
2723:        swiss2paths[swiss].push(swiss);
2732:         for(var y in swiss2paths[nodes[x]]){
2733:             swiss2paths[swiss].push(swiss2paths[nodes[x]][y]+"#"+swiss);
2748:     ShowShortestPath();
2759:     addResultPath10(p);
2760:     addFirstPath10(p);
2761:     addPreviousPath10(p);
2762:     addNextPath10(p);
2763:     addLastPath10(p);
2784:     resultSPAN.addEventListener("click", function(e){showPathFirst=0;showPath10();}, false);
2807:     resultSPAN.addEventListener("click", function(e){showPathFirst=newFirst;showPath10();}, false);
2826:     resultSPAN.addEventListener("click", function(e){showPathFirst=newFirst;showPath10();}, false);
2845:     resultSPAN.addEventListener("click", function(e){showPathFirst=newFirst;showPath10();}, false);
2867: 	  	document.getElementById("pathrow"+i).style.display="none";
2870:         document.getElementById("pathrow"+i).style.display="";
956: 	 document.getElementById("allShortestPaths").style.display="none";
957: 	 document.getElementById("allShortestPathsP").style.display="none";
1253: 	graphName = "cisPathValue#"+graphName;
1267:       if(key.substr(0,13)!="cisPathValue#"){
1285: 	graphName = "cisPathValue#"+graphName;
1306: 	graphName = "cisPathValue#"+graphName;
1327:       if(key.substr(0,13)!="cisPathValue#"){
1418:     callback: "cisPathCallBack",
1682:        callback: "cisPathCallBack",
1823:     callback: "cisPathCallBack",
1850:     callback: "cisPathCallBack",
1880:     callback: "cisPathCallBack",
1905:     callback: "cisPathCallBack",
1935:     callback: "cisPathCallBack",
1960:     callback: "cisPathCallBack",
1990:     callback: "cisPathCallBack",
2025:     callback: "cisPathCallBack",
2063:     callback: "cisPathCallBack",
2380:     var graphName="cisPathHTML";
2478: function ShowShortestPathWorker(){
2479:    var worker = new Worker("./D3/cisPathWorker.js");
2482:       var resultPaths=event.data.resultPaths;
2483:       ShowPaths(resultPaths);
2486:       var resultPaths=[];
2487:       ShowPaths(resultPaths);
2516:     document.getElementById("detectPathExp").disabled=true;
2523:     document.getElementById("allShortestPaths").style.display="none";
2524:     document.getElementById("allShortestPathsP").style.display="none";
2527:            ShowShortestPathWorker();
2550:     resultPaths=allPaths;
2551:     if(resultPaths.length==0){
2557:        document.getElementById("detectPathExp").disabled=false;
2561:     var table=document.getElementById("allShortestPaths");
2569: 	for(var x in allPaths){
2570: 	    var nodes=allPaths[x].split("#");
2600:         mycurrent_button.addEventListener("click", function(e){ShowPathView(this.id);}, false);
2605: 	showPathFirst=0;
2609:     document.getElementById("detectPathExp").disabled=false;
2611:     document.getElementById("allShortestPaths").style.display="";
2612:     document.getElementById("allShortestPathsP").style.display="";
2616:     var total=resultPaths.length;
2618:     if(i>=resultPaths.length){
2621:     var nodes=resultPaths[i].split("#");
2708:        document.getElementById("detectPathExp").disabled=false;
2714:     generatePaths(swiss2, swiss1);
2731:         generatePaths(nodes[x], root);
2755:     var p=document.getElementById("allShortestPathsP");
2768:     var content="Results: "+showPathFirst+"-"+showPathEnd+" of "+resultPaths.length+" ";
2778:     if(showPathFirst==0){
2793: 	var newFirst=(resultPaths.length-resultPaths.length%10);
2794: 	if(newFirst==resultPaths.length){
2795: 	   newFirst=resultPaths.length-10;
2801:     if(showPathEnd==resultPaths.length){
2816:     if(showPathFirst==0){
2822:     var newFirst=showPathFirst-10;
2835:     if(showPathEnd==resultPaths.length){
2841:     var newFirst=showPathFirst+10;
2842:     if(newFirst >= resultPaths.length){
2843:        newFirst = (resultPaths.length-resultPaths.length%10);
2851: 	var total=resultPaths.length;
2852: 	if(showPathFirst >= total){
2853: 	   showPathFirst=(total-total%10);
2855: 	if(showPathFirst == total){
2856: 	   showPathFirst = total-10;
2858:     if(showPathFirst < 0){
2859: 	   showPathFirst = 0;
2861: 	showPathFirst=showPathFirst-(showPathFirst%10);
2862: 	showPathEnd=showPathFirst+10;
2863: 	if(showPathEnd > total){
2864: 	   showPathEnd = total;
2869:     for(var i=showPathFirst;i<showPathEnd;i++){
2942: 	document.getElementById("detectPathExp").disabled=true;
2947: 	document.getElementById("detectPathExp").disabled=false;
methylPipe:R/Allfunctions.R: [ ]
223:       path <- paste0(files_location,"/",all_files[[i]])
28:     filename <- file.path(output_folder,
31:     filename <- file.path(output_folder,
58:     all_files <- list.files(path = files_location, pattern = ".sam")
63:     output.files[[read.context]] <- file.path(output_folder,
66:     read.files <- file.path(files_location, all_files)
97:         asBam(file.path(files_location, all_files[i]), destination=file.path(temp_folder, sample_name[i]), overwrite=TRUE)
101:     bam.files <- file.path(path = temp_folder, paste(sample_name, ".bam", sep=""))
112:             filename <- file.path(output_folder, paste0(sample_name[[i]],"_uncov", ".Rdata"))
220:     all_files <- list.files(path = files_location, pattern = ".txt")
224:       temp_data <- fread(path,nrows=10)
227:         cmd <- paste("sed -i 's/\"//g'",path)
229:         cmd <- paste("sed -i 's/^/chr/'",path) 
268:     Tabix_files <- list.files(path = files_location, pattern = "_tabix.txt")
11:     output_folder <- normalizePath(output_folder)  
50:     files_location <- normalizePath(files_location)
51:     output_folder <- normalizePath(output_folder)
132:   files_location <- normalizePath(files_location)
186: BSprepare <-  function(files_location, output_folder, tabixPath, bc=1.5/100) {
191:     if(!is.character(tabixPath))
192:         stop('tabixPath has to be of class character ..')
193:     if(!file.exists(paste(tabixPath, '/tabix', sep='')))
194:         stop('tabix not found at tabixPath ..')
195:     if(!file.exists(paste(tabixPath, '/bgzip', sep='')))
196:         stop('bgzip not found at tabixPath ..')
198:     files_location <- normalizePath(files_location)
199:     output_folder <- normalizePath(output_folder)
200:     tabixPath <- normalizePath(tabixPath)
276:         str <- paste0(tabixPath, '/bgzip ', output_folder, "/", filetb_name,"_out.txt")
280:         str <- paste(tabixPath, '/tabix -s 1 -b 2 -e 2 -f ', fileoutgz, sep='')
IONiseR:R/fast5Readers.R: [ ]
375:         path <- paste0("/Analyses/Basecall_", d, "_000/Log")
376:         exists <- .groupExistsObj(fid, group = path)
378:             did <- H5Dopen(fid, path)
diffHic:src/report_hic_pairs.cpp: [ ]
313:     std::string path;
208:     Bamfile(const char * path) : holding(false) { 
209:         in = sam_open(path, "rb");
212:             out << "failed to open BAM file at '" << path << "'";
267:         path=converter.str();
292:             out=std::fopen(path.c_str(), "a");
294:             out=std::fopen(path.c_str(), "w"); // Overwrite any existing file, just to be safe.
298:             err << "failed to open output file at '" << path << "'"; 
326:     const Rcpp::String bampath=check_string(bamfile, "BAM file path");
512:                 outpaths[j]=collected[i][j].path;
595:     Rcpp::String bampath=check_string(incoming, "BAM file path");
334:     Bamfile input(bampath.get_cstring());
596:     Bamfile input(bampath.get_cstring());
507:     Rcpp::List filepaths(nc);
509:         Rcpp::StringVector outpaths(i+1);
515:         filepaths[i]=outpaths;
518:     return Rcpp::List::create(filepaths, 
GeneTonic:R/GeneTonic.R: [ ]
2294:       path <- system.file("doc", "GeneTonic_manual.html", package = "GeneTonic")
2295:       if (path == "") {
2298:         browseURL(path)
2352:           reactive_values$in_gtl <- readRDS(input$uploadgtl$datapath)
ACE:R/ACE.R: [ ]
134: 		  readCounts <- QDNAseq::binReadCounts(bins, path = inputdir)
960:         if (dirname(filename)==".") {newpath <- file.path(outputdir,filename)}
131: 		  currentdir <- file.path(outputdir,paste0(b,"kbp"))
136: 		    saveRDS(readCounts, file = file.path(outputdir, paste0(b, "kbp-raw.rds")))
146: 		  saveRDS(copyNumbersSegmented, file = file.path(outputdir,paste0(b,"kbp.rds")))
157: 			currentdir <- file.path(outputdir,paste0(substr(files[f],0,nchar(files[f])-4)))
159: 			copyNumbersSegmented <- readRDS(file.path(inputdir,files[f]))
166: 	write.table(parameters, file=file.path(outputdir,"parameters.tsv"), quote = FALSE, sep = "\t", na = "", row.names = FALSE)
182: 	  qdir <- file.path(currentdir,paste0(q,"N"))
189:   	dir.create(file.path(qdir,"likelyfits"))  
258:   		fp <- file.path(qdir,pd$name[a])
263:   		dir.create(file.path(fp,"graphs"))
284:   		imagefunction(file.path(fp,paste0(pd$name[a],"_errorlist.",imagetype)))
320:   		  fn <- file.path(fp,"graphs",paste0(pd$name[a], " - ",q,"N fit ", m, ".",imagetype))
348:   		      imagefunction(file.path(qdir,"likelyfits",paste0(pd$name[a],"_bestfit_",q,"N.",imagetype)),width=10.5)
350:   		      imagefunction(file.path(qdir,"likelyfits",paste0(pd$name[a],"_bestfit_",q,"N.",imagetype)),width=720)
358:   		      imagefunction(file.path(qdir,"likelyfits",paste0(pd$name[a],"_lastminimum_",q,"N.",imagetype)),width=10.5)
360:   		      imagefunction(file.path(qdir,"likelyfits",paste0(pd$name[a],"_lastminimum_",q,"N.",imagetype)),width=720)
377:   		  pdf(file.path(fp,paste0("summary_",pd$name[a],".pdf")),width=10.5)
382:   		    imagefunction(file.path(fp,paste0("summary_",pd$name[a],".",imagetype)), width = 720)
386:     		  imagefunction(file.path(fp,paste0("summary_",pd$name[a],".",imagetype)), width = 2160, height = 480*ceiling(length(plots)/3...(3 bytes skipped)...
399:     	  pdf(file.path(qdir,"summary_likelyfits.pdf"),width=10.5)
402:       	pdf(file.path(qdir,"summary_errors.pdf"))
406:     	  imagefunction(file.path(qdir,paste0("summary_likelyfits.",imagetype)), width = 2160, height = 480*length(pd$name))
409:       	imagefunction(file.path(qdir,paste0("summary_errors.",imagetype)), width = 1920, height = 480*ceiling(length(pd$name)/4))
415:   	    pdf(file.path(qdir,"summary_errors.pdf"))
419:   	    imagefunction(file.path(qdir,paste0("summary_errors.",imagetype)), width = 1920, height = 480*ceiling(length(pd$name)/4))
425:   	write.table(fitpicker, file=file.path(qdir,paste0("fitpicker_",q,"N.tsv")), quote = FALSE, sep = "\t", na = "", row.names = FALSE)
830: # frequency in percentage). It can also be a file path to a tab-delimited
832: # by getadjustedsegments. Again, this can be either a data frame or a file path
1003:       copyNumbersSegmented <- readRDS(file.path(inputdir,files[1]))
1005:     if(missing(modelsfile)){models <- try(read.table(file.path(inputdir,"models.tsv"), header = TRUE, comment.char = "", sep = "\t"))
1009:       if (dir.exists(file.path(inputdir,"variantdata"))) {
1010:         variantdata <- file.path(inputdir,"variantdata")
1072:           if (!dir.exists(file.path(outputdir,"newplots"))) {dir.create(file.path(outputdir,"newplots"))}
1074:             imagefunction(file.path(outputdir,"newplots",paste0(pd$name[a],".",imagetype)),width=10.5)
1078:             imagefunction(file.path(outputdir,"newplots",paste0(pd$name[a],".",imagetype)), width=720)
1091:           variantfile <- file.path(variantdata,paste0(prefix,pd$name[a],postfix,varext))
1092:           folder <- file.path(outputdir,"variantdata")
1104:           if (!dir.exists(file.path(outputdir,"segmentfiles"))) {dir.create(file.path(outputdir,"segmentfiles"))}
1105:           fn <- file.path(outputdir,"segmentfiles",paste0(pd$name[a],"_segments.",segext))
961:         else {newpath <- sub(dirname(filename),outputdir,filename)}
962:         fn <- gsub(".csv","_ACE.csv",newpath)
sevenbridges:inst/extdata/app/flow_star.json: [ ]
272:                 "path": "/demo/test-files/chr20.gtf"
280:               "path": "/sbgenomics/test-data/chr20.fa"
476:               "path": "/path/to/fastq.ext"
818:               "path": "/root/dir/example.tested.bam"
2894:               "path": "genome.ext"
2936:                 "path": "/test-data/mate_1.fastq.bz2"
2995:                 "path": "/demo/test-data/chr20.gtf"
349: ...(34 bytes skipped)...r sjFormat = \"False\"\n  var gtfgffFormat = \"False\"\n  var list = $job.inputs.sjdbGTFfile\n  var paths_list = []\n  var joined_paths = \"\"\n  \n  if (list) {\n    list.forEach(function(f){return paths_list.push(f.path)})\n    joined_paths = paths_list.join(\" \")\n\n\n    path...(355 bytes skipped)...ne\") {\n      if (sjFormat == \"True\") {\n        return \"--sjdbFileChrStartEnd \".concat(joined_path...(5 bytes skipped)...     }\n      else if (gtfgffFormat == \"True\") {\n        return \"--sjdbGTFfile \".concat(joined_paths)\n      }\n    }\n  }\n}",
445:         "sbg:cmdPreview": "python /opt/sbg_fastq_quality_scale_detector.py --fastq /path/to/fastq.ext /path/to/fastq.ext",
898:               "script": "{\n  filename = $job.inputs.input_bam.path\n  ext = $job.inputs.output_type\n\nif (ext === \"BAM\")\n{\n    return filename.split('.').slice(0...(372 bytes skipped)...
910:               "script": "{\n  filename = $job.inputs.input_bam.path\n  \n  /* figuring out output file type */\n  ext = $job.inputs.output_type\n  if (ext === \"BAM\")...(657 bytes skipped)...
992:             "script": "$job.inputs.genome.path",
1606: ...(48 bytes skipped)...concat($job.inputs.reads)\n  \n  var resp = []\n  \n  if (list.length == 1){\n    resp.push(list[0].path...(178 bytes skipped)...etadata != null){\n        if (list[index].metadata.paired_end == 1){\n          left = list[index].path\n        }else if (list[index].metadata.paired_end == 2){\n          right = list[index].path...(297 bytes skipped)...data != null){\n        if (list[index].metadata.paired_end == 1){\n          left.push(list[index].path)\n        }else if (list[index].metadata.paired_end == 2){\n          right.push(list[index].path)\n        }\n      }\n    }\n    left_join = left.join()\n    right_join = right.join()\n    if (le...(200 bytes skipped)...
3224:               "script": "{\n  file = [].concat($job.inputs.reads)[0].path\n  extension = /(?:\\.([^.]+))?$/.exec(file)[1]\n  if (extension == \"gz\") {\n    return \"--readF...(107 bytes skipped)...
3232: ...(34 bytes skipped)...r sjFormat = \"False\"\n  var gtfgffFormat = \"False\"\n  var list = $job.inputs.sjdbGTFfile\n  var paths_list = []\n  var joined_paths = \"\"\n  \n  if (list) {\n    list.forEach(function(f){return paths_list.push(f.path)})\n    joined_paths = paths_list.join(\" \")\n\n\n    path...(355 bytes skipped)...ne\") {\n      if (sjFormat == \"True\") {\n        return \"--sjdbFileChrStartEnd \".concat(joined_path...(5 bytes skipped)...     }\n      else if (gtfgffFormat == \"True\") {\n        return \"--sjdbGTFfile \".concat(joined_paths)\n      }\n    }\n  }\n}",
3280: ...(138 bytes skipped)...gth, i= 0;\n  while(i<L && a1.charAt(i)=== a2.charAt(i)) i++;\n  return a1.substring(0, i);\n  }\n  path_list = []\n  arr = [].concat($job.inputs.reads)\n  arr.forEach(function(f){return path_list.push(f.path.replace(/\\\\/g,'/').replace( /.*\\//, '' ))})\n  common_prefix = sharedStart(path_list)\n  intermediate = common_prefix.replace( /\\-$|\\_$|\\.$/, '' ).concat(\"._STARgenome\")\n  s...(262 bytes skipped)...
3289: ...(138 bytes skipped)...gth, i= 0;\n  while(i<L && a1.charAt(i)=== a2.charAt(i)) i++;\n  return a1.substring(0, i);\n  }\n  path_list = []\n  arr = [].concat($job.inputs.reads)\n  arr.forEach(function(f){return path_list.push(f.path.replace(/\\\\/g,'/').replace( /.*\\//, '' ))})\n  common_prefix = sharedStart(path_list)\n  return \"./\".concat(common_prefix.replace( /\\-$|\\_$|\\.$/, '' ), \".\")\n}",
3298: ...(138 bytes skipped)...gth, i= 0;\n  while(i<L && a1.charAt(i)=== a2.charAt(i)) i++;\n  return a1.substring(0, i);\n  }\n  path_list = []\n  arr = [].concat($job.inputs.reads)\n  arr.forEach(function(f){return path_list.push(f.path.replace(/\\\\/g,'/').replace( /.*\\//, '' ))})\n  common_prefix = sharedStart(path_list)\n  mate1 = common_prefix.replace( /\\-$|\\_$|\\.$/, '' ).concat(\".Unmapped.out.mate1\")\n  m...(463 bytes skipped)...
gdsfmt:src/CoreArray/dFile.cpp: [ ]
1664: CdGDSObj *CdGDSFolder::Path(const UTF8String &FullName)
2171: CdGDSObj *CdGDSVirtualFolder::Path(const UTF8String &FullName)
1298: static const char *ERR_INVALID_PATH  = "The GDS node \"%s\" does not exist.";
1672: CdGDSObj *CdGDSFolder::PathEx(const UTF8String &FullName)
2177: CdGDSObj *CdGDSVirtualFolder::PathEx(const UTF8String &FullName)
1668: 		throw ErrGDSObj(ERR_INVALID_PATH, FullName.c_str());
2174: 	return fLinkFile->Root().Path(FullName);
1666: 	CdGDSObj *rv = PathEx(FullName);
2180: 	return fLinkFile->Root().PathEx(FullName);
BiocFileCache:R/BiocFileCache-class.R: [ ]
495:     path <- .sql_get_rpath(x, rids)
531:     update_time_and_path <- function(x, i) {
540:             locfile_path <- file.path(bfccache(x), id)
402:     rpath <- .sql_add_resource(x, rname, rtype, fpath, ext)
1001:         fpath <- .sql_get_fpath(x, rid)
1185:     paths <- .sql_get_rpath(x, bfcrid(x))
1312:             newpath <- file.path(dir, basename(orig))
1385:     exportPath <- file.path(exdir, "BiocFileCacheExport")
1131:     rpaths <- .sql_get_rpath(x, rids)
1433:     rpaths <- .sql_get_rpath(x, rids)
35: #'   \item{'cache': }{character(1) on-disk location (directory path) of the
54: #'   \item{'rpath': }{resource path. This is the path to the local
75: #' @param cache character(1) On-disk location (directory path) of
101:                  "  Problematic cache: ", path.expand(olddefault),"\n",
116:             cache <- file.path(tempdir(), "BiocFileCache")
224: #' @describeIn BiocFileCache Get a file path for select resources from
239: #' @describeIn BiocFileCache Set the file path of selected resources
241: #' @param value character(1) Replacement file path.
282: #' @return For 'bfcnew': named character(1), the path to save your
286: #' path <- bfcnew(bfc0, "NewResource")
287: #' path
328: #' @param fpath For bfcadd(), character(1) path to current file
330: #'     assumed to also be the path location. For bfcupdate()
333: #'     if the resource is a local file, a relative path in the cache,
336: #'     relative or web paths, based on the path prefix.
340: #'     in current location but save the path in the cache. If 'rtype
356: #' @return For 'bfcadd': named character(1), the path to save your
482: #' @return For 'bfcpath': the file path location to load
496:     path
515: #'     in the cache the path is returned, if it is not it will try to
520: #' @return For 'bfcrpath': The local file path location to load.
541:             locfile <- .lock2(locfile_path, exclusive = TRUE)
550:                     names(update_time_and_path(x, res))
559:                 .unlock2(locfile_path)
562:             names(update_time_and_path(x, res))
589:         update_time_and_path(x, rids)
670:                     "Setting a new remote path results in immediate\n",
1069: #' @return For 'bfcdownload': character(1) path to downloaded resource
1184:     files <- file.path(bfccache(x), setdiff(dir(bfccache(x)),c(.CACHE_FILE, .CACHE_FILE_LOCK)))
1253: #' @return character(1) The outputFile path.
1275:     dir <- file.path(tempdir(), "BiocFileCacheExport")
1316:                 newpath <- file.path(dir, filename)
1343:         outputFile = file.path(origdir, outputFile)
1353:     .util_unlink(file.path(dir, .CACHE_FILE_LOCK))
58: #'   \item{'fpath': }{If rtype is "web", this is the link to the
228: #' @return For '[[': named character(1) rpath for the given resource
236:     .sql_get_rpath(x, i)
251:     .sql_set_rpath(x, i, value)
254:         warning("updating rpath, changing rtype to 'local'")
305:         x, rname, fpath = rname, rtype=c("auto", "relative", "local", "web"),
317:         x, rname, fpath = rname, rtype=c("auto", "relative", "local", "web"),
322:     bfcadd(x=BiocFileCache(), rname=rname, fpath=fpath, rtype=rtype,
338: #'     \code{copy} of \code{fpath} in the cache directory; \code{move}
375: #' bfcadd(bfc0, "TestWeb", fpath=url)
380:         x, rname, fpath = rname,
388:         is.character(fpath), length(fpath) > 0L, !any(is.na(fpath))
394:     stopifnot((length(action) == 1) || (length(action) == length(fpath)))
395:     stopifnot((length(rtype) == 1) || (length(rtype) == length(fpath)))
396:     if (length(action) == 1) action = rep(action, length(fpath))
397:     if (length(rtype) == 1) rtype = rep(rtype, length(fpath))
399:     rtype <- .util_standardize_rtype(rtype, fpath, action)
400:     stopifnot(all(rtype == "web" | file.exists(fpath)))
403:     rid <- names(rpath)
405:     for(i in seq_along(rpath)){
409:                 copy = file.copy(fpath[i], rpath[i]),
410:                 move = file.rename(fpath[i], rpath[i]),
412:                     .sql_set_rpath(x, rid[i], fpath[i])
413:                     rpath[i] <- bfcrpath(x, rids = rid[i])
421:     rpath
455:     tbl <- mutate(tbl, rpath = unname(bfcrpath(x, rids=rids)))
467: setGeneric("bfcpath",
468:     function(x, rids) standardGeneric("bfcpath"),
473: #' @aliases bfcpath,missing-method
474: #' @exportMethod bfcpath
475: setMethod("bfcpath", "missing",
478:     bfcpath(x=BiocFileCache(), rids=rids)
484: #' bfcpath(bfc0, rid3)
485: #' @aliases bfcpath
486: #' @exportMethod bfcpath
487: setMethod("bfcpath", "BiocFileCacheBase",
500: setGeneric("bfcrpath",
501:     function(x, rnames, ..., rids, exact = TRUE) standardGeneric("bfcrpath"),
506: #' @aliases bfcrpath,missing-method
507: #' @exportMethod bfcrpath
508: setMethod("bfcrpath", "missing",
511:     bfcrpath(x=BiocFileCache(), rnames=rnames, ..., rids=rids, exact=exact)
514: #' @describeIn BiocFileCache display rpath of resource. If 'rnames' is
522: #' bfcrpath(bfc0, rids = rid3)
523: #' @aliases bfcrpath
524: #' @exportMethod bfcrpath
525: setMethod("bfcrpath", "BiocFileCacheBase",
532:         .sql_get_rpath(x, i)
586:         bfcrpath(x, rids = rids0)
609: #' @param rpath character() vector of replacement rpaths.
613: #' bfcupdate(bfc0, rid3, rpath=fl3, rname="NewRname")
615: #' bfcupdate(bfc0, "BFC5", fpath="http://google.com")
619:     function(x, rids, rname=NULL, rpath=NULL, fpath=NULL,
625:         is.null(rpath) || (length(rids) == length(rpath)),
626:         is.null(fpath) || (length(rids) == length(fpath))
630:         is.null(rpath) || is.character(rpath),
631:         is.null(fpath) || is.character(fpath)
644:         if (!is.null(rpath)) {
645:             if (!file.exists(rpath[i]))
649:                     "\n  rpath: ", sQuote(rpath[i]),
650:                     "\n  reason: rpath does not exist.",
653:             .sql_set_rpath(x, rids[i], rpath[i])
656:                 warning("updating rpath, changing rtype to 'local'")
661:         if (!is.null(fpath)) {
679:                     x, rids[i], proxy, config, "bfcupdate()", fpath[i], ...
681:                 .sql_set_fpath(x, rids[i], fpath[i])
863:     function(x, query, field=c("rname", "rpath", "fpath"), ..., exact = FALSE)
872:     function(x, query, field=c("rname", "rpath", "fpath"), ..., exact = FALSE)
885: #'     matches pattern agains rname, rpath, and fpath. If exact
890: #'     \code{bfcrpath}, the default is \code{TRUE} (exact matching).
902:     function(x, query, field=c("rname", "rpath", "fpath"), ..., exact = FALSE)
978: #'     'rid'. \code{TRUE}: fpath \code{etag} or \code{modified} time of
979: #'     web resource more recent than in BiocFileCache; \code{FALSE}: fpath
1004:         cache_info <- .httr_get_cache_info(fpath)
1086:     if (ask && any(file.exists(.sql_get_rpath(x, rid)))) {
1097:     bfcrpath(x, rids=rid)
1186:     # normalizePath on windows
1189:         files = normalizePath(files)
1190:         paths = normalizePath(paths)
1192:     untracked <- setdiff(files, paths)
1247: #' @param outputFile character(1) The <filepath>/basename for the
1311:             orig <- .sql_get_rpath(x, i)
1313:             if (file.exists(newpath)) {
1318:             file.copy(orig, newpath)
1386:     stopifnot(!dir.exists(exportPath))
1396:     bfc = BiocFileCache(exportPath)
348: #'     \code{httr::GET}. For 'bfcrpaths': Additional arguments passed
481: #' @describeIn BiocFileCache display rpaths of resource.
1132:     cached <- startsWith(rpaths, bfccache(x))
1135:     status <- .util_unlink(rpaths[cached])
1434:     cached <- startsWith(rpaths, bfccache(x))
1437:         txt0 <- paste("file ", sQuote(rpaths))
1446:     .util_unlink(rpaths[cached])
megadepth:R/install.R: [ ]
146:         path <- Sys.getenv("APPDATA", "")
175:         path <- file.path(d, exec)
206:     path <- NULL # cache the path to megadepth
182:     path2 <- Sys.which(cmd)
143: bin_paths <- function(dir = "Megadepth",
15: #' found via the environment variable \code{PATH}.
17: #' If you want to install Megadepth to a custom path, you can set the global
35: #' @importFrom xfun is_windows is_macos same_path
75:     exec <- file.path(tempdir(), exec_name)
144:     extra_path = getOption("megadepth.dir")) {
147:         path <- if (fs::dir_exists(path)) {
148:             file.path(path, dir)
151:         path <- "~/Library/Application Support"
152:         path <- if (fs::dir_exists(path)) file.path(path, dir)
153:         path <- c("/usr/local/bin", path)
155:         path <- c("~/bin", "/snap/bin", "/var/lib/snapd/snap/bin")
157:     path <- c(extra_path, path, pkg_file(dir, mustWork = FALSE))
159:     path <- path[path != ""]
162:         path <- c(tempdir(), path)
164:     path
167: # find an executable from PATH, APPDATA, system.file(), ~/bin, etc
176:         if (utils::file_test("-x", path)) {
179:             path <- ""
183:     if (path == "" || xfun::same_path(path, path2)) {
184:         if (path2 == "") {
187:         return(cmd) # do not use the full path of the command
189:         if (path2 != "") {
194:                 path,
196:                 path2,
202:     normalizePath(path)
208:         if (is.null(path)) {
209:             path <<- find_exec(
215:         path
109:     dirs <- bin_paths()
139:     message("megadepth has been installed to ", normalizePath(destdir))
158:     # remove empty paths potentially created by pkgfile
169:     for (d in bin_paths(dir)) {
scde:R/functions.R: [ ]
5439:             path <- env[['PATH_INFO']]
6044:             path <- env[['PATH_INFO']]
2147:                 pathsizes <- unlist(tapply(vi, gcll, length))
5059: pathway.pc.correlation.distance <- function(pcc, xv, n.cores = 10, target.ndf = NULL) {
6173:                        pathcl <- ifelse(is.null(req$params()$pathcl), 1, as.integer(req$params()$pathcl))
1877: pagoda.pathway.wPCA <- function(varinfo, setenv, n.components = 2, n.cores = detectCores(), min.pathway.size = 10, max.pathway.size = 1e3, n.randomizations = 10, n.internal.shuffles = 0, n.starts = 10, center = TRUE, batch....(55 bytes skipped)...
5558: t.view.pathways <- function(pathways, mat, matw, env, proper.names = rownames(mat), colcols = NULL, zlim = NULL, labRow = NA, vhc = ...(145 bytes skipped)...
5684: pagoda.show.pathways <- function(pathways, varinfo, goenv = NULL, n.genes = 20, two.sided = FALSE, n.pc = rep(1, length(pathways)), colcols = NULL, zlim = NULL, showRowLabels = FALSE, cexCol = 1, cexRow = 1, nstarts = 10, ce...(117 bytes skipped)...
5698: c.view.pathways <- function(pathways, mat, matw, goenv = NULL, batch = NULL, n.genes = 20, two.sided = TRUE, n.pc = rep(1, length(pathways)), colcols = NULL, zlim = NULL, labRow = NA, vhc = NULL, cexCol = 1, cexRow = 1, nstarts = 50, ...(93 bytes skipped)...
461: ##' @param name URL path name for this app
5443:             switch(path,
6047:             switch(path,
1: ##' Single-cell Differential Expression (with Pathway And Gene set Overdispersion Analysis)
6: ##' The scde package also contains the pagoda framework which applies pathway and gene set overdispersion analysis
9: ##' See vignette("pagoda") for a brief tutorial on pathway and gene set overdispersion analysis to identify and characterize cell subpopulations.
1292: ...(39 bytes skipped)...lowed for the estimated adjusted variance (capping of adjusted variance is recommended when scoring pathway overdispersion relative to randomly sampled gene sets)
1789: ##' such as ribosomal pathway variation) and subtracts it from the data so that it is controlled
1815: ##' cc.pattern <- pagoda.show.pathways(ls(go.env)[1:2], varinfo, go.env, show.cell.dendrogram = TRUE, showRowLabels = TRUE)  # Look at...(30 bytes skipped)...
1845: ##' @param min.pathway.size minimum number of observed genes that should be contained in a valid gene set
1846: ##' @param max.pathway.size maximum number of observed genes in a valid gene set
1847: ...(103 bytes skipped)...ith each gene set (can be kept at 5 or 10, but should be increased to 50-100 if the significance of pathway overdispersion will be determined relative to random gene set models)
1873: ##' pwpca <- pagoda.pathway.wPCA(varinfo, go.env, n.components=1, n.cores=10, n.internal.shuffles=50)
1901:         gsl <- gsl[gsl.ng >= min.pathway.size & gsl.ng<= max.pathway.size]
1905:         message("processing ", length(gsl), " valid pathways")
1954: ##' @param pwpca result of the pagoda.pathway.wPCA() call with n.randomizations > 1
1965: ##' pwpca <- pagoda.pathway.wPCA(varinfo, go.env, n.components=1, n.cores=10, n.internal.shuffles=50)
2148:                 names(pathsizes) <- pathsizes
2151:                     rsdv <- unlist(lapply(names(pathsizes), function(s) {
2156:                     return(data.frame(n = as.integer(pathsizes), var = unlist(sdv), round = i, rvar = rsdv))
2160:                 data.frame(n = as.integer(pathsizes), var = unlist(sdv), round = i)
2216: ##' @param pwpca output of pagoda.pathway.wPCA()
2242: ##' pwpca <- pagoda.pathway.wPCA(varinfo, go.env, n.components=1, n.cores=10, n.internal.shuffles=50)
2393:     # determine genes driving significant pathways
2435: ##' @param pwpca output of pagoda.pathway.wPCA()
2453: ##' pwpca <- pagoda.pathway.wPCA(varinfo, go.env, n.components=1, n.cores=10, n.internal.shuffles=50)
2460:     pclc <- pathway.pc.correlation.distance(c(pwpca, clpca$cl.goc), tam$xv, target.ndf = 100, n.cores = n.cores)
2521: ##' pwpca <- pagoda.pathway.wPCA(varinfo, go.env, n.components=1, n.cores=10, n.internal.shuffles=50)
2603: ##' pwpca <- pagoda.pathway.wPCA(varinfo, go.env, n.components=1, n.cores=10, n.internal.shuffles=50)
2654: ##' @param tamr Combined pathways that show similar expression patterns. Output of \code{\link{pagoda.reduce.redundancy}}
2655: ##' @param row.clustering Dendrogram of combined pathways clustering
2667: ##' pwpca <- pagoda.pathway.wPCA(varinfo, go.env, n.components=1, n.cores=10, n.internal.shuffles=50)
2724: ##' @param tamr Combined pathways that show similar expression patterns. Output of \code{\link{pagoda.reduce.redundancy}}
2725: ##' @param tam Combined pathways that are driven by the same gene sets. Output of \code{\link{pagoda.reduce.loading.redundancy}}...(0 bytes skipped)...
2728: ...(15 bytes skipped)...a Weighted PC magnitudes for each gene set provided in the \code{env}. Output of \code{\link{pagoda.pathway.wPCA}}
2732: ##' @param row.clustering Dendrogram of combined pathways clustering. Default NULL.
2733: ##' @param title Title text to be used in the browser label for the app. Default, set as 'pathway clustering'
2739: ...(47 bytes skipped)... env, pwpca, clpca = NULL, col.cols = NULL, cell.clustering = NULL, row.clustering = NULL, title = "pathway clustering", zlim = c(-1, 1)*quantile(tamr$xv, p = 0.95)) {
2764:     # prepare pathway df
3559: .onUnload <- function(libpath) {
3560:     library.dynam.unload("scde", libpath, verbose = TRUE)
5108:         #set scale at top pathway?
5560:     lab <- which(proper.names %in% na.omit(unlist(mget(pathways, envir = env, ifnotfound = NA))))
5564:         lab <- which(proper.names %in% pathways)
5569:     #table(rownames(mat) %in% mget(pathways, envir = env))
5660: ##' View pathway or gene weighted PCA
5662: ##' Takes in a list of pathways (or a list of genes), runs weighted PCA, optionally showing the result.
5663: ##' @param pathways character vector of pathway or gene names
5665: ##' @param goenv environment mapping pathways to genes
5668: ...(5 bytes skipped)...param n.pc optional integer vector giving the number of principal component to show for each listed pathway
5681: ##' @param ... additional arguments are passed to the \code{c.view.pathways}
5687:     x <- c.view.pathways(pathways, varinfo$mat, varinfo$matw, goenv, batch = varinfo$batch, n.genes = n.genes, two.sided = two.si...(213 bytes skipped)...
5695: # takes in a list of pathways with a list of corresponding PC numbers
5696: # recalculates PCs for each individual pathway, weighting gene loading in each pathway and then by total
5697: # pathway variance over the number of genes (rough approximation)
5699:     # are these genes or pathways being passed?
5701:         x <- pathways %in% ls(goenv)
5703:         x <- rep(FALSE, length(pathways))
5705:     if(sum(x) > 0) { # some pathways matched
5707:         message("WARNING: partial match to pathway names. The following entries did not match: ", paste(pathways[!x], collapse = " "))
5709:         # look up genes for each pathway
5710:         pathways <- pathways[x]
5711:         p.genes <- mget(pathways, goenv, ifnotfound = NA)
5713:         x <- pathways %in% rownames(mat)
5716: ...(9 bytes skipped)...       message("WARNING: partial match to gene names. The following entries did not match: ", paste(pathways[!x], collapse = " "))
5718:             p.genes <- list("genes" = pathways[x])
5719:             pathways <- c("genes");
5720:         } else { # neither genes nor pathways are passed
5721:             stop("ERROR: provided names do not match either gene nor pathway names (if the pathway environment was provided)")
5728:     # recalculate wPCA for each pathway
5729:     ppca <- pagoda.path...(130 bytes skipped)...s), n.cores = 1, n.randomizations = 0, n.starts = 2, n.components = max(n.pc), verbose = FALSE, min.pathway.size = 0, max.pathway.size = Inf, n.internal.shuffles = 0)
5731:     if(length(ppca) > 1) { # if more than one pathway was supplied, combine genes using appropriate loadings and use consensus PCA (1st PC) as a patte...(2 bytes skipped)...
5733:         scaled.gene.loadings <- unlist(lapply(seq_along(pathways), function(i) {
5734:             gl <- ppca[[pathways[i]]]$xp$rotation[, n.pc[i], drop = TRUE]*as.numeric(ppca[[pathways[i]]]$xp$sd)[n.pc[i]]/sqrt(ppca[[pathways[i]]]$n)
5735:             names(gl) <- rownames(ppca[[pathways[i]]]$xp$rotation)
5777:     } else { # only one pathway was provided
5970: ##' @field results Output of the pathway clustering and redundancy reduction
5972: ##' @field pathways
5983:     fields = c('results', 'genes', 'pathways', 'mat', 'matw', 'goenv', 'renv', 'name', 'trim', 'batch'),
5986:         initialize = function(results, pathways, genes, mat, matw, goenv, batch = NULL, name = "pathway overdispersion", trim = 1.1/ncol(mat)) {
5995:             pathways <<- pathways
6012:                 gcl <- t.view.pathways(genes, mat = mat, matw = matw, env = goenv, vhc = results$hvc, plot = FALSE, trim = ltrim)
6058: ...(21 bytes skipped)...                <link rel = "stylesheet" type = "text/css" href = "http://pklab.med.harvard.edu/sde/pathcl.css" / >
6064: ...(10 bytes skipped)...                           <script type = "text/javascript" src = "http://pklab.med.harvard.edu/sde/pathcl.js" > </script >
6072:                    '/pathcl.json' = { # report pathway clustering heatmap data
6126:                    '/pathwaygenes.json' = { # report heatmap data for a selected set of genes
6133:                        x <- c.view.pathways(gsub("^#PC\\d+# ", "", pws), mat, matw, goenv = goenv, n.pc = n.pcs, n.genes = ngenes, two.side...(75 bytes skipped)...
6134:                        #x <- t.view.pathways(gsub("^#PC\\d+# ", "", pws), mat, matw, env = goenv, vhc = results$hvc, plot = FALSE, trim = lt...(14 bytes skipped)...
6174:                        ii <- which(results$ct == pathcl)
6251:                    '/pathways.json' = {
6252:                        lgt <- pathways
spikeLI:R/collapse.R: [ ]
18:         path <- system("pwd",TRUE);
20:                 {postscript(paste(path,paste("/",probe_set[1],sep=""),sep=""));}
21:         else    {postscript(paste(path,paste("/",filename,sep=""),sep=""));}
Director:inst/www/js/d3.v3.js: [ ]
4199:   d3.geo.path = function() {
4201:     function path(object) {
6082:   function d3_layout_bundlePath(link) {
3936:   var d3_geo_pathAreaSum, d3_geo_pathAreaPolygon, d3_geo_pathArea = {
3963:   var d3_geo_pathBoundsX0, d3_geo_pathBoundsY0, d3_geo_pathBoundsX1, d3_geo_pathBoundsY1;
3971:   function d3_geo_pathBoundsPoint(x, y) {
4022:   function d3_geo_pathBufferCircle(radius) {
4038:   function d3_geo_pathCentroidPoint(x, y) {
4057:   function d3_geo_pathCentroidLineEnd() {
4246:   function d3_geo_pathProjectStream(project) {
4209:     path.area = function(object) {
4214:     path.centroid = function(object) {
4219:     path.bounds = function(object) {
4224:     path.projection = function(_) {
4229:     path.context = function(_) {
4235:     path.pointRadius = function(_) {
4238:       return path;
4242:       return path;
4244:     return path.projection(d3.geo.albersUsa()).context(null);
7979:       var rc, cr, rp, ap, p0 = 0, p1 = 0, x0, y0, x1, y1, x2, y2, x3, y3, path = [];
8027:             path.push("M", t30[0], "A", rc1, ",", rc1, " 0 0,", cr, " ", t30[1], "A", r1, ",", r1, " 0 ", 1 - cw ^ d...(128 bytes skipped)...
8029:             path.push("M", t30[0], "A", rc1, ",", rc1, " 0 1,", cr, " ", t12[0]);
8032:           path.push("M", x0, ",", y0);
8037:             path.push("L", t21[0], "A", rc0, ",", rc0, " 0 0,", cr, " ", t21[1], "A", r0, ",", r0, " 0 ", cw ^ d3_sv...(128 bytes skipped)...
8039:             path.push("L", t21[0], "A", rc0, ",", rc0, " 0 0,", cr, " ", t03[0]);
8042:           path.push("L", x2, ",", y2);
8045:         path.push("M", x0, ",", y0);
8046:         if (x1 != null) path.push("A", r1, ",", r1, " 0 ", l1, ",", cw, " ", x1, ",", y1);
8047:         path.push("L", x2, ",", y2);
8048:         if (x3 != null) path.push("A", r0, ",", r0, " 0 ", l0, ",", 1 - cw, " ", x3, ",", y3);
8050:       path.push("Z");
8051:       return path.join("");
8195:     var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
8196:     while (++i < n) path.push("H", (p[0] + (p = points[i])[0]) / 2, "V", p[1]);
8197:     if (n > 1) path.push("H", p[0]);
8198:     return path.join("");
8201:     var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
8202:     while (++i < n) path.push("V", (p = points[i])[1], "H", p[0]);
8203:     return path.join("");
8206:     var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
8207:     while (++i < n) path.push("H", (p = points[i])[0], "V", p[1]);
8208:     return path.join("");
8224:     var quad = points.length != tangents.length, path = "", p0 = points[0], p = points[1], t0 = tangents[0], t = t0, pi = 1;
8226:       path += "Q" + (p[0] - t0[0] * 2 / 3) + "," + (p[1] - t0[1] * 2 / 3) + "," + p[0] + "," + p[1];
8234:       path += "C" + (p0[0] + t0[0]) + "," + (p0[1] + t0[1]) + "," + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," ...(20 bytes skipped)...
8238:         path += "S" + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1];
8243:       path += "Q" + (p[0] + t[0] * 2 / 3) + "," + (p[1] + t[1] * 2 / 3) + "," + lp[0] + "," + lp[1];
8245:     return path;
8259: ...(44 bytes skipped)...s[0], x0 = pi[0], y0 = pi[1], px = [ x0, x0, x0, (pi = points[1])[0] ], py = [ y0, y0, y0, pi[1] ], path = [ x0, ",", y0, "L", d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",", d3_svg_lineDot4(d3_svg_lin...(21 bytes skipped)...
8267:       d3_svg_lineBasisBezier(path, px, py);
8270:     path.push("L", pi);
8271:     return path.join("");
8275:     var path = [], i = -1, n = points.length, pi, px = [ 0 ], py = [ 0 ];
8281:     path.push(d3_svg_lineDot4(d3_svg_lineBasisBezier3, px) + "," + d3_svg_lineDot4(d3_svg_lineBasisBezier3, ...(5 bytes skipped)...
8289:       d3_svg_lineBasisBezier(path, px, py);
8291:     return path.join("");
8294:     var path, i = -1, n = points.length, m = n + 4, pi, px = [], py = [];
8300:     path = [ d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py)...(3 bytes skipped)...
8308:       d3_svg_lineBasisBezier(path, px, py);
8310:     return path.join("");
8329:   function d3_svg_lineBasisBezier(path, x, y) {
8330:     path.push("C", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier1...(206 bytes skipped)...
8987:         var range = d3_scaleRange(scale1), path = g.selectAll(".domain").data([ 0 ]), pathUpdate = (path.enter().append("path").attr("class", "domain"), 
8988:         d3.transition(path));
3941:       d3_geo_pathAreaPolygon = 0;
3942:       d3_geo_pathArea.lineStart = d3_geo_pathAreaRingStart;
3945:       d3_geo_pathArea.lineStart = d3_geo_pathArea.lineEnd = d3_geo_pathArea.point = d3_noop;
3946:       d3_geo_pathAreaSum += abs(d3_geo_pathAreaPolygon / 2);
3949:   function d3_geo_pathAreaRingStart() {
3951:     d3_geo_pathArea.point = function(x, y) {
3952:       d3_geo_pathArea.point = nextPoint;
3956:       d3_geo_pathAreaPolygon += y0 * x - x0 * y;
3959:     d3_geo_pathArea.lineEnd = function() {
3964:   var d3_geo_pathBounds = {
3965:     point: d3_geo_pathBoundsPoint,
3972:     if (x < d3_geo_pathBoundsX0) d3_geo_pathBoundsX0 = x;
3973:     if (x > d3_geo_pathBoundsX1) d3_geo_pathBoundsX1 = x;
3974:     if (y < d3_geo_pathBoundsY0) d3_geo_pathBoundsY0 = y;
3975:     if (y > d3_geo_pathBoundsY1) d3_geo_pathBoundsY1 = y;
3977:   function d3_geo_pathBuffer() {
3978:     var pointCircle = d3_geo_pathBufferCircle(4.5), buffer = [];
3993:         pointCircle = d3_geo_pathBufferCircle(_);
4025:   var d3_geo_pathCentroid = {
4026:     point: d3_geo_pathCentroidPoint,
4027:     lineStart: d3_geo_pathCentroidLineStart,
4028:     lineEnd: d3_geo_pathCentroidLineEnd,
4030:       d3_geo_pathCentroid.lineStart = d3_geo_pathCentroidRingStart;
4033:       d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint;
4034:       d3_geo_pathCentroid.lineStart = d3_geo_pathCentroidLineStart;
4035:       d3_geo_pathCentroid.lineEnd = d3_geo_pathCentroidLineEnd;
4043:   function d3_geo_pathCentroidLineStart() {
4045:     d3_geo_pathCentroid.point = function(x, y) {
4046:       d3_geo_pathCentroid.point = nextPoint;
4047:       d3_geo_pathCentroidPoint(x0 = x, y0 = y);
4054:       d3_geo_pathCentroidPoint(x0 = x, y0 = y);
4058:     d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint;
4060:   function d3_geo_pathCentroidRingStart() {
4062:     d3_geo_pathCentroid.point = function(x, y) {
4063:       d3_geo_pathCentroid.point = nextPoint;
4064:       d3_geo_pathCentroidPoint(x00 = x0 = x, y00 = y0 = y);
4075:       d3_geo_pathCentroidPoint(x0 = x, y0 = y);
4077:     d3_geo_pathCentroid.lineEnd = function() {
4081:   function d3_geo_pathContext(context) {
4117:       context.closePath();
4210:       d3_geo_pathAreaSum = 0;
4211:       d3.geo.stream(object, projectStream(d3_geo_pathArea));
4212:       return d3_geo_pathAreaSum;
4216:       d3.geo.stream(object, projectStream(d3_geo_pathCentroid));
4220:       d3_geo_pathBoundsX1 = d3_geo_pathBoundsY1 = -(d3_geo_pathBoundsX0 = d3_geo_pathBoundsY0 = Infinity);
4221:       d3.geo.stream(object, projectStream(d3_geo_pathBounds));
4222:       return [ [ d3_geo_pathBoundsX0, d3_geo_pathBoundsY0 ], [ d3_geo_pathBoundsX1, d3_geo_pathBoundsY1 ] ];
4226:       projectStream = (projection = _) ? _.stream || d3_geo_pathProjectStream(_) : d3_identity;
4231:       contextStream = (context = _) == null ? new d3_geo_pathBuffer() : new d3_geo_pathContext(_);
6077:       var paths = [], i = -1, n = links.length;
6078:       while (++i < n) paths.push(d3_layout_bundlePath(links[i]));
6079:       return paths;
8995:           pathUpdate.attr("d", "M" + range[0] + "," + sign * outerTickSize + "V0H" + range[1] + "V" + sign * outer...(10 bytes skipped)...
8999:           pathUpdate.attr("d", "M" + sign * outerTickSize + "," + range[0] + "H0V" + range[1] + "H" + sign * outer...(10 bytes skipped)...
mAPKL:R/mAPKL.R: [ ]
64:     path <- as.integer(dataType)
54: ## path : 6-ratio data without normalization    or
69:     cluster_analysis <- cluster.Sim(ordIntensities_f[,start:end], path, min.clu,
RepViz:R/plotGeneTrack.R: [ ]
125:                                  host = "grch37.ensembl.org", path = "/biomart/martservice",
130:                                  host = "grch38.ensembl.org", path = "/biomart/martservice",
138:                                  host = "grch37.ensembl.org", path = "/biomart/martservice",
biocViews:R/repository.R: [ ]
14:         path <- packagesPaths[[type]]
181:     DESCRIPTION_path <- file.path(tmp_pkgdir, "DESCRIPTION")
182:     CITATION_path <- file.path(tmp_pkgdir, "inst", "CITATION")
183:     paths <- c(DESCRIPTION_path, CITATION_path)
193:     DESCRIPTION_tpath <- paste0(pkgname, "/DESCRIPTION")
194:     CITATION_tpath <- paste0(pkgname, "/inst/CITATION")
648:         cPath <- reposInfo[, ctype]
649:         buildPkgPath <- function(pkgs, vers) {
899:     cssPath <- system.file(file.path("css", paste(cssName, ".in", sep="")),
918:     cssPath <- system.file(file.path("css", paste(cssName, ".in", sep="")),
11:     packagesPaths <- file.path(reposRoot, contribPaths)
195:     tpaths <- c(DESCRIPTION_tpath, CITATION_tpath)
20:         message("- write_PACKAGES() to ", path, " ... ", appendLF=FALSE)
21:         t <- system.time(write_PACKAGES(path, type=type))[["elapsed"]]
55:     pkgDir <- file.path(unpackDir, pkg, subDir)
65:     ## reposRoot - Top level path for CRAN-style repos
75:         destDir <- file.path(reposRoot, "manuals")
88:             pkgDir <- file.path(unpackDir, pkg, "man")
89:             RCmd <- file.path(Sys.getenv("R_HOME"), "bin", "R")
104:     tarballs <- list.files(file.path(reposRoot, srcContrib),
130:         refmanDir <- file.path(reposRootPath, refman.dir, pkg, refmanSubDir)
147:         unpack(tarball, unpackDir, file.path(pkg, fileName))
150:     tarballs <- list.files(file.path(reposRoot, srcContrib),
180:     tmp_pkgdir <- file.path(tmpdir, pkgname)
191:     ## Note that the path separator is **always** / in a tarball, even
192:     ## on Windows, so do NOT use file.path() here.
210:     if (!file.exists(DESCRIPTION_path))  # should never happen
216:     if (file.exists(CITATION_path)) {
218:         citation <- try(readCitationFile(CITATION_path, meta=description),
233:     destfile <- file.path(destdir, "citation.html")
280:         file.path(reposRoot, srcContrib),
292:         .write_citation_as_HTML(pkgname, citation, file.path(destDir, pkgname))
300:     ## reposRoot - Top level path for CRAN-style repos
314:       destDir <- file.path(reposRoot, "news")
324:         srcDir <- file.path(srcDir, pkg)
325:         destDir <- file.path(destDir, pkg)
328:         destFile <- file.path(destDir, "NEWS")
332:     tarballs <- list.files(file.path(reposRoot, srcContrib),
354:     ## reposRoot - Top level path for CRAN-style repos
364:         destDir <- file.path(reposRoot, "vignettes")
367:         cleanUnpackDir(tarball, unpackDir, subDir=file.path("inst", "doc"))
374:     tarballs <- list.files(file.path(reposRoot, srcContrib),
388:     ## reposRoot - Top level path for CRAN-style repos
398:       destDir <- file.path(reposRoot, "vignettes")
420:     tarballs <- list.files(file.path(reposRoot, srcContrib),
444:         filedir <- file.path(reposRootPath, dir, pkg)
445:         file <- file.path(filedir, filename)
458:         vigDir <- file.path(reposRootPath, vignette.dir, pkg, vigSubDir)
481:             files <- file.path(reposRootPath, files)
535:     fn <- file.path(reposRootPath, "REPOSITORY")
541:     reposInfo <- read.dcf(file.path(reposRootPath, "REPOSITORY"))
562:     out <- file(file.path(dir, fname), "wt")
564:     ##outgz <- gzfile(file.path(dir, gzname), "wt")
601:     ## Read REPOSITORY file for contrib path info
612:         pkg.dir <- file.path(reposRootPath, reposInfo[, os])
641:     ## Integrate version and archive file path info for the different contrib
642:     ## paths in this repos.  We duplicate the source path info here, but that
660:         packagesFile <- file.path(reposRootPath, cPath, "PACKAGES")
663:                     file.path(reposRootPath, cPath),
664:                     "\nSkipping this contrib path.")
675:                     file.path(reposRootPath, cPath),
676:                     "\nSkipping this contrib path.")
692:     ## Add vignette path info
783:                    desc <- tools:::.read_description(file.path(meatPath, missing_pkgs[i], "DESCRIPTION"))
858:     viewsFile <- file.path(reposRoot, "VIEWS")
893:     writePackageDetailHtml(pkgList, file.path(reposRoot, "html"),
901:     res <- try(copySubstitute(cssPath, file.path(reposRoot, cssName),
912:         f <- file.path(htmlDir, htmlFilename(pkg))
920:     res <- try(copySubstitute(cssPath, file.path(htmlDir, cssName),
935:     f <- file.path(reposRoot, htmlFilename(repos))
940:     con <- file(file.path(dir, "SYMBOLS"), open="w")
964:         tarballs <- list.files(file.path(dir, "src/contrib"),
1: genReposControlFiles <- function(reposRoot, contribPaths, manifestFile=NA, meatPath=NA)
10:     ## Write PACKAGES files for all contrib paths
28:             write_VIEWS(reposRoot, manifestFile=manifestFile, meatPath=meatPath)
127: getRefmanLinks <- function(pkgList, reposRootPath, refman.dir) {
184:     status <- unlink(paths)
441: getFileExistsAttr <- function(pkgList, reposRootPath, dir, filename) {
452: getFileLinks <- function(pkgList, reposRootPath, vignette.dir, ext,
472: getDocumentTitles <- function(docs, ext="pdf", src=c("Rnw", "Rmd"), reposRootPath, fun) {
530: write_REPOSITORY <- function(reposRootPath, contribPaths)
539: read_REPOSITORY <- function(reposRootPath)
585: ##   meatPath <- "~biocbuild/bbs-3.14-bioc/MEAT0"
587: ##   write_VIEWS(reposRoot, manifestFile=manifestFile, meatPath=meatPath)
588: write_VIEWS <- function(reposRootPath, fields = NULL,
590:                         manifestFile=NA, meatPath=NA
602:     reposInfo <- read_REPOSITORY(reposRootPath)
609:     convertToMat <- function(reposRootPath, reposInfo, os, fields, verbose){
628:     dbMat = convertToMat(reposRootPath, reposInfo, os, fields, verbose)
632:             dbMat2 = convertToMat(reposRootPath, reposInfo, os, fields, verbose)
658:             paste(cPath, "/", pkgs, "_", vers, ext, sep="")
683:         dbMat[dbMatIdx, col] <- buildPkgPath(cDat[cDatGood, "Package"],
693:     vigs <- getFileLinks(dbMat[, "Package"], reposRootPath, vignette.dir, "pdf")
694:     vtitles <- getDocumentTitles(vigs, reposRootPath=reposRootPath, fun=getPdfTitle)
696:     rfiles <- getFileLinks(dbMat[, "Package"], reposRootPath, vignette.dir, "R")
698:     htmlDocs <- getFileLinks(dbMat[, "Package"], reposRootPath, vignette.dir, "html", TRUE)
700:     htmlTitles <- getDocumentTitles(htmlDocs, ext="html", src=c("Rmd", "Rhtml"), reposRootPath, getHtmlTitle)
717:     readmes <- getFileExistsAttr(dbMat[, "Package"], reposRootPath, "readmes", "README")
718:     news <- getFileExistsAttr(dbMat[, "Package"], reposRootPath, "news", "NEWS")
719:     install <- getFileExistsAttr(dbMat[, "Package"], reposRootPath, "install", "INSTALL")
720:     license <- getFileExistsAttr(dbMat[, "Package"], reposRootPath, "licenses",
780:             if (!is.na(meatPath)){
823:     .write_repository_db(dbMat, reposRootPath, "VIEWS")
8:     t <- system.time(write_REPOSITORY(reposRoot, contribPaths))[["elapsed"]]
12:     names(packagesPaths) <- names(contribPaths)
13:     for (type in names(packagesPaths)) {
196:     status <- untar(tarball, tpaths, exdir=tmpdir)
523:         res <- xpathApply(doc, "//title", xmlValue)
532:     contrib <- as.list(contribPaths)
533:     names(contrib) <- gsub("-", ".", names(contribPaths))
534:     contrib[["provides"]] <- paste(names(contribPaths), collapse=", ")
MuData:R/write_h5mu.R: [ ]
313:     path <- paste(H5Iget_name(parent), key, sep="/")
315:                                      filepath=file, name=path, chunkdim=chunkdim, parent=parent, datasetname=key)
ggtree:R/tree-utilities.R: [ ]
724:     path <- c(anc_from[1:i], rev(anc_to[1:(j-1)]))
730:     path <- get.path(phylo, from, to)
698:     path_length <- sapply(1:(root-1), function(x) get.path_length(tr, root, x))
714: get.path <- function(phylo, from, to) {
980:     pathLength <- sapply(1:length(tr$tip.label), function(i) {
729: get.path_length <- function(phylo, from, to, weight=NULL) {
699:     i <- which.max(path_length)
700:     return(get.path(tr, root, i))
703: ##' path from start node to end node
706: ##' @title get.path
725:     return(path)
732:         return(length(path)-1)
747:     for(i in 1:(length(path)-1)) {
748:         ee <- get_edge_index(df, path[i], path[i+1])
981:         get.path_length(tr, i, root, yscale)
984:     ordered_tip <- order(pathLength, decreasing = TRUE)
RBGL:R/interfaces.R: [ ]
308:     path <- f
305: extractPath <- function(s, f, pens) {
307: # linear path from node s to node f
311:     while (path[1] != s) {
312:         if (i > maxl)        # no path available
314:             path <- "NA" 
317:         path <- c(pens[f], path)
321:     as.numeric(path)
373:          # obtain weights in g for path of nodes in char vec nl
394:                           path_detail=as.vector(ans[[i]]), 
182:     ans <- .Call("BGL_dijkstra_shortest_paths_D", 
365:                    nG[extractPath(nodeind(thiss), nodeind(thisf[j]), curdi)]
410:     ans <- .Call("BGL_johnson_all_pairs_shortest_paths_D", 
428:     ans <- .Call("BGL_floyd_warshall_all_pairs_shortest_paths_D", 
450:     ans <- .Call("BGL_bellman_ford_shortest_paths", 
478:     ans <- .Call("BGL_dag_shortest_paths", 
exomeCopy:R/main_functions.R: [ ]
199:   path <- viterbiPath(nm.fit$par,fx.par,data,nstates,stFn,trFn,emFn)
105:   V.path <- matrix(0,nrow=nstates,ncol=T)
90: viterbiPath <- function(par,fx.par,data,nstates,stFn,trFn,emFn) {
106: ...(78 bytes skipped)...start.probs=as.double(start.probs),A=as.double(A),emit.probs=as.double(emit.probs),V=as.double(V),V.path=as.integer(V.path),path=as.integer(numeric(T)),trans.prob=as.double(numeric(nstates^2)),trans.prob.max=as.double(numeric(ns...(57 bytes skipped)...
107:   return(viterbi.call$path + 1)
201:   log.odds <- log(emit.probs[cbind(path,seq(path))]+1e-6) - log(emit.probs[normal.state,]+1e-6)
203:   fit <- new("ExomeCopy",sample.name=sample.name,type=type,path=Rle(path),ranges=granges(gr),O.norm=as.numeric(O/mu.hat),log.odds=log.odds,fx.par=fx.par,init.par=init.par,f...(89 bytes skipped)...
TIN:R/correlationPlot.R: [ ]
104:     path<-getwd()
105:     cat("Plot was saved in ",paste(path,"/",fileName,sep=""),"\n")
pathVar:R/pipeline.final.R: [ ]
634:     path <- pvalue_results@pwayCounts[[pathway]]
780:     path1 <- pvalue_results@pwayCounts1[[pathway]]
781:     path2 <- pvalue_results@pwayCounts2[[pathway]]
99: pathVarOneSample <- function(dat.mat, pways, test = c("chisq", "exact"), varStat = c("sd", 
131:     pathwayCounts <- lapply(lapply(olap.pways, function(x) table(x, deparse.level = 0)), function(x) if (len...(10 bytes skipped)...
206: pathVarTwoSamplesCont <- function(dat.mat, pways, groups, boot = 1000, varStat = c("sd", "mean", 
290: pathVarTwoSamplesDisc <- function(dat.mat, pways, groups, perc = c(1/3, 2/3), test = c("chisq", 
344:     pathwayCounts1 <- lapply(lapply(olap.pways1, function(x) table(x, deparse.level = 0)), 
354:     pathwayCounts2 <- lapply(lapply(olap.pways2, function(x) table(x, deparse.level = 0)), 
853:     pathDat1 <- as.data.frame(table(mixDat1))
855:     pathDat2 <- as.data.frame(table(mixDat2))
943:     pathname <- sapply(listPath, function(x) if (length(unlist(strsplit(x, "/"))) > 1) {
796:     plotPath1 <- ggplot(path1, aes(x = Cluster, y = Number_of_genes, fill = Cluster)) + geom_bar(stat = "identity", 
800:     plotPath2 <- ggplot(path2, aes(x = Cluster, y = Number_of_genes, fill = Cluster)) + geom_bar(stat = "identity", 
659:         plotPathway <- d + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(), 
738:             plotPathway <- d + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(), 
806:         plotPathway1 <- plotPath1 + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(), 
809:         plotPathway2 <- plotPath2 + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(), 
871:     plotPathDat1 <- ggplot(path...(136 bytes skipped)...("Number of genes") + theme(legend.position = "none") + ggtitle("Group 1") + xlab("") + ylim(0, max(pathDat1[,2], pathDat2[,2]))
872:     plotPathDat2 <- ggplot(path...(136 bytes skipped)...("Number of genes") + theme(legend.position = "none") + ggtitle("Group 2") + xlab("") + ylim(0, max(pathDat1[,2], pathDat2[,2]))
26: ...(25 bytes skipped)...ptions are TRUE or FALSE. If TRUE then the first column of the tab delimited file is expected to be path IDs. If FALSE, then the first column is expected to be pathway names.
645:     path <- as.data.frame(path)
646:     colnames(path) <- c("Cluster", "Number_of_genes")
653:     d <- ggplot(path, aes(x = Cluster, y = Number_of_genes, fill = Cluster)) + geom_bar(stat = "identity", 
663:             plotPathway <- plotPathway + annotate("text", x = sigCat, y = path[sigCat + 0.1, 
789:     path1 <- as.data.frame(path1)
790:     colnames(path1) <- c("Cluster", "Number_of_genes")
792:     path2 <- as.data.frame(path2)
793:     colnames(path2) <- c("Cluster", "Number_of_genes")
794:     yLimMax <- max(path1[, 2], path2[, 2])
813:             plotPathway1 <- plotPathway1 + annotate("text", x = sigCat, y = path1[sigCat + 
815:             plotPathway2 <- plotPathway2 + annotate("text", x = sigCat, y = path2[sigCat + 
20: #makeDBList put your pathways text file into a list
21: #pway$PATHNAME is the pathway names from the file
22: #pway$PATHID is a vector of pathway ID numbers is there are any. Otherwise it will be a vector filled with NA
23: #pway$GENES is a list of vectors, where each vector are the genes for a single pathway
25: #file is a tab delimited text file, where first and second columns are pathwayID and pathway name. The third (or last column is the genes associated with each pathway, seperated by commas.
33:         pways$PATHNAME <- as.vector(pwayTable[, 2])
34:         pways$PATHID <- as.vector(pwayTable[, 1])
35:         pways$GENES <- list(length(pways$PATHID))
37:         for (i in 1:length(pways$PATHID)) {
43:                 pways$PATHID <- pways$PATHID[-i]
44:                 pways$PATHNAME <- pways$PATHNAME[-i]
49:         pways$PATHNAME <- as.vector(pwayTable[, 1])
50:         pways$PATHID <- rep("NA", length(pways$PATHNAME))
51:         pways$GENES <- list(length(pways$PATHID))
53:         for (i in 1:length(pways$PATHID)) {
59:                 pways$PATHID <- pways$PATHID[-i]
60:                 pways$PATHNAME <- pways$PATHNAME[-i]
64:     names(pways$GENES) <- pways$PATHNAME
69: #pathVarOneSample
73: # 3. For each pathway, we extract the gene in our dataset and in which cluster they belong.
74: # 4. For each pathway, we look how the gene counts in each category and compare it to the reference counts with all th...(59 bytes skipped)...
78: # Output 1: tablePway columns are :pathway name, path...(46 bytes skipped)...or exact test,the percentage of genes from our dataset related to the total number of genes in each pathway, the number of genes from our dataset inside the pathway and the total number of genes inside the pathway
79: #Output 2: NAPways corresponds to the pathway names of the pathway having less than 10 genes for the Chi-Squared or also more than 500 genes for the exact tes.
80: # Output 3: genesInPway correspond to each pathway with the genes from the datasets belonging to it and in which cluster they were classsify.
83: # Output 6: pwayCounts is the genes counts of the each pathway in each cluster.
91: #Input 2: pways contains the pathways of interest (KEGG, REACTOME, etc...) in the same format that makeDBList
103:     # check if any GENES are in the pathway.
106:         stop("None of the genes in the data set are found in the given gene set or pathway")
125:     # olap.pways contains the genes are in each pathway with their cluster number
127:     names(olap.pways) <- pways$PATHNAME
130:     # list of tables of the number of genes in each cluster per pathway
140:     # Chi-Square or Exact test to compare the reference and the pathway distribution
142:         # chisq test and ajustment of the pvalue for each pathway
143:         pvals.pways <- sapply(pathwayCounts, function(x) if (sum(x) >= 10) {
154:         # Exact test and ajustment of the pvalue for each pathway
157:         # We perform the multinomial test on the pathway containing between 10 and 500 genes because a bigger number will involve too many possibilities ...(11 bytes skipped)...
158:         pvals.pways <- sapply(pathwayCounts, function(x) if (sum(x) >= 10 & sum(x) < 500) {
170:     xtab <- data.table(PwayName = pways$PATHNAME[not_na], PwayID = pways$PATHID[not_na], APval = apvals.pways, 
172:         NumOfGenesFromDataSetInPathway = lengths(olap.pways[not_na]), PathwaySize = pways$SIZE[not_na])
176: ...(50 bytes skipped)...ab, NAPways=pval.NA, genesInPway=olap.pways, refProb=pexp, refCounts=pexp * length(mix), pwayCounts=pathwayCounts, numOfClus=nmix, varStat=varStat, genesInClus=mix, var=vs)
181: #pathVarTwoSamplesCont
184: # 2. For each pathway, we extract the gene in our dataset.
185: # 3. For each pathway, we look how its genes are distributed and compare the 2 groups using the bootstrap Kolmogorov-S...(12 bytes skipped)...
189: # Output 1: tablePway columns are :pathway name, pathway IDs, adjusted p-value ffrom the boot KS test, the number of genes from our dataset inside the pathway and the total number of genes inside the pathway.
190: #Output 2: NAPways corresponds to the pathway names of the pathway having no genes inside the dataset.
191: # Output 3: genesInPway correspond to the genes from the dataset belonging to each pathway
200: #Input 2: pways contains the pathways of interest (KEGG, REACTOME, etc...) in the same format that makeDBList
209:     # check if any GENES are in the pathway
212:         stop("None of the genes in the data set are found in the given gene set or pathway")
236:     # olap.pways contains the genes from the dataset in each pathway
238:     names(olap.pways) <- pways$PATHNAME
239:     # We compare the two densities (one for each group) of the genes of each pathway with the Kolmogorov-Smirnow test.       
251:     xtab <- data.table(PwayName = pways$PATHNAME[not_na], PwayID = pways$PATHID[not_na], APval = apvals, 
253:         NumOfGenesFromDataSetInPathway = lengths(olap.pways[not_na]), PathwaySize = pways$SIZE[not_na])
261: #pathVarTwoSamplesDisc
265: # 3. For each pathway, we extract the gene in our dataset and in which cluster they belong.
266: # 4. For each pathway, we look at the gene counts in each category and compare the 2 samples to each other with all th...(60 bytes skipped)...
269: # Output 1: tablePway columns are :pathway name, path...(11 bytes skipped)...justed p-value, the percentage of genes in our dataset related to the total number of genes in each pathway, the number of genes from our dataset inside the pathway and the total number of genes inside the pathway.
270: #Output 2: NAPways corresponds to the pathway names of the pathway having no genes inside the dataset.
271: # Output 3: genesInPway1 corresponds to the genes from the dataset belonging to each pathway in the first sample
272: # Output 4: genesInPway2 corresponds to the genes from the dataset belonging to each pathway in the second sample
273: # Output 5: pwayCounts1 corresponds to a list of tables of the number of genes in each cluster per pathway for group 1
274: # Output 6: pwayCounts2 corresponds to a list of tables of the number of genes in each cluster per pathway for group 2
283: #Input 2: pways contains the pathways of interest (KEGG, REACTOME, etc...) in the same format that makeDBList
294:     # check if any GENES are in the pathway
297:         stop("None of the genes in the data set are found in the given gene set or pathway")
338:     # olap.pways contains the genes from the dataset in each pathway
340:     names(olap.pways1) <- pways$PATHNAME
342:     names(olap.pways2) <- pways$PATHNAME
343:     # list of tables of the number of genes in each cluster per pathway
353:     # list of tables of the number of genes in each cluster per pathway
364:         # chisq test and ajustment of the pvalue for each pathway
365:         pvals.pways <- sapply(pways$PATHNAME, function(x) if (sum(pathwayCounts1[x][[1]]) >= 
367:             exp.val <- pathwayCounts1[x][[1]]  #forgot the.val
368:             chi <- sum((pathwayCounts2[x][[1]] - exp.val)^2/exp.val)
374:         pval.NA <- pways$PATHNAME[-not_na]
377:         # Exact test and ajustment of the pvalue for each pathway
380:         # We perform the multinomial test on the pathway containing between 10 and 500 genes because a bigger number will involve too many possibilities ...(11 bytes skipped)...
381:         pvals.pways <- sapply(pways$PATHNAME, function(x) if (sum(pathwayCounts1[x][[1]]) >= 
382:             10 & sum(pathwayCounts1[x][[1]]) < 500) {
383:             pexp <- pathwayCounts1[x][[1]]/sum(pathwayCounts1[x][[1]])
384:             multinomial.test(as.vector(pathwayCounts2[x][[1]]), as.vector(pexp), useChisq = FALSE)$p.value
391:         pval.NA <- pways$PATHNAME[-not_na]
395:     xtab <- data.table(PwayName = pways$PATHNAME[not_na], PwayID = pways$PATHID[not_na], APval = apvals.pways, 
397:         NumOfGenesFromDataSetInPway = lengths(olap.pways1[not_na]), PathwaySize = pways$SIZE[not_na])
402: ...(36 bytes skipped)...", tablePway=xtab, NAPways=pval.NA, genesInPway1=olap.pways1, genesInPway2=olap.pways2, pwayCounts1=pathwayCounts1, pwayCounts2=pathwayCounts2, groups=groups, groupNames=groupNames, var1=var_1, var2=var_2, varStat=varStat)
409: #It is a function that returns the significant pathway(s),which category(ies) from this pathway are significant and which gene(s) belongs to this(ese) category(ies).
413: # Output 1: genesInSigPways1 contains the genes per significant pathway belonging to the significant category.
414: #Output 2: sigCatPerPway contains the category(ies) per pathway that are significant.
418: #Input 1: pvalue_results is result from the pathVarOneSample function
430:         warning("There are no significant pathways. Quitting significant_category function and returning empty object")
434:     # PathName that were significant in xtab.
436:     # The list of table with the number of genes in each cluster from the significant pathways
442:     # results contain the p-value for each category in each pathway computed with the binomial test.
450:     # For each significant pathway we look which category(ies) is are significant and the genes
477: #It is a function that returns the significant pathways and which genes belongs to these #pathways.
481: # Output 1: genesInSigPways1 contains the genes belonging to each significant pathway
485: #Input 1: pvalue_results is result from the pathVarTwoSamplesCont function
493:         warning("There are no significant pathways. Quitting significant_category function and returning empty object")
497:     # Pathways that were significant in xtab.
499:     # Genes from the dataset inside each significant pathway
507: #It is a function that returns the significant pathways and which genes belong to these pathways
511: # Output 1: genesInSigPways1 contains the genes belonging to each significant pathway in significant categories in the first sample
512: # Output 2: genesInSigPways2 contains the genes belonging to each significant pathway in significant categories in the second sample
513: # Output 3: sigCatPerPway contains the significant categories in each pathway
517: #Input 1: pvalue_results is result from the pathVarTwoSamplesDisc function
527:         warning("There are no significant pathways. Quitting significant_category function and returning empty object")
531:     # PathName that were significant in xtab.
533:     # The list of table with the number of genes in each cluster from the significant pathways
540:     # results contain the p-value for each category in each pathway computed with the binomial
550:     # For each significant pathway we look which category(ies) are significant and the genes belonging to this(ese) category(ies). ...(81 bytes skipped)...
576: ...(77 bytes skipped)...es cases and then use sigOneSample, sigTwoSamplesCont, or sigTwoSamplesDisc to find the significant pathways.
582: #Input 1: pvalue_results is result from the pathVarOneSample, pathVarTwoSamplesCont, or pathVarTwoSamplesDisc function.
602: #It is a function that returns the plot of the reference counts along with the plot of a chosen #pathway. This function is made for output from pathVarOneSample.
605: # plot of the reference and a pathway counts
608: #Input 1: pvalue_results is result from the pathVarOneSample function
609: #Input 2: pathway is the chosen pathway you want to plot.
613: #If sig is not NULL, the function will check if the pathway is a significant one and if yes the
619: plotOneSample <- function(pvalue_results, pathway, sig) {
620:     mp <- pathway
621:     # If the name of the pathway is two long it will cut it into two lines in the plot.
644:     # data frame for the pathway distribution
656:     # If the pathway is one of the significant ones, the title will be in red. and the categories, if any, we be high...(24 bytes skipped)...
657:     if (pathway %in% names(category)) {
658:         sigCat <- category[[pathway]]
670:     # plot the reference and pathway counts side by side
676: ...(34 bytes skipped)... plot of the two densities (one for each group) of the statistics (sd, mad, cv or mean) of a chosen pathway. This function is made for output from pathVarTwoSamplesCont.
682: #Input 1: pvalue_results is result from the pathVarTwoSamplesCont function
683: #Input 2: pathway is the chosen pathway you want to plot.
687: #If sig is not NULL, the function will check if the pathway is a significant one and if yes the title will be printed in red.
690: plotTwoSamplesCont <- function(pvalue_results, pathway, sig) {
691:     mp <- pathway
692:     # If the name of the pathway is two long it will cut it into two lines in the plot.
705:     # If the number of genes of the pathway is less than 3, it is not possible to draw a density and it will return an empty plot with this ...(8 bytes skipped)...
706:     if (xtab[PwayName == pathway, NumOfGenesFromDataSetInPathway] < 3) {
717:         genes <- pvalue_results@genesInPway[[pathway]]
726: ...(0 bytes skipped)...        # Plot of the two densities (one for each group) of the variability of the genes inside the pathway.
736:         # If we included the results of sigTwoSamplesCont, it will verify if the pathway is one of them and if yes the title will be printed in red.
737:         if (pathway %in% significant) {
752: ##It is a function that returns 2 plots of the 2 samples for a chosen pathway. This function is made for output from pathVarTwoSamplesDisc.
755: # plot of the 2 samples for a significant pathway
758: #Input 1: pvalue_results is result from the pathVarTwoSamplesDisc function
759: #Input 2: pathway is the chosen pathway you want to plot.
763: #If sig is not NULL, the function will check if the pathway is a significant one and if yes the title will be printed in red.
766: plotTwoSamplesDisc <- function(pvalue_results, pathway, sig) {
767:     mp <- pathway
768:     # If the name of the pathway is two long it will cut it into two lines in the plot.
791:     # data frame for the pathway distribution
803:     # If the pathway is one of the significant ones, the title will be in red. and the categories, if any, we be high...(24 bytes skipped)...
804:     if (pathway %in% names(category)) {
805:         sigCat <- category[[pathway]]
819:         plotPathway1 <- plotPath1 + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(), 
821:         plotPathway2 <- plotPath2 + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(), 
824:     # plot the reference and pathway counts side by side
854:     colnames(pathDat1) <- c("Cluster", "Number_of_genes")
856:     colnames(pathDat2) <- c("Cluster", "Number_of_genes")
862:     results <- apply(rbind(pathDat2[,2],pathDat1[,2]/pathDat1[,2]/sum(pathDat1[,2])), 2, function(y) multinomial.test(c(y[1], sum(pathDat2[,2]) - y[1]), prob = c(y[2],1 - y[2]))$p.value)
874:         plotPathDat1 <- plotPathDat1 + annotate("text", x = category, y = pathDat1[category +
876:         plotPathDat2 <- plotPathDat2 + annotate("text", x = category, y = pathDat2[category +
895: ...(46 bytes skipped)...rom the one sample or two samples cases and then use plotOneSample or plotTwoSamples for the chosen pathway.
898: # plot of the results of the one or two samples case for a chosen pathway.
901: #Input 1: pvalue_results is the result from the pathVarOneSample, pathVarTwoSamplesCont, or pathVarTwoSamplesDisc function
902: #Input 2: pathway is the chosen pathway you want to plot.
906: #If sig is not NULL, the function will check if the pathway is a significant one. And they will be highlighted in the resulting plot (see plotOneSample or p...(14 bytes skipped)...
909: plotPway <- function(pvalue_results, pathway, sig = NULL) {
912:         plotOneSample(pvalue_results, pathway, sig)
914:         plotTwoSamplesCont(pvalue_results, pathway, sig)
916:         plotTwoSamplesDisc(pvalue_results, pathway, sig)
923: #Save as a pdf the plots for the one or two samples case of the significant pathway or a chosen list of pathway..
926: # Save as a pdf the plots of the significant pathway or a chosen list of pathway.
929: #Input 1: pvalue_results is the result from the pathVarOneSample, pathVarTwoSamplesCont, or pathVarTwoSamplesDisc function
931: #Input 3: listPath is "significant" if you want to save the plots of the significant pathways or can be a list of names of pathway of interest.
934: #If sig is not NULL, the function will check if the pathway is a significant one. And they will be highlighted in the resulting plot (see plotOneSample or p...(14 bytes skipped)...
937: saveAsPDF <- function(pvalue_results, sig, listPath = "significant") {
938:     # If listPath='significant' we will save as pdf all the plots corresponding to the significant pathway from sig. Other wise it will save the pathways given to listPath.
939:     if (listPath[1] == "significant") {
940:         listPath <- names(sig@genesInSigPways1)
942:     # The name of the file will be the pathname where we replace '/' by '_'
948:     # save as PDF all the pathways significant or given in listPath
949:     for (i in 1:length(pathname)) {
950:         pdf(file = paste(pathname[i], ".pdf", sep = ""), width = 10, height = 7)
951:         plotPway(pvalue_results, listPath[i], sig)
959: #It is a function that returns one list of genes for group 1 and one for group 2 of a chosen pathway having their statistics (sd, mad, cv or mean) inside a chosen interval.
962: # Output 1: genes1 contains the genes belonging to the pathway in the given window for group 1.
963: # Output 2: genes2 contains the genes belonging to the pathway in the given window for group 2.
964: # Output 3: genesAll contains the genes from the dataset belonging to the pathway
967: #Input 1: pvalue_results is result from the pathVarTwoSamplesCont function
968: #Input 2: pathway is the chosen pathway.
973: getGenes <- function(pvalue_results, pathway, window) {
978:     genes <- olap.pways[[pathway]]
981:     # Take the genes from group 1 from the pathway belonging to the window
983:     # Take the genes from group 3 from the pathway belonging to the window
985:     # Take all the genes from the pathway
431:         sig <- new("significantPathway", genesInSigPways1=list(), sigCatPerPway=list(), thresPValue=numeric())
471:     sig <- new("significantPathway", genesInSigPways1=genes, sigCatPerPway=category, thresPValue=pvalue)
494:         sig <- new("significantPathway2", genesInSigPways1=list(), thresPValue=numeric())
501:     sig <- new("significantPathway2", genesInSigPways1=genes, thresPValue=pvalue)
528:         sig <- new("significantPathway3", genesInSigPways1=list(), genesInSigPways2=list(), sigCatPerPway=list(), thresPValue=numeric()...(1 bytes skipped)...
570:     sig <- new("significantPathway3", genesInSigPways1=genes1, genesInSigPways2=genes2, sigCatPerPway=category, thresPValue=pvalue)...(0 bytes skipped)...
667:         plotPathway <- d + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(), 
671:     grid.arrange(arrangeGrob(plotRef, plotPathway, nrow = 1))
742:             plotPathway <- d + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(), 
746:     plot(plotPathway)
825:     grid.arrange(arrangeGrob(plotPathway1, plotPathway2, nrow = 1))
879:         plotPathDat1 <- plotPathDat1 + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),panel.background...(63 bytes skipped)...
880:         plotPathDat2 <- plotPathDat2 + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),panel.background...(63 bytes skipped)...
884:         grid.arrange(arrangeGrob(plotPathDat1, plotPathDat2, nrow = 1))
887:         grid.arrange(arrangeGrob(plotPathDat1, plotPathDat2, nrow = 1))
ChemmineR:R/AllClasses.R: [ ]
1734: 	path <- conMA(x, exclude="H")
1979:             path <- .linearCon(x=con)
1800: 	conpath <- t(sapply(path, function(x) x[c(1, length(x))]))
1812: 	pathlist <- cyclist$path
1813: 	conpath <- cyclist$conpath
1814: 	pathlistnew <- list() 
1735: 	noconnect <- rowSums(path) != 0 # Removes atoms with no connections
1736: 	path <- path[noconnect, noconnect]
1737: 	if(all(dim(path) == 0)) { return(path) } 
1738: 	term <- which(rowSums(path > 0)==1)
1740: 		path <- path[-term,-term]
1741: 		if(any(dim(path) == 0) | is.vector(path)) { break() }
1742: 		term <- which(rowSums(path > 0)==1)
1744: 	return(path)
1779: .update <- function(con, path) {
1780: 	## Remove non-terminal atoms in each path
1781: 	center_atoms <- unique(unlist(lapply(path, function(x) x[-c(1, length(x))])))
1791: 		path <- c(path, remainbonds)
1792: 		names(path) <- seq(along=path)
1794: 	## Collect complete rings and remove them from path object
1795: 	index <- unlist(lapply(path, function(y) any(duplicated(y))))
1796: 	rings <- path[index]
1797: 	path <- path[!index]
1798: 	names(path) <- seq(along=path)
1799: 	## Connection list for path component
1806: 	return(list(con=con, conpath=conpath, path=path, rings=rings))
1850: 		## Collect complete rings and remove them from path object
1980:             cyclist <- .update(con=con, path=path)
13: .sdfDownload <- function(mypath="ftp://ftp.ncbi.nih.gov/pubchem/Compound/CURRENT-Full/SDF/", myfile="Compound_00650001_00675000.sdf...(7 bytes skipped)...
14: 	system(paste("wget ", mypath, myfile, sep=""))
17: # .sdfDownload(mypath="ftp://ftp.ncbi.nih.gov/pubchem/Compound/CURRENT-Full/SDF/", myfile="Compound_00650001_00675000.sdf...(6 bytes skipped)...
1747: ## (b) Function to return the longest possible linear bond paths where:
1801: 	ends <- unique(as.vector(conpath))
1802: 	conpath <- lapply(ends, function(x) as.numeric(names(which(rowSums(conpath==x) > 0))))
1803: 	names(conpath) <- ends
1804: 	conpath <- conpath[sapply(conpath, length) > 1] # removes ends that occur only once 
1816: 	## Loop to join linear paths/fragments stored in pathlist
1817: 	for(i in names(conpath)) {
1818: 		if(length(conpath) == 0 | !any(names(conpath) == i)) { next() }
1819: 		pos <- t(combn(conpath[[i]], m=2))
1821: 			p1 <- pathlist[[pos[j,1]]]
1822: 			p2 <- pathlist[[pos[j,2]]]
1827: 				pathlistnew[[length(pathlistnew)+1]] <- c(rev(p2[-1]), p1)
1830: 				pathlistnew[[length(pathlistnew)+1]] <- c(p1, rev(p2[-length(p2)]))
1833: 				pathlistnew[[length(pathlistnew)+1]] <- c(p2, p1[-1])
1836: 				pathlistnew[[length(pathlistnew)+1]] <- c(p1, p2[-1])
1840: 		if(length(pathlistnew) == 0) { next() }
1842: 		dups <- duplicated(sapply(pathlistnew, function(x) paste(sort(unique(x)), collapse="_")))
1843: 		pathlistnew <- pathlistnew[!dups]
1846: 			l <- sapply(pathlistnew, length)
1847: 			pathlistnew <- pathlistnew[l <= upper]
1848: 			if(length(pathlistnew) == 0) { next() }
1851: 		index <- unlist(lapply(pathlistnew, function(y) any(duplicated(y[c(1, length(y))]))))
1852: 		rings[[length(rings)+1]] <- pathlistnew[index]
1853: 		pathlistnew <- pathlistnew[!index]
1854: 		## Remove paths with internal duplicates 
1855: 		if(length(pathlistnew) > 0) {
1856: 			index <- unlist(lapply(pathlistnew, function(y) any(duplicated(y))))
1857: 			pathlistnew <- pathlistnew[!index]
1859: 		## Update pathlist and conpath
1860: 		pathlist <- c(pathlist[-conpath[[i]]], pathlistnew)
1861: 		dups <- duplicated(sapply(pathlist, function(x) paste(sort(unique(x)), collapse="_")))
1862: 		pathlist <- pathlist[!dups]
1863: 		names(pathlist) <- seq(along=pathlist)
1864: 		conpath <- t(sapply(pathlist, function(x) x[c(1, length(x))]))
1865: 		ends <- unique(as.vector(conpath))
1866: 		conpath <- lapply(ends, function(x) as.numeric(names(which(rowSums(conpath==x) > 0))))
1867: 		names(conpath) <- ends
1868: 		conpath <- conpath[sapply(conpath, length) > 1] # removes ends that occur only once
1869: 		pathlistnew <- list()
DMRforPairs:R/functions.R: [ ]
457:     path = "figures"
450:     dir.create(file.path(getwd(), experiment.name))
452:     dir.create(file.path(paste(getwd(), experiment.name, sep = "/"), 
456:     setwd(file.path(getwd(), experiment.name))
485:                 path = path)
487:             tested$Figure[cr] = paste("<a href=\"./", path, "/", 
490:             tested$Statistics[cr] = paste("<a href=\"./", path, "/", 
493:             write.table(file = paste("./", path, "/", tested$regionID[cr], 
507:                 scores = FALSE, path = path)
509:             tested$Figure[cr] = paste("<a href=\"./", path, "/", 
512:             tested$Statistics[cr] = paste("<a href=\"./", path, "/", 
519:             write.table(file = paste("./", path, "/", tested$regionID[cr], 
533:                 scores = FALSE, path = path)
539:             tested$Figure[cr] = paste("<a href=\"./", path, "/", 
542:             tested$Statistics[cr] = paste("<a href=\"./", path, "/", 
545:             write.table(file = paste("./", path, "/", tested$regionID[cr], 
606:             path, "/", tested_4html_selected$ID, ".png\" height=\"63\" width=\"125\">", 
624:             path, "/", tested_4html_selected$ID, ".png\" height=\"63\" width=\"125\">", 
639:     regionID, clr = NA, annotate = TRUE, scores = TRUE, path) {
642:     path = paste("./", path, "/", sep = "")
651:         clr = clr, annotate = annotate, scores = scores, path = path)
656:     annotate = TRUE, path) {
659:     path = paste("./", path, "/", sep = "")
673:             annotate = annotate, scores = TRUE, path = path)
679:     ID = "CustomRegion", clr = NA, annotate = TRUE, path) {
680:     path = paste("./", path, "/", sep = "")
693:             annotate = annotate, scores = TRUE, path = path)
699:     ID = NA, clr = NA, annotate = TRUE, scores = NA, path) {
730:     png(paste(path, ID, ".png", sep = ""), width = 500, height = 250)
750:     pdf(paste(path, ID, ".pdf", sep = ""), width = 10, height = 10)
biodb:R/BiodbConn.R: [ ]
734:     path <- cch$getFilePath(self$getCacheId(), name='download', ext=ext)
147: #' Get the path to the persistent cache file.
727: #' Gets the path where the downloaded content is written.
728: #' @return The path where the downloaded database is written.
736:     logDebug0('Download path of ', self$getId(), ' is "', path, '".')
738:     return(path)
743: #' @param src Path to the downloaded file.
151: #' containing the paths to the cache files corresponding to the requested
156:     fp <- c$getFilePath(self$getCacheId(), entry.id, self$getEntryFileExt())
729: getDownloadPath=function() {
793:         if ( ! file.exists(self$getDownloadPath()))
795:                 self$getDownloadPath())
EpiMix:R/TCGA_Download_Preprocess.R: [ ]
1719:     path <- eh[[hub_id]]
176:         nameForDownloadedFileFullPath <- paste0(saveDir, nameForDownloadedFile)
41: #' @param saveDir path to directory to save downloaded files.
50: #' @return DownloadedFile path to directory with downloaded files.
405: #' @param METdirectory path to the 27K or 450K data
1573: #' @param TargetDirectory Path to save the sample.info. Default: ''.
1712: #' @return local file path where the lncRNA expression data are saved
1720:     return(path)
7: #' @return list with paths to downloaded files for both 27k and 450k methylation data.
116:         # warnMessage <- paste0('\nNot returning any viable url data paths
193:                 untar(nameForDownloadedFileFullPath, exdir = saveDir)
965: #' @return list with paths to downloaded files for gene expression.
SeqArray:R/Internal.R: [ ]
697:     path <- name.gdsn(node, TRUE)
175: .var_path <- function(var.name, prefix)
173: # Variable path
700:         varname <- .var_path(substring(varname, 2L), "@")
701:     fullvarname <- paste(path, varname, sep="/")
709:         if (path == "genotype")
712:             varname2 <- path
726:             if (path == "genotype")
ArrayExpress:R/parseMAGE.r: [ ]
516: 	path = mageFiles$path
30: isOneChannel = function(sdrf,path){
31: 	ph = try(read.AnnotatedDataFrame(sdrf, path = path, row.names = NULL, blank.lines.skip = TRUE, fill = TRUE, varMetadata.char = "$", quote="\""))
39: readPhenoData = function(sdrf,path){
42: 	ph = try(read.AnnotatedDataFrame(sdrf, path = path, row.names = NULL, blank.lines.skip = TRUE, fill = TRUE, varMetadata.char = "$", quote="\""))
105: readAEdata = function(path,files,dataCols,green.only){
108: 	source = getDataFormat(path,files)
121: 		rawdata = try(oligo::read.celfiles(filenames = file.path(path,unique(files))))
123: 			stop("Unable to read cel files in",path)
130: 			dataCols= try(getDataColsForAE1(path,files))
133: 		rawdata = try(read.maimages(files=files,path=path,source="generic",columns=dataCols,annotation=headers$ae1))
138: 		rawdata = try(read.maimages(files=files,path=path,source=source,columns=dataCols,green.only=green.only))
142: 		rawdata = try(read.maimages(files=files,path=path,source="generic",columns=dataCols,green.only=green.only))
149: 		stop("Unable to read data files in",path)
169: readFeatures<-function(adf,path,procADFref=NULL){
173: 	lines2skip = skipADFheader(adf,path,!is.null(procADFref))
174: 	features = try(read.table(file.path(path, adf), row.names = NULL, blank.lines.skip = TRUE, fill = TRUE, sep="\t", na.strings=c('?','NA'), sk...(40 bytes skipped)...
223: readExperimentData = function(idf, path){
224: 	idffile = scan(file.path(path,idf),character(),sep = "\n",encoding="UTF-8")
264: skipADFheader<-function(adf,path,proc=F){
270: 	con = file(file.path(path, adf), "r")	
319: getDataFormat=function(path,files){
326: 		allcnames = scan(file.path(path,files[1]),what = "",nlines = 200, sep = "\t",quiet=TRUE)
329: 			allcnames = scan(file.path(path,files[1]),what = "",nlines = 200, sep = "\t",quiet=TRUE,encoding="latin1")
345: 	allcnames = scan(file.path(path,files[1]),what = "",nlines = 1, sep = "\n",quiet=TRUE)
352: getDataColsForAE1 = function(path,files){
362: 						file.path(system.file("doc", package = "ArrayExpress"),"QT_list.txt"),
375: 	allcnames = scan(file.path(path,files[1]),what = "",nlines = 1, sep = "\t",quiet=TRUE)
430: 		if(!all(sapply(2:length(files), function(i) readLines(file.path(path,files[1]),1) == readLines(file.path(path,files[i]),1))))
518: 	try(file.remove(file.path(path, mageFiles$rawFiles)))
519: 	try(file.remove(file.path(path, mageFiles$processedFiles)))
521: 	try(file.remove(file.path(path, mageFiles$sdrf)))
522: 	try(file.remove(file.path(path, mageFiles$idf)))
523: 	try(file.remove(file.path(path, mageFiles$adf)))
524: 	try(file.remove(file.path(path, mageFiles$rawArchive)))
525: 	try(file.remove(file.path(path, mageFiles$processedArchive)))
TPP2D:R/import_funcs.R: [ ]
348:   Experiment <- Path <- Compound <- NULL
570:  Path <- label <- conc <- Compound <- Experiment <- 
371:   givenPaths <- NULL
253:                "Experiment", "Path", "Path", 
254:                "Path", "Condition", "Replicate", 
334: #' @param infoTable character string of a file path to
372:   if (any("Path" %in% colnames(infoTable))) {
373:     if (all(infoTable$Path == "") || all(is.na(infoTable$Path))) {
374:       message("Removing empty 'Path' column from config table")
375:       infoTable <- infoTable %>% select(-Path)
378:       givenPaths <- infoTable$Path
443: #' @param configTable character string of a file path to a config table
485:   files <- configTable$Path
511:                   "RefCol", "Path", "Condition")
573:   if(any(grepl("Path", colnames(configWide)))){
575:       dplyr::select(-Path) %>%
756: #' @param configTable character string of a file path to a config table
433:       expCond = infoTable$Condition, files = givenPaths, 
epivizrServer:R/middleware-plus-supporting.R: [ ]
438:     path <- req$PATH_INFO
217:   abs.path <- file.path(dir, relpath)
446:     abs.path <- resolve(root, path)
367:   pathPattern <- paste("^\\Q", prefix, "\\E/", sep = "")
371:       origPath <- req$PATH_INFO
376:       pathInfo <- substr(req$PATH_INFO, nchar(prefix)+1, nchar(req$PATH_INFO))
402:   pathPattern <- paste("^\\Q", prefix, "\\E/", sep = "")
407:       origPath <- req$PATH_INFO
412:       pathInfo <- substr(req$PATH_INFO, nchar(prefix)+1, nchar(req$PATH_INFO))
205: # Attempt to join a path and relative path, and turn the result into a
206: # (normalized) absolute path. The result will only be returned if it is an
218:   if (!file.exists(abs.path))
220:   abs.path <- normalizePath(abs.path, winslash='/', mustWork=TRUE)
224:   if (nchar(abs.path) <= nchar(dir) + 1)
226:   if (substr(abs.path, 1, nchar(dir)) != dir ||
227:       substr(abs.path, nchar(dir)+1, nchar(dir)+1) != '/') {
230:   return(abs.path)
344: # `PATH_INFO` field, but since it's such a common need, let's make it simple by
349: # the route off of the `PATH_INFO` (and add it to the end of `SCRIPT_NAME`).
351: # path has already been matched via routing.
369:     if (isTRUE(grepl(pathPattern, req$PATH_INFO))) {
374:         req$PATH_INFO <- origPath
378:       req$PATH_INFO <- pathInfo
405:     if (isTRUE(grepl(pathPattern, req$PATH_INFO))) {
410:         req$PATH_INFO <- origPath
414:       req$PATH_INFO <- pathInfo
440:     if (is.null(path))
443:     if (path == '/')
444:       path <- '/index.html'
447:     if (is.null(abs.path))
450:     content.type <- mime::guess_type(abs.path)
451:     response.content <- readBin(abs.path, 'raw', n=file.info(abs.path)$size)
216: resolve <- function(dir, relpath) {
221:   dir <- normalizePath(dir, winslash='/', mustWork=TRUE)
295: # representing paths to be used instead of handlers; any such strings we
ompBAM:R/ompBAM.R: [ ]
144:     path <- file.path(dir, pkg)
65:     proj_path <- .check_ompBAM_path(path)
172: .check_ompBAM_path <- function(path) {   
178:         proj_path <- normalizePath(path)
49: #' @param path The path to the desired directory in which to set up a new
53: #' path <- file.path(tempdir(), "myPkgName")
54: #' use_ompBAM(path)
58: use_ompBAM <- function(path = ".") {
66:     proj_name <- basename(proj_path)   
68:     usethis::create_package(proj_path, open = FALSE)
69:     usethis::proj_set(proj_path, force = TRUE)
71:     makevars <- file.path(proj_path, "src", "Makevars.in")
72:     makevars_win <- file.path(proj_path, "src", "Makevars.win")
73:     configure <- file.path(proj_path, "configure")
74:     configure.win <- file.path(proj_path, "configure.win")
75:     example_code <- file.path(proj_path, "src/ompBAM_example.cpp")
76:     R_import_file <- file.path(proj_path, "R/ompBAM_imports.R")
82:     file.copy(system.file(file.path('examples', 'ompBAMExample', "src", 
84:     file.copy(system.file(file.path('examples', 'ompBAMExample', "src", 
87:     file.copy(system.file(file.path('examples','ompBAMExample',"configure"), 
89:     file.copy(system.file(file.path('examples','ompBAMExample',"configure.win"),
92:     file.copy(system.file(file.path('extdata', 'ompBAM_example.cpp'), 
97:     .omp_use_dependency("Rcpp", "Imports", proj_path)
98:     .omp_use_dependency("zlibbioc", "Imports", proj_path)
99:     .omp_use_dependency("ompBAM", "LinkingTo", proj_path)
100:     .omp_use_dependency("Rcpp", "LinkingTo", proj_path)
101:     .omp_use_dependency("zlibbioc", "LinkingTo", proj_path)
103:     end_msg <- paste(proj_name, "successfully created in", proj_path)
121: #' # The directory containing the source code is given by the path here
123: #' print(system.file(file.path('examples', "ompBAMExample"), 
137:     from <- system.file(file.path('examples', pkg), package = 'ompBAM')
146:     devtools::load_all(path)
149: #' Returns the path of a test BAM file
157: #' @param dataset Returns the path to either the "Unsorted" or "scRNAseq" BAM.
158: #' @return A file path to the specified BAM file.
165:         system.file(file.path('extdata', 'THP1_ND_1.bam'), package = 'ompBAM'))
167:         system.file(file.path('extdata', 'MGE_E35_1.bam'), package = 'ompBAM'))
171: # Sanity checks on provided path for smooth package creation.
173:     if(!dir.exists(dirname(path))) {
174:         errormsg <- paste(dirname(path), "needs to exist")
177:     if(dir.exists(path)) {
180:         proj_path <- file.path(normalizePath(dirname(path)), basename(path))
182:     makevars <- file.path(proj_path, "src", "Makevars")
183:     makevars_win <- file.path(proj_path, "src", "Makevars.win")
191:     example_code <- file.path(proj_path, "src/ompBAM_example.cpp")
199:     R_import_file <- file.path(proj_path, "R/ompBAM_imports.R")
207:     return(proj_path)
228: .omp_use_dependency <- function(package, type, proj_path) {
233:     deps <- desc::desc_get_deps(proj_path)
243:         desc::desc_set_dep(package, type, file = proj_path)
263:             desc::desc_del_dep(package, existing_type, file = proj_path)
264:             desc::desc_set_dep(package, type, file = proj_path)
interactiveDisplay:inst/www/js/d3.v2.js: [ ]
6081:     function path(d, i) {
1451:   function d3_layout_bundlePath(link) {
1910:   function d3_path_circle(radius) {
1119:     var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
1120:     while (++i < n) path.push("V", (p = points[i])[1], "H", p[0]);
1121:     return path.join("");
1124:     var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
1125:     while (++i < n) path.push("H", (p = points[i])[0], "V", p[1]);
1126:     return path.join("");
1141:     var quad = points.length != tangents.length, path = "", p0 = points[0], p = points[1], t0 = tangents[0], t = t0, pi = 1;
1143:       path += "Q" + (p[0] - t0[0] * 2 / 3) + "," + (p[1] - t0[1] * 2 / 3) + "," + p[0] + "," + p[1];
1151:       path += "C" + (p0[0] + t0[0]) + "," + (p0[1] + t0[1]) + "," + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," ...(21 bytes skipped)...
1155:         path += "S" + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1];
1160:       path += "Q" + (p[0] + t[0] * 2 / 3) + "," + (p[1] + t[1] * 2 / 3) + "," + lp[0] + "," + lp[1];
1162:     return path;
1176: ...(44 bytes skipped)...s[0], x0 = pi[0], y0 = pi[1], px = [ x0, x0, x0, (pi = points[1])[0] ], py = [ y0, y0, y0, pi[1] ], path = [ x0, ",", y0 ];
1177:     d3_svg_lineBasisBezier(path, px, py);
1184:       d3_svg_lineBasisBezier(path, px, py);
1192:       d3_svg_lineBasisBezier(path, px, py);
1194:     return path.join("");
1198:     var path = [], i = -1, n = points.length, pi, px = [ 0 ], py = [ 0 ];
1204:     path.push(d3_svg_lineDot4(d3_svg_lineBasisBezier3, px) + "," + d3_svg_lineDot4(d3_svg_lineBasisBezier3, ...(6 bytes skipped)...
1212:       d3_svg_lineBasisBezier(path, px, py);
1214:     return path.join("");
1217:     var path, i = -1, n = points.length, m = n + 4, pi, px = [], py = [];
1223:     path = [ d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py)...(4 bytes skipped)...
1231:       d3_svg_lineBasisBezier(path, px, py);
1233:     return path.join("");
1251:   function d3_svg_lineBasisBezier(path, x, y) {
1252:     path.push("C", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier1...(207 bytes skipped)...
4383:         var tick = g.selectAll("g").data(ticks, String), tickEnter = tick.enter().insert("g", "path").style("opacity", 1e-6), tickExit = d3.transition(tick.exit()).style("opacity", 1e-6).remove(), ti...(67 bytes skipped)...
4384:         var range = d3_scaleRange(scale), path = g.selectAll(".domain").data([ 0 ]), pathEnter = path.enter().append("path").attr("class", "domain"), pathUpdate = d3.transition(path);
6080:   d3.geo.path = function() {
6082:       if (typeof pointRadius === "function") pointCircle = d3_path_circle(pointRadius.apply(this, arguments));
6111:     var pointRadius = 4.5, pointCircle = d3_path_circle(pointRadius), projection = d3.geo.albersUsa(), buffer = [];
6178:     var areaType = path.area = d3_geo_type({
6201:     var centroidType = path.centroid = d3_geo_type({
6220:     path.projection = function(x) {
6222:       return path;
6224:     path.pointRadius = function(x) {
6227:         pointCircle = d3_path_circle(pointRadius);
6229:       return path;
6231:     return path;
4401:             pathUpdate.attr("d", "M" + range[0] + "," + tickEndSize + "V0H" + range[1] + "V" + tickEndSize);
4414:             pathUpdate.attr("d", "M" + range[0] + "," + -tickEndSize + "V0H" + range[1] + "V" + -tickEndSize);
4427:             pathUpdate.attr("d", "M" + -tickEndSize + "," + range[0] + "H0V" + range[1] + "H" + -tickEndSize);
4440:             pathUpdate.attr("d", "M" + tickEndSize + "," + range[0] + "H0V" + range[1] + "H" + tickEndSize);
4923:       var paths = [], i = -1, n = links.length;
4924:       while (++i < n) paths.push(d3_layout_bundlePath(links[i]));
4925:       return paths;
6083:       pathType(d);
6112:     var pathType = d3_geo_type({
6115:         while (++i < n) buffer.push(pathType(features[i].geometry));
6118:         pathType(o.geometry);
6175:         while (++i < n) buffer.push(pathType(geometries[i]));
HiCBricks:R/Brick_functions.R: [ ]
2002:     Path <- Create_Path(c(Root.folders['matrices'],chr,chr))
498:         Bintable.group.path <- Create_Path(
1361:     Group.path <- Create_Path(c(Reference.object$hdf.matrices.root,chr1,chr2))
1456:     Group.path <- Create_Path(c(Reference.object$hdf.matrices.root,chr,chr))
2522:     Group.path <- Create_Path(c(Reference.object$hdf.matrices.root,
2585:     Group_path <- Create_Path(c(Reference_object$hdf.matrices.root, 
2678:     Group.path <- Create_Path(c(Reference.object$hdf.matrices.root, chr1,
205:     Config_filepath <- .make_configuration_path(output_directory)
895:     Brick_filepath <- BrickContainer_get_path_to_file(Brick,
964:     Brick_filepath <- BrickContainer_get_path_to_file(Brick, 
1339:     Brick_filepath <- BrickContainer_get_path_to_file(Brick, 
1434:     Brick_filepath <- BrickContainer_get_path_to_file(Brick, 
1849:     Brick_filepath <- BrickContainer_get_path_to_file(Brick = Brick, 
2034:     Brick_filepath <- BrickContainer_get_path_to_file(Brick = Brick, 
2524:     Brick_filepath <- BrickContainer_get_path_to_file(Brick = Brick, 
2587:     Brick_filepath <- BrickContainer_get_path_to_file(Brick = Brick, 
2676:     Brick_filepath <- BrickContainer_get_path_to_file(Brick = Brick, 
703:     Brick_paths <- BrickContainer_get_path_to_file(Brick = Brick,
760:     Brick_filepaths <- BrickContainer_list_files(Brick = Brick, 
812:     Brick_filepaths <- BrickContainer_get_path_to_file(Brick,
18: #' A string containing the path to the file to load as the binning table for
141: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
143: #' out_dir <- file.path(tempdir(), "Creator_test")
145: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
178:             "without an explicit path", "definition!", "If you want to create",
180:             "please provide", "the complete path. Or, you can",
182:             paste("file.path(getwd())", sep = ""), 
300: #' the function will provide the path to the created/tracked HDF file.
306: #' out_dir <- file.path(tempdir(),"mcool_test_dir")
307: #' dir.create(path = out_dir)
311: #' destfile = file.path(out_dir,"H1-hESC-HiC-4DNFI7JNCNFB.mcool"))
313: #' mcool <- file.path(out_dir,"H1-hESC-HiC-4DNFI7JNCNFB.mcool")
332:         stop("mcool must be provided as mcool= /path/to/something")
339:         mcool.version <- GetAttributes(Path = Create_Path(
355:         mcool.version <- GetAttributes(Path = NULL, File=mcool, 
391: #' out_dir <- file.path(tempdir(),"mcool_test_dir")
392: #' dir.create(path = out_dir)
397: #' destfile = file.path(out_dir,"H1-hESC-HiC-4DNFI7JNCNFB.mcool"))
399: #' mcool <- file.path(out_dir,"H1-hESC-HiC-4DNFI7JNCNFB.mcool")
452: #' out_dir <- file.path(tempdir(), "mcool_test_dir")
453: #' dir.create(path = out_dir)
457: #' destfile = file.path(out_dir, "H1-hESC-HiC-4DNFI7JNCNFB.mcool"))
459: #' mcool <- file.path(out_dir, "H1-hESC-HiC-4DNFI7JNCNFB.mcool")
476:     mcool.version <- GetAttributes(Path = NULL, File=mcool,
502:         Bintable.group.path <- Create_Path(Bintable.group)
504:     Handler <- ._Brick_Get_Something_(Group.path = Bintable.group.path,
517: #' A string specifying the path to the Brick store created with 
534: #' Bintable_path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
537: #' out_dir <- file.path(tempdir(), "HiCBricks_chrominfo_test")
541: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable_path, 
670: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
673: #' out_dir <- file.path(tempdir(), "add_ranges_test")
677: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
709:     bplapply(Brick_paths, function(Brick_path){
710:         ._Brick_Add_Ranges_(Brick = Brick_path,
711:         Group.path = Create_Path(c(Reference.object$hdf.ranges.root,
739: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
742: #' out_dir <- file.path(tempdir(), "list_matrices_test")
746: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
766:             Path = Create_Path(
794: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
797: #' out_dir <- file.path(tempdir(), "list_rangekeys_test")
801: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
815:         Group.path = Create_Path(Reference.object$hdf.ranges.root),
836: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
839: #' out_dir <- file.path(tempdir(), "list_rangekeys_exists_test")
843: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
876: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
879: #' out_dir <- file.path(tempdir(), "list_ranges_mcols_test")
883: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
936: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
939: #' out_dir <- file.path(tempdir(), "list_get_ranges_test")
943: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
971:         chromosomes <- ._Brick_Get_Something_(Group.path = Create_Path(
980:             Group.path = Create_Path(
985:         Lengths <- ._Brick_Get_Something_(Group.path = Create_Path(
995:     Dataset <- ._Brick_Get_Something_(Group.path = Create_Path(
1020:                     Group.path = Create_Path(
1038:                     Group.path = Create_Path(c(
1071: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
1074: #' out_dir <- file.path(tempdir(), "list_get_bintable_test")
1077: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
1134: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
1137: #' out_dir <- file.path(tempdir(), "fetch_range_index_test")
1140: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
1232: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"),
1235: #' out_dir <- file.path(tempdir(), "region_position_test")
1238: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
1303: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
1306: #' out_dir <- file.path(tempdir(), "matrix_load_test")
1309: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
1314: #' Matrix_file <- system.file(file.path("extdata", 
1367:         Matrix.file = matrix_file, delim = delim, Group.path = Group.path, 
1400: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
1403: #' out_dir <- file.path(tempdir(), "matrix_load_dist_test")
1406: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
1411: #' Matrix_file <- system.file(file.path("extdata", 
1462:         Matrix.file = matrix_file, delim = delim, Group.path = Group.path,
1481: #' @param mcool \strong{Required}. Path to an mcool file.
1504: #' out_dir <- file.path(tempdir(),"mcool_load_test")
1505: #' dir.create(path = out_dir)
1509: #' destfile = file.path(out_dir,"H1-hESC-HiC-4DNFI7JNCNFB.mcool"))
1511: #' mcool <- file.path(out_dir,"H1-hESC-HiC-4DNFI7JNCNFB.mcool")
1568:     RetVar <- .process_mcool(Brick = Brick, mcool_path = mcool, 
1585: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
1588: #' out_dir <- file.path(tempdir(), "matrix_isdone_test")
1591: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
1596: #' Matrix_file <- system.file(file.path("extdata", 
1629: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
1632: #' out_dir <- file.path(tempdir(), "matrix_issparse_test")
1635: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
1640: #' Matrix_file <- system.file(file.path("extdata", 
1681: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
1684: #' out_dir <- file.path(tempdir(), "matrix_maxdist_test")
1687: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
1692: #' Matrix_file <- system.file(file.path("extdata", 
1736: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
1739: #' out_dir <- file.path(tempdir(), "matrix_exists_test")
1742: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
1747: #' Matrix_file <- system.file(file.path("extdata", 
1775: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
1778: #' out_dir <- file.path(tempdir(), "matrix_minmax_test")
1781: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
1786: #' Matrix_file <- system.file(file.path("extdata", 
1821: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
1824: #' out_dir <- file.path(tempdir(), "matrix_dimension_test")
1827: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
1832: #' Matrix_file <- system.file(file.path("extdata", 
1851:     Extents <- ._GetDimensions(group.path = Create_Path(
1853:         dataset.path = Reference.object$hdf.matrix.name,
1870: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
1873: #' out_dir <- file.path(tempdir(), "matrix_filename_test")
1876: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
1881: #' Matrix_file <- system.file(file.path("extdata", 
1936: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
1939: #' out_dir <- file.path(tempdir(), "val_by_dist_test")
1942: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
1947: #' Matrix_file <- system.file(file.path("extdata", 
2040:         diag(._Brick_Get_Something_(Group.path = Path, Brick = Brick_filepath,
2087: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
2090: #' out_dir <- file.path(tempdir(), "get_matrix_coords_test")
2093: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
2098: #' Matrix_file <- system.file(file.path("extdata", 
2200: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
2203: #' out_dir <- file.path(tempdir(), "get_matrix_test")
2206: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
2211: #' Matrix_file <- system.file(file.path("extdata", 
2309: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
2312: #' out_dir <- file.path(tempdir(), "get_row_vector_test")
2315: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
2320: #' Matrix_file <- system.file(file.path("extdata", 
2463: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
2466: #' out_dir <- file.path(tempdir(), "get_vector_val_test")
2472: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
2477: #' Matrix_file <- system.file(file.path("extdata", 
2526:     Vector <- ._Brick_Get_Something_(Group.path = Group.path, 
2550: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
2553: #' out_dir <- file.path(tempdir(), "get_vector_val_test")
2558: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
2563: #' Matrix_file <- system.file(file.path("extdata", 
2589:     dataset_handle <- ._Brick_Get_Something_(Group.path = Group_path, 
2625: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
2628: #' out_dir <- file.path(tempdir(), "get_matrix_mcols_test")
2631: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
2636: #' Matrix_file <- system.file(file.path("extdata", 
2680:     Vector <- ._Brick_Get_Something_(Group.path = Group.path, 
2694: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
2697: #' out_dir <- file.path(tempdir(), "list_matrix_mcols_test")
2700: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
2717: #' BrickContainer, a string of length 1 as resolution and a path specifying
2724: #' @param out_file Path to the output file to write.
2735: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
2738: #' out_dir <- file.path(tempdir(), "write_file")
2741: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
2746: #' Matrix_file <- system.file(file.path("extdata", 
2755: #' out_file = file.path(out_dir, "example_out.txt"), 
2768:         stop(out_file, " already exists at path")
2820: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
2823: #' out_dir <- file.path(tempdir(), "get_vector_val_test")
2828: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
2833: #' Matrix_file <- system.file(file.path("extdata", 
2870: #' @param table_file Path to the file that will be loaded
2887: #' Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"), 
2890: #' out_dir <- file.path(tempdir(), "get_vector_val_test")
2895: #' My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path, 
2900: #' Matrix_file <- system.file(file.path("extdata", 
2909: #' out_file = file.path(out_dir, "example_out.txt"), 
2914: #' table_file = file.path(out_dir, "example_out.txt"), 
188:     output_directory <- normalizePath(output_directory)
219:     if(file.exists(Config_filepath)){
223:         Container <- load_BrickContainer(Config_filepath)
282:         Config_filepath)
283:     .write_configuration_file(Container, Config_filepath)
907:     mcol.df <- .prepare_ranges_metadata_mcols(Brick = Brick_filepath, 
973:         Brick = Brick_filepath,
982:             Brick = Brick_filepath,
987:         Brick = Brick_filepath,
997:         Brick = Brick_filepath, 
1022:                 Brick = Brick_filepath, Name = FUN_name, Start = m.start, 
1040:                         rangekey)), Brick = Brick_filepath,
1341:     if(length(Brick_filepath) == 0){
1366:     RetVar <- ._ProcessMatrix_(Brick = Brick_filepath, 
1436:     if(length(Brick_filepath) == 0){
1461:     RetVar <- ._Process_matrix_by_distance(Brick = Brick_filepath,
1854:         File = Brick_filepath, return.what = "size")
2527:         Brick = Brick_filepath, Name = Reference.object$hdf.matrix.name, 
2590:         Brick = Brick_filepath, Name = Reference_object$hdf.matrix.name, 
2681:         Brick = Brick_filepath, Name = what, return.what = "data")
2781:             Brick_filepath = a_row$filepath,
763:     chr1.list <- lapply(seq_len(nrow(Brick_filepaths)), function(i){
764:         Row <- Brick_filepaths[i,]
770:             File = Row$filepaths,
816:         Brick = Brick_filepaths[1], return.what = "group_handle")
oligoClasses:R/methods-GenomeAnnotatedDataFrame.R: [ ]
259:   path <- system.file("extdata", package=pkgname)
260:   if(path=="") stop("Are you sure ", pkgname, " is installed?")
262:   snpBuilds <- list.files(path, pattern="snpProbes_")
savR:R/savR-methods.R: [ ]
270:   path <- location(project)
373:   path <- getInterOpFilePath(project, format)
571:   path <- normalizePath(paste(project@location, "InterOp", format@filename, sep="/"))
611:   path <- getInterOpFilePath(project,format)
519:     filePath <- suppressWarnings(normalizePath(paste(project@location, "InterOp", format@filename, sep="/") ))
585: getInterOpFilePath <- function(project, format) {
271:   if (!file.exists(path))
272:     stop(paste("Project", path, "does not exist."))
285:   path <- normalizePath(paste(reports, "Intensity", sep="/"))
289:         Cairo::Cairo(file=paste(path, "/Chart_", cycle, "_", tolower(base), ".png", sep=""), width=300, height=800, dpi=72, type="png", ...(11 bytes skipped)...
304:   path <- normalizePath(paste(reports, "NumGT30", sep="/"))
307:       Cairo::Cairo(file=paste(path, "/Chart_", cycle, ".png", sep=""), width=300, height=800, dpi=72, type="png", bg="white")
323:   path <- normalizePath(paste(reports, "ByCycle", sep="/"))
326:       Cairo::Cairo(file=paste(path, "/QScore_L", lane, ".png", sep=""), width=800, height=400, dpi=72, type="png", bg="white")
341:   path <- normalizePath(paste(reports, "FWHM", sep="/"))
345:         Cairo::Cairo(file=paste(path, "/Chart_", cycle, "_", tolower(base), ".png", sep=""), width=300, height=800, dpi=72, type="png", ...(11 bytes skipped)...
374:   fh <- file(path, "rb")
572:   fh <- file(path, "rb")
612:   fh <- file(path, "rb")
7:   retval <- new("savProject", location=normalizePath(object))
10:   ri <- normalizePath(paste(object, "RunInfo.xml", sep="/"))
273:   reports <- normalizePath(destination, mustWork=F)
521:     if (file.exists(filePath)) {
586:   return(normalizePath(paste(project@location, "InterOp", format@filename, sep="/")))
12:   retval@runid <- XML::xmlAttrs(XML::xpathApply(runinfo, "/RunInfo/Run")[[1]])["Id"]
13:   retval@number <- as.integer(XML::xmlAttrs(xpathApply(runinfo, "/RunInfo/Run")[[1]])["Number"])
14:   retval@flowcell <- XML::xmlValue(XML::xpathApply(runinfo, "/RunInfo/Run/Flowcell")[[1]])
15:   retval@instrument <- XML::xmlValue(XML::xpathApply(runinfo, "/RunInfo/Run/Instrument")[[1]])
16:   retval@date <- XML::xmlValue(XML::xpathApply(runinfo, "/RunInfo/Run/Date")[[1]])
18:   for (x in XML::xpathApply(runinfo, "/RunInfo/Run/Reads/Read")) {
30:   layout <- XML::xpathApply(runinfo, "/RunInfo/Run/FlowcellLayout")[[1]]
flowGraph:R/04_flowgraph_plots.R: [ ]
1574:                         path <- paste0(
1536:             plot_path_ <- paste0(
2: #' @description Creates a cell hierarchy plot given a flowGraph object. If a path is not provided for \code{fg_plot} to save the plot, please use \code{plot_gr} to view plot given t...(28 bytes skipped)...
89: #' @param path A string indicating the path to where the function should save
104: #'  the plot by filling out the \code{path} parameter with a full path to the
117: #'    path=NULL) # set path to a full path to save plot as a PNG
142:     path=NULL, width=9, height=9
279:         if (!is.null(path) & !interactive)
281:                 grepl("[.]png$",path, ignore.case=TRUE),
282:                 path, paste0(path, ".png")),
285:         if (!is.null(path) & interactive & !visNet_plot)
287:                 gp, ifelse(grepl("[.]html$",path, ignore.case=TRUE),
288:                            path, paste0(path, ".html")))
289:         if (!is.null(path) & interactive & visNet_plot)
291:                 gp, file=ifelse(grepl("[.]html$",path, ignore.case=TRUE),
292:                                 path, paste0(path, ".html")),
295:     if (is.null(path)) message("use function plot_gr to plot fg_plot output")
407: #'    path=NULL) # set path to a full path to save plot as a PNG
719: #' @param path A string indicating the path to where the function should save
754:     main=NULL, interactive=FALSE, path=NULL
822:             if (!is.null(path))
824:                     qp, ifelse(grepl("[.]html$",path, ignore.case=TRUE),
825:                                path, paste0(path, ".html")))
829:         if (!is.null(path))
832:                     ifelse(grepl("[.]png$",path, ignore.case=TRUE),
833:                            path, paste0(path, ".png")),
903: #' @param path A string indicating the path to where the function should save
940:     main=NULL, path=NULL
1031:     if (!is.null(path))
1033:             ifelse(grepl("[.]png$",path, ignore.case=TRUE),
1034:                    path, paste0(path, ".png")),
1051:     main=NULL, path=NULL
1063:             main=main, path=path,
1202:     if (!is.null(path)) {
1205:                 "[.]png$",path, ignore.case=TRUE),
1206:                 path, paste0(path, ".png")),
1281: #' @param path A string indicating the path to where the function should save
1316:     main=NULL, interactive=FALSE, path=NULL
1386:         if (!is.null(path))
1389:                     "[.]png$",path, ignore.case=TRUE),
1390:                     path, paste0(path, ".png")), plot=gp)
1426:         if (!is.null(path))
1428:                 gp, ifelse(grepl("[.]html$", path, ignore.case=TRUE),
1429:                            path, paste0(path, ".html")))
1443: #' @param plot_path A string indicating the folder path to where the function
1520:     fg, plot_path, plot_types="node", interactive=FALSE,
1537:                 plot_path, "/", type, "/", paste0(sm, collapse="_"))
1538:             while (dir.exists(plot_path_) & !overwrite)
1539:                 plot_path_ <- paste0(plot_path_,"_")
1540:             dir.create(plot_path_, recursive=TRUE, showWarnings=FALSE)
1551:                     path=paste0(plot_path_, "/pVSdifference.png"))
1567:                     rdir_ <- paste0(plot_path_, "/boxplots")
1580:                             path=path, paired=paired,
1595:                     path=paste0(plot_path_,"/qq.png"),
1605:                         path=paste0(plot_path_,"/cell_hierarchy.png"),
1628:                             paste0(plot_path_,"/cell_hierarchy_",
crlmm:R/cnrma-functions.R: [ ]
42: 	path <- system.file("extdata", package=pkgname)
1391: 	path <- system.file("extdata", package=pkgname)
43: 	##multiple.builds <- length(grep("hg19", list.files(path)) > 0)
44: 	snp.file <- list.files(path, pattern="snpProbes_hg")
47: 		snp.file <- list.files(path, pattern="snpProbes.rda")
51: 			snp.file <- list.files(path, pattern="snpProbes_hg")
61: ##		load(file.path(path, "snpProbes.rda"))
62: ##	} else load(file.path(path, paste("snpProbes_", genome, ".rda", sep="")))
63: 	load(file.path(path, snp.file))
71: 		load(file.path(path, cn.file))
73: 		##			load(file.path(path, "cnProbes.rda"))
74: 		##		} else load(file.path(path, paste("cnProbes_", genome, ".rda", sep="")))
1392: 	load(file.path(path, "cnProbes.rda"))
1393: 	load(file.path(path, "snpProbes.rda"))
1465: 				   path,
1468: 	load(file.path(path, "snpFile.rda"))
1470: 	load(file.path(path, "cnFile.rda"))
ORFik:R/experiment.R: [ ]
298:   for (path in filepaths) {
45:       cbu.path <- "/export/valenfs/data/processed_data/experiment_tables_for_R/"
242:     cbu.path <- "/export/valenfs/data/processed_data/experiment_tables_for_R/"
840:     save_path <- file.path(out_dir, paste0(name, ".ofst"))
976:     cbu.path <- "/export/valenfs/data/processed_data/experiment_tables_for_R/"
289: findFromPath <- function(filepaths, candidates, slot = "auto") {
513: filepath <- function(df, type, basename = FALSE) {
517:   paths <- lapply(df$filepath, function(x, df, type) {
656:       paths <- filepath(df, type)
838:     specific_paths <- filepaths[libs[[name]]]
370:     reversePaths <- df$reverse[!(df$reverse %in% c("", "paired-end"))]
836:   filepaths <- filepath(df, type)
7: #' @param file relative path to a ORFik experiment. That is a .csv file following
10: #' also be full path to file, then in.dir argument is ignored.
14: #' Does not apply if file argument is not a path (can also be a data.frame).
15: #' Also does not apply if file argument was given as full path.
31: #' # save.experiment(df, file = "path/to/save/experiment")
33: #' # read.experiment("path/to/save/experiment")
35: #' # read.experiment("experiment", in.dir = "path/to/save/")
46:       if (file.exists(pasteDir(cbu.path, basename(file))))
47:         file <- pasteDir(cbu.path, basename(file))
111: #' @param txdb A path to TxDb (prefered) or gff/gtf (not adviced, slower)
113: #' @param fa A path to fasta genome/sequences used for libraries, remember the
180: #' # Save with: save.experiment(df, file = "path/to/save/experiment.csv")
243:     if (dir.exists(cbu.path)) { # This will only trigger on CBU server @ UIB
245:       message(cbu.path)
246:       saveDir <- cbu.path
265: #' #save.experiment(df, file = "path/to/save/experiment.csv")
267: #' #save.experiment(df, file = "path/to/save/experiment")
282: #' @param filepaths path to all files
299:     hit <- names(unlist(sapply(candidates, grep, x = path)))
302:     hitRel <- names(unlist(sapply(candidates, grep, x = gsub(".*/", "", path))))
805: #' @param out_dir Ouput directory, default \code{file.path(dirname(df$filepath[1]), "ofst_merged")},
819: #' #fimport(file.path(tempdir(), "all.ofst"))
821: #' #read_fst(file.path(tempdir(), "all.ofst"))
824: mergeLibs <- function(df, out_dir = file.path(dirname(df$filepath[1]), "ofst_merged"), mode = "all",
841:     write_fst(ofst_merge(specific_paths, specific_names, keep_all_scores), save_path)
891:       fext[compressed] <-file_ext(file_path_sans_ext(files[compressed],
965: #' ## Path above is default path, so no dir argument needed
969: #' #list.experiments(dir = "MY/CUSTOM/PATH)
974:   experiments <- list.files(path = dir, pattern = "\\.csv")
977:     if (dir.exists(cbu.path)) { # If on UIB SERVER
978:       dir <- cbu.path
979:       experiments <- list.files(path = dir, pattern = "\\.csv")
25: #' df <- read.experiment(filepath) # <- valid ORFik .csv file
209:     df[4,] <- c("libtype", "stage", "rep", "condition", "fraction","filepath",
216:     df[4,] <- c("libtype", "stage", "rep", "condition", "fraction","filepath")
219:   # set file paths
222:   df[5:(5+length(files)-1), 1] <- findFromPath(files, libNames(), libtype)
225:   df[5:(5+length(files)-1), 2] <- findFromPath(files, stages, stage)
227:   df[5:(5+length(files)-1), 3] <- findFromPath(files, repNames(), rep)
229:   df[5:(5+length(files)-1), 4] <- findFromPath(files, conditionNames(), condition)
231:   df[5:(5+length(files)-1), 5] <- findFromPath(files, fractionNames(), fraction)
367:   files <- df$filepath
368:   if (length(df$filepath) == 0) stop("df have no filepaths!")
438: #' Get variable name per filepath in experiment
500: #' Get relative paths instead of full. Only use for inspection!
501: #' @return a character vector of paths, or a list of character with 2 paths per,
508: #' filepath(df, "default")
510: #' # filepath(df, "bedo")
512: #' # filepath(df, "pshifted")
518:     i <- which(df$filepath == x)
521:       out.dir <- paste0(dirname(df$filepath[1]), "/pshifted/")
551:       out.dir <- paste0(dirname(df$filepath[1]), "/",type,"/")
567:     if (is.null(input)) stop("filepath type not valid!")
571:   if (all(lengths(paths) == 1)) {
572:     paths <- unlist(paths)
574:   return(paths)
657:       libs <- bplapply(seq_along(paths),
658:                        function(i, paths, df, chrStyle, param, strandMode, varNames, verbose) {
660:         fimport(paths[i], chrStyle, param, strandMode)
661:       }, paths = paths, chrStyle = chrStyle, df = df,
703: #' dirname(df$filepath[1]),
731:                        out.dir = dirname(df$filepath[1]),
773:                        remove.file_ext(df$filepath[i], basename = TRUE),
286: #' else must be a character vector of length 1 or equal length as filepaths.
291:     if(length(slot) != 1 & length(slot) != length(filepaths)) {
371:     files <- c(files, reversePaths)
390:     stop("Duplicated filepaths in experiment!")
490: #' Get filepaths to ORFik experiment
494: #' default filepaths without warning. \cr
cTRAP:R/shinyInterface.R: [ ]
475:                 if (is.function(path)) path <- path()
418:                                         path=".", globalUI=FALSE) {
476:                 ENCODEsamples <- loadENCODEsamples(ENCODEmetadata, path=path)
1194:     inputFile  <- file.path(token, sprintf("input_%s.Rda",  rand))
1195:     outputFile <- file.path(token, sprintf("output_%s.rds", rand))
1380: .predictTargetingDrugsServer <- function(id, x, path=".", globalUI=FALSE,
1405:                 corMatrix, path=path)
1469: .drugSetEnrichmentAnalyserServer <- function(id, x, path=NULL) {
1492:                                            path=path)
1665:                                  file="ENCODEmetadata.rds", path=".") {
1670:         .diffExprENCODEloaderServer(id, metadata, cellLine, gene, path=path)
peakPantheR:R/methods_peakPantheRAnnotation.R: [ ]
1724:             device = "png", path = saveFolder, dpi = 100, width = 21,
1853:     path_cpdMeta <- paste(saveFolder, "/", annotationName,
1871:     path_specMeta <- paste(saveFolder, "/", annotationName,
1883:         path_var <- paste(saveFolder, "/", annotationName, "_", i, ".csv",
1918:     path_summary <- paste(saveFolder, "/", annotationName, "_summary.csv",
1116:     .filepath <- x@filepath[i]
1863:     tmp_filepath <- filepath(object)
2045:     .spectraPaths <- resSpectra$spectraPaths
2182: resetAnnot_spectraPathMetadata <- function(previousAnnotation, spectraPaths,
2186:         .spectraPaths <- filepath(previousAnnotation)
1076:     return(tools::file_path_sans_ext(basename(object@filepath)))
1386: #' @param saveFolder (str) Path of folder where annotationParameters_summary.csv
1399: #' spectraPaths <- c('./path/file1', './path/file2', './path/file3')
1610: #' @param saveFolder (str) Path of folder where annotationParameters_summary.csv
1703:     # @param saveFolder (str) Path where plots will be saved
1727:         # output path
1758: #' @param saveFolder (str) Path of folder where the annotation result csv will
1855:     utils::write.csv(tmp_outCpdMeta, file = path_cpdMeta, row.names = FALSE,
1858:     if (verbose) { message("Compound metadata saved at ", path_cpdMeta) }
1873:     utils::write.csv(tmp_outSpecMeta, file = path_specMeta, row.names = FALSE,
1876:     if (verbose) { message("Spectra metadata saved at ", path_specMeta) }
1885:         utils::write.csv(tmp_var, file = path_var, row.names = TRUE,
1889:             message("Peak measurement \"", i, "\" saved at ", path_var)
1920:     utils::write.csv(tmp_summary, file = path_summary, row.names = TRUE,
1923:     if (verbose) { message("Summary saved at ", path_summary) }
24:             length(object@filepath), " samples. \n", sep = "")
53: # @filepath length. Slot type is not checked as \code{setClass} enforces it.
78: #' # Paths to spectra files
119: #' # Paths to spectra files
160: #' # Paths to spectra files
206: #' # Paths to spectra files
253: #' # Paths to spectra files
286: # filepath
287: setGeneric("filepath", function(object, ...) standardGeneric("filepath"))
288: #' filepath accessor
290: #' @return (str) A character vector of file paths, of length number of spectra
293: #' @aliases filepath
300: #' # Paths to spectra files
319: #' filepath(annotation)
324: setMethod("filepath", "peakPantheRAnnotation", function(object) {
325:     object@filepath
343: #' # Paths to spectra files
386: #' # Paths to spectra files
430: #' # Paths to spectra files
472: #' # Paths to spectra files
512: #' # Paths to spectra files
552: #' # Paths to spectra files
593: #' # Paths to spectra files
636: #' # Paths to spectra files
695: #' # Paths to spectra files
742: #' # Paths to spectra files
788: #' # Paths to spectra files
817: #' nbSamples accessor established on filepath
828: #' # Paths to spectra files
852:     return(length(object@filepath))
868: #' # Paths to spectra files
913: #' # Paths to spectra files
946:     nbSample <- length(object@filepath)
953:         rownames(tmpAnnotation) <- object@filepath
961:         rownames(tmpAnnotation) <- object@filepath
977:     rownames(tmpAnnotation) <- object@filepath
1000: #' # Paths to spectra files
1041: #' filename accessor by spliting filepath
1052: #' # Paths to spectra files
1134:         FIR = .FIR, uROI = .uROI, filepath = .filepath,
1214: #' # Paths to spectra files
1398: #' # Paths to spectra files
1416: #' savePath        <- tempdir()
1419: #' outputAnnotationParamsCSV(emptyAnnotation, saveFolder=savePath, verbose=TRUE)
1488: #' # Paths to spectra files
1627: #' # Paths to spectra files
1652: #' savePath1       <- tempdir()
1653: #' outputAnnotationDiagnostic(annotation, saveFolder=savePath1, savePlots=FALSE,
1771: #' # Paths to spectra files
1796: #' savePath1       <- tempdir()
1797: #' outputAnnotationResult(annotation, saveFolder=savePath1,
1867:     tmp_outSpecMeta <- data.frame(filepath = tmp_filepath,
1941: #' the slots (\code{filepath} (from \code{spectraPaths}), \code{ROI},
1947: #' @param spectraPaths NULL or a character vector of spectra file paths, to set
1972: #' (\code{cpdID}, \code{cpdName}, \code{ROI}, \code{filepath}, \code{TIC},
1984: #' # Paths to spectra files
2188:             message("  Previous \"filepath\" value kept")
2415: #' # Paths to spectra files
80: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
95: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
121: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
136: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
162: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
177: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
208: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
223: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
255: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
270: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
302: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
317: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
345: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
360: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
388: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
403: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
432: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
447: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
474: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
489: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
514: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
529: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
554: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
569: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
595: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
610: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
638: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
653: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
697: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
712: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
744: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
759: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
790: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
805: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
830: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
845: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
870: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
885: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
915: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
930: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
1002: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
1017: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
1054: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
1069: #' annotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
1216: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
1231: #' emptyAnnotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
1412: #' emptyAnnotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
1490: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
1505: #' emptyAnnotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
1629: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
1644: #' emptyAnnotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
1773: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
1788: #' emptyAnnotation <- peakPantheRAnnotation(spectraPaths=spectraPaths,
1931:     function(previousAnnotation, spectraPaths = NULL, targetFeatTable = NULL,
1939: #' \code{spectraPaths}) or compounds (\code{targetFeatTable}) are passed, the
1986: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
2000: #' smallAnnotation  <- peakPantheRAnnotation(spectraPaths=spectraPaths, 
2011: #' newSpectraPaths  <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
2015: #'                                     spectraPaths=newSpectraPaths,
2026:     function(previousAnnotation, spectraPaths, targetFeatTable, uROI, FIR,
2042:     # spectraPaths, spectraMetadata
2043:     resSpectra <- resetAnnot_spectraPathMetadata(previousAnnotation,
2044:                                         spectraPaths, spectraMetadata, verbose)
2061:     # Create new object In all case (old or new value) spectraPaths and
2063:     peakPantheRAnnotation(spectraPaths = .spectraPaths,
2181: # resetAnnotation spectraPaths, spectraMetadata
2185:     if (all(is.null(spectraPaths))) {
2208:         .spectraPaths <- spectraPaths
2210:             message("  New \"spectraPaths\" value set")
2229:     return(list(spectraPaths = .spectraPaths,
2417: #' spectraPaths <- c(system.file('cdf/KO/ko15.CDF', package = 'faahKO'),
2431: #' smallAnnotation  <- peakPantheRAnnotation(spectraPaths=spectraPaths,
VarCon:inst/extdata/app.R: [ ]
235:   path <- reactiveValues(
240:   path2 <- reactiveValues(
244:   path3 <- reactiveValues(
24:   uploadReferenceDNA <- eventReactive(path$pth,{
26:     testFASTA <- strsplit(path$pth,"\\.")[[1]]
28:       referenceDnaStringSet2 <- readDNAStringSet(path$pth, format="fasta",use.names=TRUE)
34:       load(path$pth)
42:   uploadTranscriptTable <- eventReactive(path3$pth3,{
45:     testCSV <- strsplit(path3$pth3,"\\.")[[1]]
47:       transCoord <- read.csv(path3$pth3, sep=";")
48:     }else{ transCoord <- readRDS(path3$pth3)}
78:     gene2transcript <- read.csv(path2$pth2, sep=";", stringsAsFactors=FALSE)
99:     gene2transcript <- read.csv(path2$pth2, sep=";", stringsAsFactors=FALSE)
126:     gene2transcript <- read.csv(path2$pth2, sep=";", stringsAsFactors=FALSE)
145:     gene2transcript <- read.csv(path2$pth2, sep=";", stringsAsFactors=FALSE)
176:     gene2transcript <- read.csv(path2$pth2, sep=";", stringsAsFactors=FALSE)
205:     gene2transcript <- read.csv(path2$pth2, sep=";", stringsAsFactors=FALSE)
251:     path$pth <- file.choose()
255:     path2$pth2 <- file.choose()
259:     path3$pth3 <- file.choose()
234:   ## Define reactive paths
monocle:R/order_cells.R: [ ]
1724:   path <- shortest_paths(g, from = starting_cell, end_cells)
90:     path_vertex <- as.vector(get.all.shortest.paths(net, from = 1, to = i, mode="out")$res[[1]])
412:   FF_path <- unlist(get.shortest.paths(new_subtree, from=as.vector(first_fwd), to=as.vector(last_fwd), mode="out", output="vpath")$vpath)
413:   FR_path <- unlist(get.shortest.paths(new_subtree, from=as.vector(first_fwd), to=as.vector(last_rev), mode="out", output="vpath")$vpath)
414:   RF_path <- unlist(get.shortest.paths(new_subtree, from=as.vector(first_rev), to=as.vector(last_fwd), mode="out", output="vpath")$vpath)
415:   RR_path <- unlist(get.shortest.paths(new_subtree, from=as.vector(first_rev), to=as.vector(last_rev), mode="out", output="vpath")$vpath)
433:   path_weights <- c(FF_weight, FR_weight, RF_weight, RR_weight)
435:   opt_path <- paths[[opt_path_idx]]
459: measure_diameter_path <- function(pq_tree, curr_node, path_lengths)
1741:     path_cells <- names(traverse_res$shortest_path[[1]])
432:   paths <- list(FF_path, FR_path, RF_path, RR_path)
174:   first_diam_path_node_idx <- head(as.vector(diam), n=1)
175:   last_diam_path_node_idx <- tail(as.vector(diam), n=1)
189:     diam_path_names <- V(mst)[as.vector(diam)]$name
434:   opt_path_idx <- head((which(path_weights == min(path_weights))), 1)
91:     pd_subset <- subset(pd, State %in% path_vertex & is.na(scale_pseudotime))
94:     # print(path_vertex)
137: #' @param use_weights Whether to use edge weights when finding the diameter path of the tree.
138: #' @param root_node The name of the root node to use for starting the path finding.
169:   V(new_subtree)[root_node_id]$diam_path_len = length(diam)
177:       (igraph::degree(mst, first_diam_path_node_idx) == 1 &&
178:        igraph::degree(mst, last_diam_path_node_idx) == 1))
186:     #diam_path_vertex_names <- as.vector()
190:     last_bb_point_idx <- which(diam_path_names == last_bb_point)[1]
191:     first_bb_point_idx <- which(diam_path_names == first_bb_point)[1]
243: ...(48 bytes skipped)...x(V(sub_pq$subtree)[v]$name, type=V(sub_pq$subtree)[v]$type, color=V(sub_pq$subtree)[v]$color, diam_path_len=V(sub_pq$subtree)[v]$diam_path_len)
364:   #print ("opt_path:")
417:   # print (FF_path)
418:   # print (FR_path)
419:   # print (RF_path)
420:   # print (RR_path)
422:   FF_weight <- sum(E(new_subtree, path=FF_path)$weight)
423:   FR_weight <- sum(E(new_subtree, path=FR_path)$weight)
424:   RF_weight <- sum(E(new_subtree, path=RF_path)$weight)
425:   RR_weight <- sum(E(new_subtree, path=RR_path)$weight)
437:   # print ("opt_path:")
438:   # print (opt_path)
441:   stopifnot (length(opt_path) == length(q_level_list))
443:   directions <- V(new_subtree)[opt_path]$type
455:   return(list(ql=q_levels, wt=min(path_weights)))
465:     path_lengths[curr_node] = 0
466:     return(path_lengths)
484:     path_lengths[curr_node] = children_count
553: #' @param reverse_main_path Whether to reverse the direction of the trajectory
556: ...(8 bytes skipped)...good_branched_ordering <- function(orig_pq_tree, curr_node, dist_matrix, num_branches, reverse_main_path=FALSE)
574:   branch_node_counts <- V(pq_tree)[type == "Q"]$diam_path_len
721: ...(34 bytes skipped)..._helper(branch_tree, curr_branch, cell_ordering_tree, branch_pseudotimes, dist_matrix, reverse_main_path)
1719: # #' @return a list of shortest path...(46 bytes skipped)...estic distance between initial cell and terminal cells and branch point passes through the shortest path
1726:   return(list(shortest_path = path$vpath, distance = distance, branch_points = intersect(branchPoints, unlist(path$vpath))))
1743:     subset_cell <- c(subset_cell, path_cells)
47: #' @importFrom igraph graph.adjacency V graph.dfs get.all.shortest.paths
140: #' @importFrom igraph graph.empty get.edgelist get.all.shortest.paths
151:     sp <- get.all.shortest.paths(mst, from=V(mst)[root_node])
377: #' @importFrom igraph V vertex edge graph.empty get.shortest.paths E
1055: #' @param num_paths the number of end-point cell states to allow in the biological process.
1065:                        num_paths = NULL,
1084:     if (is.null(num_paths)){
1085:       num_paths = 1
1102: ...(4 bytes skipped)...order_list <- extract_good_branched_ordering(res$subtree, res$root, cellPairwiseDistances(cds), num_paths, FALSE)
1118:     if (is.null(num_paths) == FALSE){
1119:       message("Warning: num_paths only valid for method 'ICA' in reduceDimension()")
1166:     if (is.null(num_paths) == FALSE){
1167:       message("Warning: num_paths only valid for method 'ICA' in reduceDimension()")
1720: #' @importFrom igraph shortest.paths shortest_paths degree
1722:   distance <- shortest.paths(g, v=starting_cell, to=end_cells)
ReactomeContentService4R:R/getContent.R: [ ]
13:   path <- "data/discover"
92:   path <- "data/eventsHierarchy"
115:   path <- "data/orthology"
151:   path <- "data/participants"
254:   path <- "data/pathways/low/entity"
324:   path <- "data/person"
364:   path <- "search/facet"
410:   path <- "data/query/enhanced"
452:   path <- "data/schema"
542:   path <- "search/query"
586:   path <- "data/species"
261:   pathways <- .retrieveData(url, as="text")
272:     top.pathways <- foreach(id=pathways$dbId, .export=c(".retrieveData", ".checkStatus"), .combine=dfcomb) %dopar% {
253: getPathways <- function(id, species=NULL, allForms=FALSE, top.level=FALSE) {
332:     authoredPathways <- .retrieveData(ap.url, as="text")
14:   url <- file.path(getOption("base.address"), path, event.id)
61:     url <- file.path(getOption("base.address"), "data/complex", id, 
64:     url <- file.path(getOption("base.address"), "data/complexes", resource, id)
66:     url <- file.path(getOption("base.address"), "data/entity", id, retrieval)
94:   url <- file.path(getOption("base.address"), path, taxon.id)
118:   url <- file.path(getOption("base.address"), path, id, "species", species.id)
154:   url <- file.path(getOption("base.address"), path, event.id) #all participants
162:     url <- file.path(url, "participatingPhysicalEntities")
164:     url <- file.path(url, "referenceEntities")
166:     # in a different path/method - /data/pathway/{id}/containedEvents
167:     url <- file.path(getOption("base.address"), "data/pathway", event.id, "containedEvents")
256:   url <- file.path(getOption("base.address"), path, id)
257:   if (allForms) url <- file.path(url, "allForms")
274:       ancestors.url <- file.path(getOption("base.address"), "data/event", id, "ancestors")
327:     url <- file.path(getOption("base.address"), path, id)
331:     ap.url <- file.path(url, "authoredPathways")
338:       tmp.url <- file.path(getOption("base.address"), path, id, attribute)
371:   url <- file.path(getOption("base.address"), path)
411:   url <- file.path(getOption("base.address"), path, id)
453:   url <- file.path(getOption("base.address"), path, class)
457:   cnt.url <- file.path(url, "count")
484:   if (minimised) url <- file.path(url, "min")
485:   if (reference) url <-file.path(url, "reference")
543:   url <- file.path(getOption("base.address"), paste0(path, "?query=", gsub("\\s", "%20", query)))
589:                 file.path(getOption("base.address"), path, "main"),
590:                 file.path(getOption("base.address"), path, "all"))
75: #' Events (Pathways and Reactions) in Reactome are organized in a hierarchical 
129: #' Data in Reactome are organized in a hierarchical manner - Pathways contain Reactions, 
136: ...(11 bytes skipped)...g{ReferenceEntities}: retrieves the ReferenceEntities for all PhysicalEntities in every constituent Pathway/Reaction
139: #' @param event.id a stable or db id of an Event (pathways and reactions)
168:     msg <- "'Events' are found in the 'hasEvent' attribute of Pathways"
234: #' Pathway related queries
238: #' @param id a stable or db id of a PhysicalEntity or Event present in the pathways
240: #' @param allForms if set to \code{TRUE}, all low level pathways that contain the given PhysicalEntity (not Event) in all forms returned
241: #' @param top.level if set to \code{TRUE}, only top-level pathways returned
242: #' @return a dataframe containing requested pathways
263:   # map to top level pathways
281:     rownames(top.pathways) <- seq(1, nrow(top.pathways))
282:     return(top.pathways)
284:     return(pathways)
330:     # add authored pathways if any
532: #' searchQuery(query="Biological oxidation", species="Mus musculus", types=c("Pathway", "Reaction"))
576: #' either manually curated or computationally inferred pathways
137: #' - \strong{EventsInPathways}: recursively retrieves all the Events contained in any given Event
140: ...(26 bytes skipped)...ipants to be retrieved, including "AllInstances", "PhysicalEntities", "ReferenceEntities", "EventsInPathways"
144: #' getParticipants("R-HSA-69306", "EventsInPathways")
150:                                                   "ReferenceEntities", "EventsInPathways")) {
165:   } else if (retrieval == "EventsInPathways") {
236: #' To get the Events that contain the given PhysicalEntity or Event (i.e. subpathway).
244: #' getPathways("R-HSA-199420", "Homo sapiens")
245: #' @rdname getPathways
277:       ancestors[ancestors$schemaClass == "TopLevelPathway",]
333:     if (length(authoredPathways) != 0) all.info[["authoredPathways"]] <- authoredPathways
SPIA:R/spia.R: [ ]
111:     path<-names(datp)[i]
62:   path.names<-NULL
51:   datpT=.myDataEnv[["path.info"]]
79:     path.names<-c(path.names,datpT[[jj]]$title)
84:   names(path.names)<-names(datpT)
86:   tor<-lapply(datp,function(d){sum(abs(d))})==0 | hasR | is.na(path.names)
88:   path.names<-path.names[!tor]
112:     M<-datp[[path]]
203:       cat(paste("Done pathway ",i," : ",substr(path.names[names(datp)[i]],1,30),"..",sep=""))
215:   Name=path.names[names(datp)]
1: spia<-function(de=NULL,all=NULL,organism="hsa",data.dir=NULL,pathids=NULL,nB=2000,plots=FALSE,verbose=TRUE,beta=NULL,combine="fisher"){
33:       cat("The KEGG pathway data for your organism is not present in the extdata folder of the SPIA package!!!")
53:   if (!is.null(pathids)){
54:     if( all(pathids%in%names(datpT))){
55:       datpT=datpT[pathids]
57:       stop( paste("pathids must be a subset of these pathway ids: ",paste(names(datpT),collapse=" "),sep=" "))
123:       KEGGLINK[i]<-paste("http://www.genome.jp/dbget-bin/show_pathway?",organism,names(datp)[i],"+",gnns,sep="")
133:         plot(X,pfs-X,main=paste("pathway ID=",names(datp)[i],sep=""),
186:           plot(density(pfstmp,bw=bwidth),cex.lab=1.2,col="black",lwd=2,main=paste("pathway ID=",names(datp)[i],"  P PERT=",round(pb[i],5),sep=""),
190:           plot(as.numeric(names(pfsTab)), as.numeric(pfsTab), cex.lab=1.2,col="black",main=paste("pathway ID=",names(datp)[i],"  P PERT=",round(pb[i],5),sep=""),
206:   }#end for each pathway
rtracklayer:R/ucsc.R: [ ]
1597:     path <- ucscURLTable[key]
364:   label_path <- "//select[@name = 'hgta_track']/option/text()"
366:   track_path <- "//select[@name = 'hgta_track']/option/@value"
365:   labels <- sub("\n.*$", "", sapply(getNodeSet(doc, label_path), xmlValue))
367:   tracks <- unlist(getNodeSet(doc, track_path))
1572:             upload <- fileUpload(path(object), "text/plain")
1598:     if (is.na(path))
1601:         path <- paste0(path, '?redirect="manual"')
1603:     paste(object@url, path, sep="")