... | ... |
@@ -59,6 +59,8 @@ importFrom(GenomicRanges,split) |
59 | 59 |
importFrom(GenomicRanges,start) |
60 | 60 |
importFrom(GenomicRanges,strand) |
61 | 61 |
importFrom(GenomicRanges,width) |
62 |
+importFrom(IRanges,IRanges) |
|
63 |
+importFrom(IRanges,subsetByOverlaps) |
|
62 | 64 |
importFrom(biomaRt,getBM) |
63 | 65 |
importFrom(biomaRt,useEnsembl) |
64 | 66 |
importFrom(biomaRt,useMart) |
... | ... |
@@ -53,8 +53,8 @@ corrbased <- function(mirnagene, |
53 | 53 |
return(dat) |
54 | 54 |
} |
55 | 55 |
|
56 |
-#' Pearson correlation coefficient value of the mRNA genes between miRNA:mRNA |
|
57 |
-#' for a given correlation cut-off and cancer. |
|
56 |
+#' Pearson correlation coefficient value of the mRNA genes between |
|
57 |
+#' miRNA:mRNA for a given correlation cut-off and cancer. |
|
58 | 58 |
#' |
59 | 59 |
#' @param mRNAgene Data frame of the mRNA genes |
60 | 60 |
#' @param cancer Name of the TCGA project code such as 'BRCA' that is analyzed |
... | ... |
@@ -1,5 +1,5 @@ |
1 |
-#' Given genes that fall in a given upstream and downstream region of mRNAs of |
|
2 |
-#' interest, GO term enrichment analysis is carried out |
|
1 |
+#' Given genes that fall in a given upstream and downstream region of |
|
2 |
+#' mRNAs of interest, GO term enrichment analysis is carried out |
|
3 | 3 |
#' |
4 | 4 |
#' @param gene Input genes other than miRNA |
5 | 5 |
#' @param org_assembly Genome assembly of interest for the analysis. Possible |
... | ... |
@@ -44,8 +44,9 @@ |
44 | 44 |
#' @param label2 Gene names of the custom exp2 expression data. If it is not |
45 | 45 |
#' provided, column name of the exp2 data will be taken. |
46 | 46 |
#' @param databaseFile Path of miRcancer.db file |
47 |
-#' @param isUnionCorGene Boolean value that shows whether union of the output of |
|
48 |
-#' the co-expression analysis and the other analysis should be considered |
|
47 |
+#' @param isUnionCorGene Boolean value that shows whether union of the output |
|
48 |
+#' of the co-expression analysis and the other analysis should be |
|
49 |
+#' considered |
|
49 | 50 |
#' |
50 | 51 |
#' @return GO term enrichment object for the given input |
51 | 52 |
#' |
... | ... |
@@ -247,8 +248,8 @@ geneGOEnricher <- |
247 | 248 |
} |
248 | 249 |
} |
249 | 250 |
|
250 |
-#' Given genes that fall in the given upstream and downstream region of mRNAs |
|
251 |
-#' of interest, pathway enrichment analysis is carried out |
|
251 |
+#' Given genes that fall in the given upstream and downstream region of |
|
252 |
+#' mRNAs of interest, pathway enrichment analysis is carried out |
|
252 | 253 |
#' |
253 | 254 |
#' @param gene Input noncoding genes other than miRNA |
254 | 255 |
#' @param org_assembly Genome assembly of interest for the analysis. Possible |
... | ... |
@@ -528,8 +529,8 @@ genePathwayEnricher <- |
528 | 529 |
} |
529 | 530 |
} |
530 | 531 |
|
531 |
-#' Given gene regions that fall in the given upstream and downstream region of |
|
532 |
-#' mRNAs of interest, GO term enrichment analysis is carried out |
|
532 |
+#' Given gene regions that fall in the given upstream and downstream region |
|
533 |
+#' of mRNAs of interest, GO term enrichment analysis is carried out |
|
533 | 534 |
#' |
534 | 535 |
#' @param region Bed format of the input gene regions other than miRNA |
535 | 536 |
#' @param org_assembly Genome assembly of interest for the analysis. Possible |
... | ... |
@@ -743,8 +744,8 @@ geneRegionGOEnricher <- |
743 | 744 |
} |
744 | 745 |
} |
745 | 746 |
|
746 |
-#' Given gene regions that fall in the given upstream and downstream region of |
|
747 |
-#' mRNAs of interest, pathway enrichment analysis is carried out |
|
747 |
+#' Given gene regions that fall in the given upstream and downstream region |
|
748 |
+#' of mRNAs of interest, pathway enrichment analysis is carried out |
|
748 | 749 |
#' |
749 | 750 |
#' @param region Bed format of input gene regions other than miRNA. Input must |
750 | 751 |
#' be Granges object. |
... | ... |
@@ -44,6 +44,7 @@ pkg.env$isSymbol = FALSE |
44 | 44 |
#' @importFrom biomaRt getBM useEnsembl useMart |
45 | 45 |
#' @importFrom rtracklayer browserSession genome getTable ucscTableQuery |
46 | 46 |
#' @importFrom rtracklayer genome<- |
47 |
+#' @importFrom IRanges IRanges |
|
47 | 48 |
#' |
48 | 49 |
#' @examples |
49 | 50 |
#' |
... | ... |
@@ -193,7 +194,7 @@ assembly <- function(org_assembly = c("hg19", |
193 | 194 |
} |
194 | 195 |
colnames(data) <- c('chr', 'strand', 'start', 'end', 'symbol') |
195 | 196 |
ucsc <- |
196 |
- with(data, GRanges(chr, IRanges(start, end), strand, symbol)) |
|
197 |
+ with(data, GRanges(chr, IRanges::IRanges(start, end), strand, symbol)) |
|
197 | 198 |
pkg.env$ucsc <- ucsc |
198 | 199 |
td <- |
199 | 200 |
paste0("TxDb.", types[index, 1], ".UCSC.", types[index, 2], ".", |
... | ... |
@@ -548,6 +549,7 @@ getTADOverlap <- |
548 | 549 |
#' @return GRange object of the given input |
549 | 550 |
#' |
550 | 551 |
#' @importFrom biomaRt getBM |
552 |
+#' @importFrom IRanges IRanges |
|
551 | 553 |
#' |
552 | 554 |
#' @examples |
553 | 555 |
#' |
... | ... |
@@ -669,7 +671,7 @@ convertGeneID <- |
669 | 671 |
file1 <- |
670 | 672 |
with(output, GRanges( |
671 | 673 |
paste0("chr", chromosome_name), |
672 |
- IRanges(start_position, end_position), |
|
674 |
+ IRanges::IRanges(start_position, end_position), |
|
673 | 675 |
'*', |
674 | 676 |
gene |
675 | 677 |
)) |
... | ... |
@@ -1255,12 +1255,14 @@ predictmiTargets <- function(gene, type, org_assembly) |
1255 | 1255 |
else{ |
1256 | 1256 |
colnames(where) <- c('genesEns', 'genesHugo', 'geneTrans', 'mirna') |
1257 | 1257 |
tmp1 <- |
1258 |
- data.frame(trans = unlist(apply((where[, 3]), 2, strsplit, '[.]'))[2 * |
|
1259 |
- (seq_len(nrow(where))) - 1]) |
|
1258 |
+ data.frame( |
|
1259 |
+ trans = unlist(apply((where[, 3]), 2, |
|
1260 |
+ strsplit, '[.]'))[2 *(seq_len(nrow(where))) - 1]) |
|
1260 | 1261 |
tmp2 <- |
1261 |
- data.frame(gene = |
|
1262 |
- unlist(apply((where[, 1]), 2, strsplit, '[.]'))[2 * |
|
1263 |
- (seq_len(nrow(where))) - 1]) |
|
1262 |
+ data.frame( |
|
1263 |
+ gene =unlist( |
|
1264 |
+ apply(( |
|
1265 |
+ where[, 1]), 2, strsplit, '[.]'))[2 *(seq_len(nrow(where))) - 1]) |
|
1264 | 1266 |
dat <- |
1265 | 1267 |
cbind.data.frame(tmp1, where$genesHugo, tmp2, where$mirna) |
1266 | 1268 |
return(dat) |
... | ... |
@@ -109,7 +109,8 @@ KeggEnrichment <- |
109 | 109 |
{ |
110 | 110 |
enric <- |
111 | 111 |
c(enric, |
112 |
- setNames(list(as.character(r[which(pathT[i] == r$pathway),]$symbol)), |
|
112 |
+ setNames(list( |
|
113 |
+ as.character(r[which(pathT[i] == r$pathway),]$symbol)), |
|
113 | 114 |
paste(pathT[i]))) |
114 | 115 |
} |
115 | 116 |
} |
... | ... |
@@ -246,7 +247,8 @@ reactomeEnrichment <- |
246 | 247 |
{ |
247 | 248 |
enric <- |
248 | 249 |
c(enric, |
249 |
- setNames(list(as.character(r[which(pathT[i] == r$pathway),]$symbol)), |
|
250 |
+ setNames( |
|
251 |
+ list(as.character(r[which(pathT[i] == r$pathway),]$symbol)), |
|
250 | 252 |
paste(pathT[i]))) |
251 | 253 |
} |
252 | 254 |
} |
... | ... |
@@ -454,16 +456,16 @@ WikiPathwayDB <- function(org_assembly = c("hg19", |
454 | 456 |
format = "gmt") |
455 | 457 |
if (org_assembly == 'dm6') |
456 | 458 |
wp.gmt <- |
457 |
- rWikiPathways::downloadPathwayArchive(organism = "Drosophila melanogaster", |
|
458 |
- format = "gmt") |
|
459 |
+ rWikiPathways::downloadPathwayArchive( |
|
460 |
+ organism = "Drosophila melanogaster",format = "gmt") |
|
459 | 461 |
if (org_assembly == 'ce11') |
460 | 462 |
wp.gmt <- |
461 |
- rWikiPathways::downloadPathwayArchive(organism = "Caenorhabditis elegans", |
|
462 |
- format = "gmt") |
|
463 |
+ rWikiPathways::downloadPathwayArchive( |
|
464 |
+ organism = "Caenorhabditis elegans",format = "gmt") |
|
463 | 465 |
if (org_assembly == 'sc3') |
464 | 466 |
wp.gmt <- |
465 |
- rWikiPathways::downloadPathwayArchive(organism = "Saccharomyces cerevisiae", |
|
466 |
- format = "gmt") |
|
467 |
+ rWikiPathways::downloadPathwayArchive( |
|
468 |
+ organism = "Saccharomyces cerevisiae",format = "gmt") |
|
467 | 469 |
|
468 | 470 |
gmtFile <- convertGMT(gmtName = wp.gmt) |
469 | 471 |
tmp <- |
... | ... |
@@ -584,7 +586,8 @@ WikiEnrichment <- function(genes, |
584 | 586 |
if (length(which(pathT[i] == r$pathID)) > 0) |
585 | 587 |
{ |
586 | 588 |
enric <- |
587 |
- c(enric, setNames(list(as.character(r[which(pathT[i] == r$pathID),]$gene)), |
|
589 |
+ c(enric, setNames( |
|
590 |
+ list(as.character(r[which(pathT[i] == r$pathID),]$gene)), |
|
588 | 591 |
paste(pathT[i]))) |
589 | 592 |
} |
590 | 593 |
} |
... | ... |
@@ -732,7 +735,8 @@ pathwayEnrichment <- function(genes, |
732 | 735 |
{ |
733 | 736 |
if (length(which(pathT[i] == r$pathTerm)) > 0) |
734 | 737 |
enric <- |
735 |
- c(enric, setNames(list(as.character(r[which(pathT[i] == r$pathTerm),]$symbol)), |
|
738 |
+ c(enric, setNames( |
|
739 |
+ list(as.character(r[which(pathT[i] == r$pathTerm),]$symbol)), |
|
736 | 740 |
paste(pathT[i]))) |
737 | 741 |
} |
738 | 742 |
return( |
... | ... |
@@ -234,7 +234,8 @@ topEnrichment <- function(mrnaObject, type, n) { |
234 | 234 |
#' |
235 | 235 |
#' @return Network |
236 | 236 |
#' |
237 |
-#' @importFrom igraph cluster_optimal degree graph_from_data_frame layout_with_fr norm_coords V E V<- E<- |
|
237 |
+#' @importFrom igraph cluster_optimal degree graph_from_data_frame |
|
238 |
+#' @importFrom igraph layout_with_fr norm_coords V E V<- E<- |
|
238 | 239 |
#' @importFrom ggplot2 aes element_text geom_point ggplot labs theme theme_bw |
239 | 240 |
#' |
240 | 241 |
#' @export |
... | ... |
@@ -353,8 +354,8 @@ createNetwork <- |
353 | 354 |
return(p) |
354 | 355 |
} |
355 | 356 |
|
356 |
-#' Plot and save the GO term DAG of the top n enrichments in terms of p-values |
|
357 |
-#' or adjusted p-values with an user provided format |
|
357 |
+#' Plot and save the GO term DAG of the top n enrichments in terms of |
|
358 |
+#' p-values or adjusted p-values with an user provided format |
|
358 | 359 |
#' |
359 | 360 |
#' @param mrnaObject Output of enrichment results |
360 | 361 |
#' @param type Sort in terms of p-values or FDR. possible values "pvalue", |
... | ... |
@@ -521,8 +522,8 @@ getKeggDiagram <- |
521 | 522 |
} |
522 | 523 |
|
523 | 524 |
#' Display the enriched Reactome diagram of the given Reactome pathway id. |
524 |
-#' This function is specific to only one pathway id and identifies the enriched |
|
525 |
-#' genes in the diagram. |
|
525 |
+#' This function is specific to only one pathway id and identifies the |
|
526 |
+#' enriched genes in the diagram. |
|
526 | 527 |
#' |
527 | 528 |
#' @param mrnaObject Output of enrichment results |
528 | 529 |
#' @param pathway Reactome pathway term |
... | ... |
@@ -2,8 +2,8 @@ |
2 | 2 |
% Please edit documentation in R/expressionBased.R |
3 | 3 |
\name{corrbasedMrna} |
4 | 4 |
\alias{corrbasedMrna} |
5 |
-\title{Pearson correlation coefficient value of the mRNA genes between miRNA:mRNA |
|
6 |
-for a given correlation cut-off and cancer.} |
|
5 |
+\title{Pearson correlation coefficient value of the mRNA genes between |
|
6 |
+miRNA:mRNA for a given correlation cut-off and cancer.} |
|
7 | 7 |
\usage{ |
8 | 8 |
corrbasedMrna(mRNAgene, cancer, minAbsCor, databaseFile) |
9 | 9 |
} |
... | ... |
@@ -25,6 +25,6 @@ the miRNA-mRNA} |
25 | 25 |
Data frame of the miRNA-mRNA correlation result |
26 | 26 |
} |
27 | 27 |
\description{ |
28 |
-Pearson correlation coefficient value of the mRNA genes between miRNA:mRNA |
|
29 |
-for a given correlation cut-off and cancer. |
|
28 |
+Pearson correlation coefficient value of the mRNA genes between |
|
29 |
+miRNA:mRNA for a given correlation cut-off and cancer. |
|
30 | 30 |
} |
... | ... |
@@ -2,8 +2,8 @@ |
2 | 2 |
% Please edit documentation in R/geneEnrichment.R |
3 | 3 |
\name{geneGOEnricher} |
4 | 4 |
\alias{geneGOEnricher} |
5 |
-\title{Given genes that fall in a given upstream and downstream region of mRNAs of |
|
6 |
-interest, GO term enrichment analysis is carried out} |
|
5 |
+\title{Given genes that fall in a given upstream and downstream region of |
|
6 |
+mRNAs of interest, GO term enrichment analysis is carried out} |
|
7 | 7 |
\usage{ |
8 | 8 |
geneGOEnricher(gene, org_assembly = c("hg19", "hg38", "mm10", "dre10", |
9 | 9 |
"rn6", "dm6", "ce11", "sc3"), genetype = c("Entrez", "mirna", |
... | ... |
@@ -71,8 +71,9 @@ provided, column name of the exp1 data will be taken.} |
71 | 71 |
\item{label2}{Gene names of the custom exp2 expression data. If it is not |
72 | 72 |
provided, column name of the exp2 data will be taken.} |
73 | 73 |
|
74 |
-\item{isUnionCorGene}{Boolean value that shows whether union of the output of |
|
75 |
-the co-expression analysis and the other analysis should be considered} |
|
74 |
+\item{isUnionCorGene}{Boolean value that shows whether union of the output |
|
75 |
+of the co-expression analysis and the other analysis should be |
|
76 |
+considered} |
|
76 | 77 |
|
77 | 78 |
\item{databaseFile}{Path of miRcancer.db file} |
78 | 79 |
} |
... | ... |
@@ -80,8 +81,8 @@ the co-expression analysis and the other analysis should be considered} |
80 | 81 |
GO term enrichment object for the given input |
81 | 82 |
} |
82 | 83 |
\description{ |
83 |
-Given genes that fall in a given upstream and downstream region of mRNAs of |
|
84 |
-interest, GO term enrichment analysis is carried out |
|
84 |
+Given genes that fall in a given upstream and downstream region of |
|
85 |
+mRNAs of interest, GO term enrichment analysis is carried out |
|
85 | 86 |
} |
86 | 87 |
\examples{ |
87 | 88 |
ncGO<-geneGOEnricher(gene = brain_disorder_ncRNA, org_assembly='hg19', |
... | ... |
@@ -2,8 +2,8 @@ |
2 | 2 |
% Please edit documentation in R/geneEnrichment.R |
3 | 3 |
\name{genePathwayEnricher} |
4 | 4 |
\alias{genePathwayEnricher} |
5 |
-\title{Given genes that fall in the given upstream and downstream region of mRNAs |
|
6 |
-of interest, pathway enrichment analysis is carried out} |
|
5 |
+\title{Given genes that fall in the given upstream and downstream region of |
|
6 |
+mRNAs of interest, pathway enrichment analysis is carried out} |
|
7 | 7 |
\usage{ |
8 | 8 |
genePathwayEnricher(gene, org_assembly = c("hg19", "hg38", "mm10", |
9 | 9 |
"dre10", "rn6", "dm6", "ce11", "sc3"), genetype = c("Entrez", "mirna", |
... | ... |
@@ -81,8 +81,8 @@ performed} |
81 | 81 |
Pathway enrichment object for the given input |
82 | 82 |
} |
83 | 83 |
\description{ |
84 |
-Given genes that fall in the given upstream and downstream region of mRNAs |
|
85 |
-of interest, pathway enrichment analysis is carried out |
|
84 |
+Given genes that fall in the given upstream and downstream region of |
|
85 |
+mRNAs of interest, pathway enrichment analysis is carried out |
|
86 | 86 |
} |
87 | 87 |
\examples{ |
88 | 88 |
#Pathway enrichment based on the gen sets that falls into the TAD regions |
... | ... |
@@ -2,8 +2,8 @@ |
2 | 2 |
% Please edit documentation in R/geneEnrichment.R |
3 | 3 |
\name{geneRegionGOEnricher} |
4 | 4 |
\alias{geneRegionGOEnricher} |
5 |
-\title{Given gene regions that fall in the given upstream and downstream region of |
|
6 |
-mRNAs of interest, GO term enrichment analysis is carried out} |
|
5 |
+\title{Given gene regions that fall in the given upstream and downstream region |
|
6 |
+of mRNAs of interest, GO term enrichment analysis is carried out} |
|
7 | 7 |
\usage{ |
8 | 8 |
geneRegionGOEnricher(region, org_assembly = c("hg19", "hg38", "mm10", |
9 | 9 |
"dre10", "rn6", "dm6", "ce11", "sc3"), near = TRUE, backG = "", |
... | ... |
@@ -76,8 +76,8 @@ considered} |
76 | 76 |
GO term enrichment object for the given input |
77 | 77 |
} |
78 | 78 |
\description{ |
79 |
-Given gene regions that fall in the given upstream and downstream region of |
|
80 |
-mRNAs of interest, GO term enrichment analysis is carried out |
|
79 |
+Given gene regions that fall in the given upstream and downstream region |
|
80 |
+of mRNAs of interest, GO term enrichment analysis is carried out |
|
81 | 81 |
} |
82 | 82 |
\examples{ |
83 | 83 |
|
... | ... |
@@ -2,8 +2,8 @@ |
2 | 2 |
% Please edit documentation in R/geneEnrichment.R |
3 | 3 |
\name{geneRegionPathwayEnricher} |
4 | 4 |
\alias{geneRegionPathwayEnricher} |
5 |
-\title{Given gene regions that fall in the given upstream and downstream region of |
|
6 |
-mRNAs of interest, pathway enrichment analysis is carried out} |
|
5 |
+\title{Given gene regions that fall in the given upstream and downstream region |
|
6 |
+of mRNAs of interest, pathway enrichment analysis is carried out} |
|
7 | 7 |
\usage{ |
8 | 8 |
geneRegionPathwayEnricher(region, org_assembly = c("hg19", "hg38", |
9 | 9 |
"mm10", "dre10", "rn6", "dm6", "ce11", "sc3"), near = FALSE, |
... | ... |
@@ -76,8 +76,8 @@ performed} |
76 | 76 |
Pathway enrichment object of the given input |
77 | 77 |
} |
78 | 78 |
\description{ |
79 |
-Given gene regions that fall in the given upstream and downstream region of |
|
80 |
-mRNAs of interest, pathway enrichment analysis is carried out |
|
79 |
+Given gene regions that fall in the given upstream and downstream region |
|
80 |
+of mRNAs of interest, pathway enrichment analysis is carried out |
|
81 | 81 |
} |
82 | 82 |
\examples{ |
83 | 83 |
|
... | ... |
@@ -2,8 +2,8 @@ |
2 | 2 |
% Please edit documentation in R/plot.R |
3 | 3 |
\name{getGoDag} |
4 | 4 |
\alias{getGoDag} |
5 |
-\title{Plot and save the GO term DAG of the top n enrichments in terms of p-values |
|
6 |
-or adjusted p-values with an user provided format} |
|
5 |
+\title{Plot and save the GO term DAG of the top n enrichments in terms of |
|
6 |
+p-values or adjusted p-values with an user provided format} |
|
7 | 7 |
\usage{ |
8 | 8 |
getGoDag(mrnaObject, type, n, filename, imageFormat, p_range = seq(0, |
9 | 9 |
0.05, by = 0.001)) |
... | ... |
@@ -27,8 +27,8 @@ getGoDag(mrnaObject, type, n, filename, imageFormat, p_range = seq(0, |
27 | 27 |
Saves image file in a given format |
28 | 28 |
} |
29 | 29 |
\description{ |
30 |
-Plot and save the GO term DAG of the top n enrichments in terms of p-values |
|
31 |
-or adjusted p-values with an user provided format |
|
30 |
+Plot and save the GO term DAG of the top n enrichments in terms of |
|
31 |
+p-values or adjusted p-values with an user provided format |
|
32 | 32 |
} |
33 | 33 |
\examples{ |
34 | 34 |
ncRNAPathway<-mirnaPathwayEnricher(gene = brain_mirna, |
... | ... |
@@ -3,8 +3,8 @@ |
3 | 3 |
\name{getReactomeDiagram} |
4 | 4 |
\alias{getReactomeDiagram} |
5 | 5 |
\title{Display the enriched Reactome diagram of the given Reactome pathway id. |
6 |
-This function is specific to only one pathway id and identifies the enriched |
|
7 |
- genes in the diagram.} |
|
6 |
+This function is specific to only one pathway id and identifies the |
|
7 |
+enriched genes in the diagram.} |
|
8 | 8 |
\usage{ |
9 | 9 |
getReactomeDiagram(mrnaObject, pathway, imageFormat) |
10 | 10 |
} |
... | ... |
@@ -21,8 +21,8 @@ Shows reactome diagram marked with an enriched genes in a browser |
21 | 21 |
} |
22 | 22 |
\description{ |
23 | 23 |
Display the enriched Reactome diagram of the given Reactome pathway id. |
24 |
-This function is specific to only one pathway id and identifies the enriched |
|
25 |
- genes in the diagram. |
|
24 |
+This function is specific to only one pathway id and identifies the |
|
25 |
+enriched genes in the diagram. |
|
26 | 26 |
} |
27 | 27 |
\examples{ |
28 | 28 |
|