Browse code

Adding new MAN files

Marta R. Hidalgo authored on 14/02/2018 10:50:27
Showing42 changed files

1 1
new file mode 100644
... ...
@@ -0,0 +1,29 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/functions.R
3
+\name{annotate_paths}
4
+\alias{annotate_paths}
5
+\title{Annotates functions to pathways}
6
+\usage{
7
+annotate_paths(metaginfo, dbannot)
8
+}
9
+\arguments{
10
+\item{metaginfo}{Pathways object}
11
+
12
+\item{dbannot}{Either a string indicating which precomputed annotation to
13
+use ("uniprot" for Uniprot Keywords or "GO" for Gene Ontology terms), or
14
+a dataframe with the annotation of the genes to the functions. First
15
+column are gene symbols, second column the functions.}
16
+}
17
+\value{
18
+Object of annotations from pathways to functions
19
+
20
+#@examples
21
+#pathways <- load_pathways(species = "hsa", pathways_list = c("hsa03320",
22
+#"hsa04012"))
23
+#annotate_paths(pathways, "GO")
24
+
25
+#@export
26
+}
27
+\description{
28
+Annotates functions from a database to each pathway
29
+}
0 30
new file mode 100644
... ...
@@ -0,0 +1,28 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/data.R
3
+\docType{data}
4
+\name{brca_data}
5
+\alias{brca_data}
6
+\title{BRCA gene expression dataset}
7
+\format{Matrix with 40 columns and 18638 rows. Row names are Entrez IDs
8
+and column names are the  TCGA identifyers of the samples.}
9
+\source{
10
+\url{https://cancergenome.nih.gov/}
11
+}
12
+\usage{
13
+data(brca_data)
14
+}
15
+\value{
16
+Matrix with 40 columns and 18638 rows. Row names are Entrez IDs
17
+and column names are the  TCGA identifyers of the samples.
18
+}
19
+\description{
20
+Gene expression of 40 samples from the BRCA-US project from
21
+The Cancer Genome Atlas (TCGA).
22
+}
23
+\details{
24
+Gene expression matrix with 40 samples taken from the BRCA-US project from
25
+The Cancer Genome Atlas (TCGA). The data has been log-transformed and
26
+normalized with TMM.
27
+}
28
+\keyword{datasets}
0 29
new file mode 100644
... ...
@@ -0,0 +1,26 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/data.R
3
+\docType{data}
4
+\name{brca_design}
5
+\alias{brca_design}
6
+\title{BRCA experimental design}
7
+\format{Dataframe with 1 column and 40 rows, including the experimental
8
+design of the 40 samples from the BRCA-US project from TCGA. Field
9
+\code{group} is the type of sample, either "Tumor" or "Normal".}
10
+\source{
11
+\url{https://cancergenome.nih.gov/}
12
+}
13
+\usage{
14
+data(brca_design)
15
+}
16
+\value{
17
+Dataframe with 1 column and 40 rows, including the experimental
18
+design of the 40 samples from the BRCA-US project from TCGA. Field
19
+\code{group} is the type of sample, either "Tumor" or "Normal".
20
+}
21
+\description{
22
+Experimental design of the gene expression matrix \code{brca_data} with
23
+40 samples taken from the BRCA-US project from The Cancer Genome Atlas
24
+(TCGA). 20 samples are "Tumor" samples and 20 samples are "Normal" samples.
25
+}
26
+\keyword{datasets}
0 27
new file mode 100644
... ...
@@ -0,0 +1,22 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/data.R
3
+\docType{data}
4
+\name{comp}
5
+\alias{comp}
6
+\title{Wilcoxon comparison of pathways object}
7
+\format{Table with 1868 rows and 5 columns}
8
+\usage{
9
+data(comp)
10
+}
11
+\value{
12
+Pathway comparison result
13
+}
14
+\description{
15
+Comparison object returned by \code{hipathia::do_wilcoxon} function, after
16
+calling
17
+\code{comp <- do_wilcoxon(path_vals, sample_group, g1 = "Tumor", g2 =
18
+"Normal")}
19
+\code{path_names <- get_path_names(pathways, rownames(comp))}
20
+\code{comp <- cbind(path_names, comp)}
21
+}
22
+\keyword{datasets}
0 23
new file mode 100644
... ...
@@ -0,0 +1,61 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/save.R
3
+\name{create_report}
4
+\alias{create_report}
5
+\title{Create visualization HTML}
6
+\usage{
7
+create_report(comp, metaginfo, output_folder, node_colors = NULL,
8
+  group_by = "pathway", conf = 0.05, verbose = FALSE)
9
+}
10
+\arguments{
11
+\item{comp}{Comparison object as given by the \code{do_wilcoxon} function}
12
+
13
+\item{metaginfo}{Pathways object as returned by the \code{load_pathways}
14
+function}
15
+
16
+\item{output_folder}{Absolute path to the folder in which results will be
17
+saved. If this folder does not exist, it will be created.
18
+However, the parent folder must exist.}
19
+
20
+\item{node_colors}{List of colors with which to paint the nodes of the
21
+pathways, as returned by the
22
+\code{node_color_per_de} function. Default is white.}
23
+
24
+\item{group_by}{How to group the subpathways to be visualized. By default
25
+they are grouped by the pathway to which they belong. Available groupings
26
+include "uniprot", to group subpathways by their annotated Uniprot functions,
27
+"GO", to group subpathways by their annotated GO terms, and "genes", to group
28
+subpathways by the genes they include. Default is set to "pathway".}
29
+
30
+\item{conf}{Level of significance. By default 0.05.}
31
+
32
+\item{verbose}{Boolean, whether to show details about the results of the
33
+execution}
34
+}
35
+\value{
36
+Saves the results and creates a report to visualize them through
37
+a server in the specified \code{output_folder}.
38
+}
39
+\description{
40
+Saves the results of a Wilcoxon comparison for the Hipathia pathway values
41
+into a folder, and creates a HTML from which to visualize the results on
42
+top of the pathways. The results are stored into the specified folder.
43
+If this folder does not exist, it will be created. The parent folder must
44
+exist.
45
+}
46
+\examples{
47
+data(results)
48
+data(comp)
49
+data(brca_design)
50
+data(path_vals)
51
+pathways <- load_pathways(species = "hsa", pathways_list = c("hsa03320",
52
+"hsa04012"))
53
+create_report(comp, pathways, "save_results/")
54
+
55
+sample_group <- brca_design[colnames(path_vals),"group"]
56
+colors_de <- node_color_per_de(results, pathways,
57
+sample_group, "Tumor", "Normal")
58
+create_report(comp, pathways, "save_results/",
59
+node_colors = colors_de)
60
+
61
+}
0 62
new file mode 100644
... ...
@@ -0,0 +1,27 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/stats.R
3
+\name{do_pca}
4
+\alias{do_pca}
5
+\title{Performs a Principal Components Analysis}
6
+\usage{
7
+do_pca(data, cor = FALSE)
8
+}
9
+\arguments{
10
+\item{data}{Matrix of values to be analyzed. Samples must be represented
11
+in the columns.}
12
+
13
+\item{cor}{A logical value indicating whether the calculation should use
14
+the correlation matrix or the covariance matrix. (The correlation matrix
15
+can only be used if there are no constant variables.)}
16
+}
17
+\value{
18
+\code{do_pca} returns a list with class \code{princomp}.
19
+}
20
+\description{
21
+Performs a Principal Components Analysis
22
+}
23
+\examples{
24
+data(path_vals)
25
+pca_model <- do_pca(path_vals[1:ncol(path_vals),])
26
+
27
+}
0 28
new file mode 100644
... ...
@@ -0,0 +1,40 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/stats.R
3
+\name{do_wilcoxon}
4
+\alias{do_wilcoxon}
5
+\title{Apply Wilcoxon test}
6
+\usage{
7
+do_wilcoxon(sel_vals, group_value, g1, g2, paired = FALSE, adjust = TRUE)
8
+}
9
+\arguments{
10
+\item{sel_vals}{Matrix of values. Columns represent samples.}
11
+
12
+\item{group_value}{Vector with the class to which each sample belongs.
13
+Samples must be ordered as in \code{sel_vals}}
14
+
15
+\item{g1}{String, label of the first group to be compared}
16
+
17
+\item{g2}{String, label of the second group to be compared}
18
+
19
+\item{paired}{Boolean, whether the samples to be compared are paired.
20
+If TRUE, function \code{wilcoxsign_test} from package \code{coin} is
21
+used. If FALSE, function \code{wilcox.test} from package \code{stats}
22
+is used.}
23
+
24
+\item{adjust}{Boolean, whether to adjust the p.value with
25
+Benjamini-Hochberg FDR method}
26
+}
27
+\value{
28
+Dataframe with the result of the comparison
29
+}
30
+\description{
31
+Performs a Wilcoxon test for the values in \code{sel_vals} comparing
32
+conditions \code{g1} and \code{g2}
33
+}
34
+\examples{
35
+data(path_vals)
36
+data(brca_design)
37
+sample_group <- brca_design[colnames(path_vals),"group"]
38
+comp <- do_wilcoxon(path_vals, sample_group, g1 = "Tumor", g2 = "Normal")
39
+
40
+}
0 41
new file mode 100644
... ...
@@ -0,0 +1,26 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/data.R
3
+\docType{data}
4
+\name{exp_data}
5
+\alias{exp_data}
6
+\title{Normalized BRCA gene expression dataset}
7
+\format{Matrix with 40 columns and 3184 rows. Row names are Entrez IDs
8
+and column names are the  TCGA identifyers of the samples.}
9
+\usage{
10
+data(exp_data)
11
+}
12
+\value{
13
+Matrix with 40 columns and 3184 rows. Row names are Entrez IDs
14
+and column names are the  TCGA identifyers of the samples.
15
+}
16
+\description{
17
+Experimental design matrix once expression matrix \code{brca_data} has been
18
+translated to Entrez geens with \code{translate_matrix} and normalized using
19
+\code{normalize_data}.
20
+}
21
+\details{
22
+To create the data, the following functions have been called:
23
+\code{trans_data <- translate_matrix(brca_data, "hsa")}
24
+\code{exp_data <- normalize_data(trans_data)}
25
+}
26
+\keyword{datasets}
0 27
new file mode 100644
... ...
@@ -0,0 +1,31 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/utils.R
3
+\name{get_highest_sig_ancestor}
4
+\alias{get_highest_sig_ancestor}
5
+\title{Get highest common GO ancestor of GO annotations}
6
+\usage{
7
+get_highest_sig_ancestor(go_terms, go_comp, metaginfo, unique = TRUE,
8
+  pval = 0.05)
9
+}
10
+\arguments{
11
+\item{go_terms}{GO terms for which the highest common ancestors are
12
+to be looked for.}
13
+
14
+\item{go_comp}{Wilcoxon comparison of the matrix of GO values as returned
15
+by \code{do_wilcoxon}.}
16
+
17
+\item{metaginfo}{Pathways object}
18
+
19
+\item{unique}{Boolean, whether to return only one highest significant GO
20
+ancestor or all of them. By default, TRUE.}
21
+
22
+\item{pval}{P-value cut-off. Default values is set to 0.05.}
23
+}
24
+\value{
25
+highest common ancestors
26
+
27
+#@export
28
+}
29
+\description{
30
+Get highest common GO ancestor of GO annotations
31
+}
0 32
new file mode 100644
... ...
@@ -0,0 +1,41 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/utils.R
3
+\name{get_path_names}
4
+\alias{get_path_names}
5
+\title{Tranlates path IDs to path names}
6
+\usage{
7
+get_path_names(metaginfo, names, maxchar = NULL)
8
+}
9
+\arguments{
10
+\item{metaginfo}{Pathways object}
11
+
12
+\item{names}{Character vector with the subpathway IDs to be translated}
13
+
14
+\item{maxchar}{Integer, describes the number of maximum characters to
15
+be shown. By default no filter is applied.}
16
+}
17
+\value{
18
+A character vector including the readable names of the
19
+subpathways IDs, in the same order as provided.
20
+}
21
+\description{
22
+Translates the subpathway IDs to readable and comprensible names.
23
+
24
+For effector subpathways, the names of the subpathways are encoded
25
+as "pathway: effector_protein", where "pathway" is the pathway to
26
+which the subpathway belongs and "effector_protein" is the name of
27
+the last node in the subpathway.
28
+
29
+For decomposed subpathways, the names of the subpathways are encoded
30
+as "pathway: receptor_protein - effector_protein", where "pathway" is
31
+the pathway to which the subpathway belongs, "receptor_protein" is the
32
+name of the initial node of the subpathway and "effector_protein" is
33
+the name of the last node in the subpathway.
34
+}
35
+\examples{
36
+data(path_vals)
37
+pathways <- load_pathways(species = "hsa", pathways_list = c("hsa03320",
38
+"hsa04012"))
39
+translated_names <- get_path_names(pathways, rownames(path_vals))
40
+
41
+}
0 42
new file mode 100644
... ...
@@ -0,0 +1,41 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/utils.R
3
+\name{get_paths_matrix}
4
+\alias{get_paths_matrix}
5
+\title{Gets the matrix of subpathway activation values}
6
+\usage{
7
+get_paths_matrix(results)
8
+}
9
+\arguments{
10
+\item{results}{Results object as returned by \code{hipathia}.}
11
+}
12
+\value{
13
+Matrix with the levels of activation of each decomposed subpathway
14
+for each sample.
15
+}
16
+\description{
17
+This function returns the matrix with the levels of activation of each
18
+subpathway for each sample. Rows represent the subpathways and columns
19
+represent the samples. Each cell is the value of activation of a subpathway
20
+in a sample.
21
+
22
+Rownames are the IDs of the subpathways. In order to transform IDs into
23
+readable names, use \code{get_path_names}.
24
+
25
+Effector subpathways are subgraphs of a pathway including all the paths
26
+leading to an effector protein. Effector proteins are defined as final
27
+nodes in the graph. Each effector protein (final node) in a pathway
28
+defines its own effector subpathway as the nodes and edges in a path leading
29
+to it.
30
+
31
+Decomposed subpathways are subgraphs of a pathway including all the paths
32
+starting in a receptor protein and ending in an effector protein. Receptor
33
+proteins are defined as initial nodes and effector proteins are defined
34
+as final nodes in the graph. Each effector subpathway can be decomposed
35
+in as many decomposed subpathways as initial nodes it includes.
36
+}
37
+\examples{
38
+data(results)
39
+path_vals <- get_paths_matrix(results)
40
+
41
+}
0 42
new file mode 100644
... ...
@@ -0,0 +1,29 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/functions.R
3
+\name{get_pathway_functions}
4
+\alias{get_pathway_functions}
5
+\title{Returns functions related to a pathway}
6
+\usage{
7
+get_pathway_functions(pathigraph, dbannot, entrez2hgnc, use_last_nodes = TRUE,
8
+  unique = TRUE)
9
+}
10
+\arguments{
11
+\item{pathigraph}{Pathway object}
12
+
13
+\item{dbannot}{Dataframe with the annotation of the genes to the functions.
14
+First column are gene symbols, second column the functions.}
15
+
16
+\item{entrez2hgnc}{Relation between Entrez and HGNC genes.}
17
+
18
+\item{use_last_nodes}{Boolean, whether to annotate functions to the last
19
+nodes of the pathways or not. If FALSE, functions will refer to all the nodes
20
+of the pathway.}
21
+
22
+\item{unique}{Boolean, whether to return the first function for each path.}
23
+}
24
+\value{
25
+List of annotations from pathways to functions
26
+}
27
+\description{
28
+Returns functions related to a pathway
29
+}
0 30
new file mode 100644
... ...
@@ -0,0 +1,38 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/utils.R
3
+\name{get_pathways_annotations}
4
+\alias{get_pathways_annotations}
5
+\title{Get Pathways functional annotations}
6
+\usage{
7
+get_pathways_annotations(pathway_names, metaginfo, dbannot, collapse = FALSE)
8
+}
9
+\arguments{
10
+\item{pathway_names}{Character vector of the names of the pathways}
11
+
12
+\item{metaginfo}{Pathways object}
13
+
14
+\item{dbannot}{Either a string indicating which precomputed annotation
15
+to use ("uniprot" for Uniprot Keywords or "GO" for Gene Ontology terms),
16
+or a dataframe with the annotation of the genes to the functions. First
17
+column are gene symbols, second column the functions.}
18
+
19
+\item{collapse}{Boolean, whether to collapse all functions of the same
20
+path in a single character string.}
21
+}
22
+\value{
23
+2-columns matrix with the annotations of each pathway ID in the
24
+annotation \code{dbannot}.
25
+}
26
+\description{
27
+Get functional annotation of the pathways, either for a particular
28
+annotation or a stored one.
29
+}
30
+\examples{
31
+pathways <- load_pathways(species = "hsa", pathways_list = c("hsa03320",
32
+"hsa04012"))
33
+pathway_names <- c("P-hsa03320-37", "P-hsa03320-61", "P-hsa03320-46",
34
+"P-hsa03320-57", "P-hsa03320-64", "P-hsa03320-47", "P-hsa03320-65")
35
+get_pathways_annotations(pathway_names, pathways, "GO")
36
+get_pathways_annotations(pathway_names, pathways, "uniprot")
37
+
38
+}
0 39
new file mode 100644
... ...
@@ -0,0 +1,24 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/utils.R
3
+\name{get_pathways_list}
4
+\alias{get_pathways_list}
5
+\title{Lists the IDs of the pathways in a pathways object}
6
+\usage{
7
+get_pathways_list(metaginfo)
8
+}
9
+\arguments{
10
+\item{metaginfo}{Pathways object}
11
+}
12
+\value{
13
+List of the pathway IDs included in the pathways object
14
+}
15
+\description{
16
+Lists the IDs of the pathways included in the pathways object
17
+\code{metaginfo}
18
+}
19
+\examples{
20
+pathways <- load_pathways(species = "hsa", pathways_list = c("hsa03320",
21
+"hsa04012"))
22
+pathways_list <- get_pathways_list(pathways)
23
+
24
+}
0 25
new file mode 100644
... ...
@@ -0,0 +1,46 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/stats.R
3
+\name{get_pathways_summary}
4
+\alias{get_pathways_summary}
5
+\title{Compute pathway summary}
6
+\usage{
7
+get_pathways_summary(comp, metaginfo, conf = 0.05)
8
+}
9
+\arguments{
10
+\item{comp}{Comparison data frame as returned by the \code{do_wilcoxon}
11
+function.}
12
+
13
+\item{metaginfo}{Pathways object}
14
+
15
+\item{conf}{Level of significance of the comparison for the adjusted
16
+p-value. Default is 0.05.}
17
+}
18
+\value{
19
+Table with the summarized information for each of the pathways.
20
+Rows are the analized pathways. Columns are:
21
+* \code{num_total_paths} Number of total subpathways in which each pathway
22
+is decomposed.
23
+* \code{num_significant_paths} Number of significant subpathways in the
24
+provided comparison.
25
+* \code{percent_significant_paths} Percentage of significant subpathways
26
+from the total number of subpathways in a pathway.
27
+* \code{num_up_paths} Number of significant up-regulated subpathways in the
28
+provided comparison.
29
+* \code{percent_up_paths} Percentage of significant up-regulated subpathways
30
+from the total number of subpathways in a pathway.
31
+* \code{num_down_paths} Number of significant down-regulated subpathways in
32
+the provided comparison.
33
+* \code{percent_down_paths} Percentage of significant down-regulated
34
+subpathways from the total number of subpathways in a pathway.
35
+}
36
+\description{
37
+Computes a summary of the results, summarizing the number and proportion
38
+of up- and down-regulated subpathways in each pathway.
39
+}
40
+\examples{
41
+data(comp)
42
+pathways <- load_pathways(species = "hsa", pathways_list = c("hsa03320",
43
+"hsa04012"))
44
+get_pathways_summary(comp, pathways)
45
+
46
+}
0 47
new file mode 100644
... ...
@@ -0,0 +1,24 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/data.R
3
+\docType{data}
4
+\name{go_vals}
5
+\alias{go_vals}
6
+\title{Gene Ontology matrix of the BRCA gene expression dataset}
7
+\format{Matrix with 40 columns and 1654 rows. Row names are Gene Ontology
8
+terms and column names are the TCGA identifyers of the samples.}
9
+\usage{
10
+data(go_vals)
11
+}
12
+\value{
13
+Matrix with 40 columns and 1654 rows. Row names are Gene Ontology
14
+terms and column names are the TCGA identifyers of the samples.
15
+}
16
+\description{
17
+Matrix of Gene Ontology terms activation values for the BRCA dataset.
18
+This matrix is computed from the Results object returned by the
19
+\code{hipathia} function by means of the \code{quantify_terms} function.
20
+}
21
+\details{
22
+\code{go_vals <- quantify_terms(results, pathways, "GO")}
23
+}
24
+\keyword{datasets}
0 25
new file mode 100644
... ...
@@ -0,0 +1,77 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/chart.R
3
+\name{heatmap_plot}
4
+\alias{heatmap_plot}
5
+\title{Plots subpathways heatmap}
6
+\usage{
7
+heatmap_plot(path_vals, sample_type = NULL, colors = "classic",
8
+  sample_clust = TRUE, variable_clust = FALSE, labRow = NULL,
9
+  labCol = NULL, sample_colors = NULL, scale = TRUE, save_png = NULL,
10
+  legend = TRUE, legend_xy = "topright", pch = 15, main = NULL)
11
+}
12
+\arguments{
13
+\item{path_vals}{Matrix with the values of the subpathways.
14
+Rows are subpathways and columns are samples.}
15
+
16
+\item{sample_type}{Vector with the group to which each sample belongs.
17
+The samples must be ordered as in \code{path_vals}. By default, all
18
+samples will be assigned to the same class.}
19
+
20
+\item{colors}{Either a character vector with colors or a key name
21
+indicating the color scheme to be used in the heatmap.
22
+If a character vector is provided, it is recommended to provide at
23
+least 3 colors. Three different predefined color schemes may be
24
+selected by providing a key name. Options are:
25
+* \code{classic} Blue for lower values, white for medium values,
26
+red for higher values.
27
+* \code{hipathia} Hipathia predefined color scheme: Green for lower
28
+values, white for medium values, orange for higher values.
29
+* \code{redgreen} Green for lower values, black for medium values,
30
+red for higher values.
31
+By default \code{classic} color scheme is applied.}
32
+
33
+\item{sample_clust}{Boolean, whether to cluster samples (columns).
34
+By default TRUE.}
35
+
36
+\item{variable_clust}{Boolean, whether to cluster variables (rows).
37
+By default FALSE. If TRUE, rows with 0 variance are removed.}
38
+
39
+\item{labRow, labCol}{Character vectors with row and column labels
40
+to be used. By default rownames(path_vals) or colnames(path_vals)
41
+are used, respectively.}
42
+
43
+\item{sample_colors}{Named character vector of colors. The names of
44
+the colors must be the classes in \code{sample_type}. Each sample will
45
+be assigned the color corresponding to its class, taken from the
46
+\code{sample_type} vector. By default a color will be assigned
47
+automatically to each class.}
48
+
49
+\item{scale}{Boolean, whether to scale each row to the interval [0,1].
50
+Default is TRUE.}
51
+
52
+\item{save_png}{Path to the file where the image as PNG will be saved.
53
+By default, the image is not saved.}
54
+
55
+\item{legend}{Boolean, whether to display a legend.}
56
+
57
+\item{legend_xy}{Position for the legend, in case \code{legend} is TRUE.}
58
+
59
+\item{pch}{Graphical parameter from \code{par()} function.}
60
+
61
+\item{main}{Main title of the image}
62
+}
63
+\value{
64
+Heatmap of the values of the subpathways
65
+}
66
+\description{
67
+Plots a heatmap with the values of the subpathways.
68
+}
69
+\examples{
70
+data(brca_design)
71
+data(path_vals)
72
+sample_group <- brca_design[colnames(path_vals),"group"]
73
+heatmap_plot(path_vals, sample_type = sample_group)
74
+heatmap_plot(path_vals, sample_type = sample_group, colors = "hipathia",
75
+variable_clust = TRUE)
76
+
77
+}
0 78
new file mode 100644
... ...
@@ -0,0 +1,18 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/utils.R
3
+\name{igraphs_upgrade}
4
+\alias{igraphs_upgrade}
5
+\title{Upgrade igraphs to current version}
6
+\usage{
7
+igraphs_upgrade(metaginfo)
8
+}
9
+\arguments{
10
+\item{metaginfo}{Pathways object}
11
+}
12
+\value{
13
+The pathways object with the upgraded igraph objects
14
+}
15
+\description{
16
+Upgrades the \code{igraph} objects in metaginfo object to the corresponding
17
+version of the \code{igraph} package.
18
+}
0 19
new file mode 100644
... ...
@@ -0,0 +1,21 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/testing.R
3
+\name{is_accepted_species}
4
+\alias{is_accepted_species}
5
+\title{Checks whether a species is accepted}
6
+\usage{
7
+is_accepted_species(species)
8
+}
9
+\arguments{
10
+\item{species}{Species of the samples.
11
+
12
+#@examples
13
+#is_accepted_species("hsa")
14
+#is_accepted_species("fca")}
15
+}
16
+\value{
17
+Boolean, whether \code{species} is accepted or not.
18
+}
19
+\description{
20
+Checks whether a species is accepted
21
+}
0 22
new file mode 100644
... ...
@@ -0,0 +1,23 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/load.R
3
+\name{load_annofuns}
4
+\alias{load_annofuns}
5
+\title{Loads annotations object}
6
+\usage{
7
+load_annofuns(db, species)
8
+}
9
+\arguments{
10
+\item{db}{Database to be used. Either "GO" or "uniprot".}
11
+
12
+\item{species}{Species of the samples.
13
+
14
+#@examples
15
+#load_annofuns("GO", "hsa")
16
+#load_annofuns("uniprot", "hsa")}
17
+}
18
+\value{
19
+Annotations object
20
+}
21
+\description{
22
+Loads annotations object
23
+}
0 24
new file mode 100644
... ...
@@ -0,0 +1,22 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/load.R
3
+\name{load_annots}
4
+\alias{load_annots}
5
+\title{Loads functional annotations to genes}
6
+\usage{
7
+load_annots(db, species)
8
+}
9
+\arguments{
10
+\item{db}{Database to be used. Either "GO" or "uniprot".}
11
+
12
+\item{species}{Species of the samples.
13
+
14
+#@examples
15
+#load_annots("GO", "hsa")}
16
+}
17
+\value{
18
+Functional annotations from HGNC to the selected database.
19
+}
20
+\description{
21
+Loads functional annotations from HGNC to the selected database.
22
+}
0 23
new file mode 100644
... ...
@@ -0,0 +1,20 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/load.R
3
+\name{load_entrez_hgnc}
4
+\alias{load_entrez_hgnc}
5
+\title{Loads table of translation from HGNC to Entrez}
6
+\usage{
7
+load_entrez_hgnc(species)
8
+}
9
+\arguments{
10
+\item{species}{Species of the samples.
11
+
12
+#@examples
13
+#load_entrez_hgnc("hsa")}
14
+}
15
+\value{
16
+Table of translation from HGNC to Entrez
17
+}
18
+\description{
19
+Loads table of translation from HGNC to Entrez
20
+}
0 21
new file mode 100644
... ...
@@ -0,0 +1,15 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/load.R
3
+\name{load_gobp_frame}
4
+\alias{load_gobp_frame}
5
+\title{Loads GO graph information}
6
+\usage{
7
+load_gobp_frame()
8
+}
9
+\value{
10
+GO graph information
11
+}
12
+\description{
13
+#@examples
14
+#load_gobp_frame()
15
+}
0 16
new file mode 100644
... ...
@@ -0,0 +1,15 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/load.R
3
+\name{load_gobp_net}
4
+\alias{load_gobp_net}
5
+\title{Loads GO graph}
6
+\usage{
7
+load_gobp_net()
8
+}
9
+\value{
10
+GO graph
11
+}
12
+\description{
13
+#@examples
14
+#load_gobp_net()
15
+}
0 16
new file mode 100644
... ...
@@ -0,0 +1,20 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/load.R
3
+\name{load_mgi}
4
+\alias{load_mgi}
5
+\title{Loads object with graph information}
6
+\usage{
7
+load_mgi(species)
8
+}
9
+\arguments{
10
+\item{species}{Species of the samples.
11
+
12
+#@examples
13
+#load_mgi("hsa")}
14
+}
15
+\value{
16
+Graph information object
17
+}
18
+\description{
19
+Loads object with graph information
20
+}
0 21
new file mode 100644
... ...
@@ -0,0 +1,45 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/utils.R
3
+\name{load_pathways}
4
+\alias{load_pathways}
5
+\title{Loads the pathways object.}
6
+\usage{
7
+load_pathways(species, pathways_list = NULL)
8
+}
9
+\arguments{
10
+\item{species}{Species of the samples.}
11
+
12
+\item{pathways_list}{Vector of the IDs of the pathways to load. By default
13
+all available pathways are load.}
14
+}
15
+\value{
16
+An pathways object including
17
+* \code{species} Species to which the pathways are related.
18
+* \code{pathigraphs} List of Pathigraph objects. Each Pathigraph contains
19
+the necessary information of a pathway for it to be analyzed
20
+with \code{Hipathia}.
21
+* \code{all_genes} List of all the genes included in the selection of
22
+pathways stored in \code{pathigraphs}.
23
+* \code{eff_norm} Vector of normalization values for effector subpathways.
24
+* \code{path_norm} Vector of normalization values for decomposed
25
+subpathways.
26
+}
27
+\description{
28
+Loads the pathways object, which includes information about the pathways
29
+to be analyzed.
30
+}
31
+\details{
32
+The object of pathways includes information about the pathways and the
33
+subpathways which will be analyzed. This object must be provided to some
34
+of the functions (like \code{hipathia} or \code{quantify_terms}) in the
35
+package. These functions will analyze all the pathways included in this
36
+object. By default, all available pathways are load. In order to restrict
37
+the analysis to a predefined set of pathways, specify the set of pathways
38
+to load with the parameter \code{pathways_list}.
39
+}
40
+\examples{
41
+pathways <- load_pathways("hsa")   # Loads all pathways for human
42
+pathways <- load_pathways("mmu", c("mmu03320", "mmu04024", "mmu05200"))
43
+   # Loads pathways 03320, 04024 and 05200 for mouse
44
+
45
+}
0 46
new file mode 100644
... ...
@@ -0,0 +1,26 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/load.R
3
+\name{load_pseudo_mgi}
4
+\alias{load_pseudo_mgi}
5
+\title{Loads object with pseudo graph information}
6
+\usage{
7
+load_pseudo_mgi(species, group_by)
8
+}
9
+\arguments{
10
+\item{species}{Species of the samples.}
11
+
12
+\item{group_by}{How to group the subpathways to be visualized. By default
13
+they are grouped by the pathway to which they belong. Available groupings
14
+include "uniprot", to group subpathways by their annotated Uniprot functions,
15
+"GO", to group subpathways by their annotated GO terms, and "genes", to group
16
+subpathways by the genes they include.
17
+
18
+#@examples
19
+#load_pseudo_mgi("hsa", "uniprot")}
20
+}
21
+\value{
22
+Pseudo graph information object
23
+}
24
+\description{
25
+Loads object with pseudo graph information
26
+}
0 27
new file mode 100644
... ...
@@ -0,0 +1,20 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/load.R
3
+\name{load_xref}
4
+\alias{load_xref}
5
+\title{Loads table of references}
6
+\usage{
7
+load_xref(species)
8
+}
9
+\arguments{
10
+\item{species}{Species of the samples.
11
+
12
+#@examples
13
+#load_xref("hsa")}
14
+}
15
+\value{
16
+Table of references
17
+}
18
+\description{
19
+Loads table of references
20
+}
0 21
new file mode 100644
... ...
@@ -0,0 +1,52 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/chart.R
3
+\name{multiple_pca_plot}
4
+\alias{multiple_pca_plot}
5
+\title{Plots multiple components of a PCA}
6
+\usage{
7
+multiple_pca_plot(fit, sample_type = NULL, sample_colors = NULL,
8
+  comps = 1:3, plot_variance = FALSE, legend = TRUE, cex = 2,
9
+  pch = 20, main = "Multiple PCA plot", save_png = NULL)
10
+}
11
+\arguments{
12
+\item{fit}{princomp object as returned by \code{do_pca}}
13
+
14
+\item{sample_type}{Vector with the group to which each sample belongs.
15
+The samples must be ordered as in \code{path_vals}.
16
+By default, all samples will be assigned to the same class.}
17
+
18
+\item{sample_colors}{Named character vector of colors. The names of the
19
+colors must be the classes in \code{sample_type}. Each sample will be
20
+assigned the color corresponding to its class, taken from the
21
+\code{sample_type} vector. By default a color will be assigned
22
+automatically to each class.}
23
+
24
+\item{comps}{Vector with the components to be plot}
25
+
26
+\item{plot_variance}{Logical, whether to plot the cumulative variance.}
27
+
28
+\item{legend}{Boolean, whether to plot a legend in the plot.
29
+Default is TRUE.}
30
+
31
+\item{cex}{Graphical parameter from \code{par()} function.}
32
+
33
+\item{pch}{Graphical parameter from \code{par()} function.}
34
+
35
+\item{main}{Main title of the image}
36
+
37
+\item{save_png}{Path to the file where the image as PNG will be saved.
38
+By default, the image is not saved.}
39
+}
40
+\value{
41
+Plots multiple components of a PCA
42
+}
43
+\description{
44
+Plots multiple components of a PCA analysis computed with \code{do_pca}
45
+}
46
+\examples{
47
+data(path_vals)
48
+sample_group <- brca_design[colnames(path_vals),"group"]
49
+pca_model <- do_pca(path_vals[1:ncol(path_vals),])
50
+multiple_pca_plot(pca_model, sample_group, cex = 3, plot_variance = TRUE)
51
+
52
+}
0 53
new file mode 100644
... ...
@@ -0,0 +1,66 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/chart.R
3
+\name{node_color_per_de}
4
+\alias{node_color_per_de}
5
+\title{Colors of the nodes by its differential expression}
6
+\usage{
7
+node_color_per_de(results, metaginfo, groups, group1_label, group2_label,
8
+  group_by = "pathway", colors = "classic", conf = 0.05)
9
+}
10
+\arguments{
11
+\item{results}{Object of results as provided by the \code{hipathia}
12
+function_}
13
+
14
+\item{metaginfo}{Object of pathways_}
15
+
16
+\item{groups}{Vector with the class to which each sample belongs_
17
+Samples must be ordered as in \code{results}}
18
+
19
+\item{group1_label}{String, label of the first group to be compared}
20
+
21
+\item{group2_label}{String, label of the second group to be compared}
22
+
23
+\item{group_by}{How to group the subpathways to be visualized. By default
24
+they are grouped by the pathway to which they belong. Available groupings
25
+include "uniprot", to group subpathways by their annotated Uniprot functions,
26
+"GO", to group subpathways by their annotated GO terms, and "genes", to group
27
+subpathways by the genes they include. Default is set to "pathway".}
28
+
29
+\item{colors}{Either a character vector with 3 colors (indicating,
30
+in this order, down-regulation, non-significance and up-regulation colors)
31
+ or a key name indicating the color scheme to be used. Options are:}
32
+
33
+\item{conf}{Level of significance of the comparison for the adjusted p-value}
34
+}
35
+\value{
36
+List of color vectors, named by the pathways to which they belong.
37
+The color vectors represent the differential expression
38
+of the nodes in each pathway.
39
+}
40
+\description{
41
+Performs a differential expression on the nodes and computes the colors
42
+of the nodes depending on it_ Significant up- and down-regulated nodes
43
+are depicted with the selected color, with a gradient towards the
44
+non-significant color depending on the value of the p-value_
45
+Smaller p-values give rise to purer colors than higher p-values_
46
+}
47
+\section{Slots}{
48
+
49
+\describe{
50
+\item{\code{classic}}{ColorBrewer blue, white and colorBrewer red.}
51
+
52
+\item{\code{hipathia}}{Hipathia predefined color scheme: Green, white and orange.
53
+By default \code{classic} color scheme is applied.}
54
+}}
55
+
56
+\examples{
57
+data(results)
58
+data(brca_design)
59
+data(path_vals)
60
+pathways <- load_pathways(species = "hsa", pathways_list = c("hsa03320",
61
+"hsa04012"))
62
+sample_group <- brca_design[colnames(path_vals),"group"]
63
+colors_de <- node_color_per_de(results, pathways,
64
+sample_group, "Tumor", "Normal")
65
+
66
+}
0 67
new file mode 100644
... ...
@@ -0,0 +1,61 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/stats.R
3
+\name{normalize_data}
4
+\alias{normalize_data}
5
+\title{Normalize expression data to be used in \code{hipathia}}
6
+\usage{
7
+normalize_data(exp_data, by_quantiles = FALSE, by_gene = FALSE,
8
+  percentil = FALSE, truncation_percentil = NULL)
9
+}
10
+\arguments{
11
+\item{exp_data}{Matrix of gene expression.}
12
+
13
+\item{by_quantiles}{Boolean, whether to normalize the data by quantiles.
14
+Default is FALSE.}
15
+
16
+\item{by_gene}{Boolean, whether to transform the rank of each row of the
17
+matrix to [0,1]. Default is FALSE.}
18
+
19
+\item{percentil}{Boolean, whether to take as value the percentil of each
20
+sample in the corresponding distribution.}
21
+
22
+\item{truncation_percentil}{Real number p in [0,1]. When provided, values
23
+beyond percentil p are truncated to the value of percentil p, and values
24
+beyond 1-p are truncated to percentil 1-p. By default no truncation
25
+is performed.}
26
+}
27
+\value{
28
+Matrix of gene expression whose values are in [0,1].
29
+}
30
+\description{
31
+Transforms the rank of the matrix of gene expression to [0,1] in order
32
+to be processed by \code{hipathia}. The transformation may be performed
33
+in two different ways. If \code{percentil = FALSE}, the transformation
34
+is a re-scaling of the rank of the matrix. If \code{percentil = TRUE},
35
+the transformation is performed assigning to each cell its percentil in
36
+the corresponding distribution. This option is recommended for
37
+distributions with very long tails.
38
+}
39
+\details{
40
+This transformation may be applied either to the whole matrix
41
+(by setting \code{by_gene = FALSE}), which we strongly recommend, or to
42
+each of the rows (by setting \code{by_gene = TRUE}), allowing each gene
43
+to have its own scale.
44
+
45
+A previous quantiles normalization may be applied by setting
46
+\code{by_quantiles = TRUE}. This is recommended for noisy data.
47
+
48
+For distributions with extreme outlayer values, a percentil \code{p}
49
+may be given to the parameter \code{truncation_percentil}. When provided,
50
+values beyond percentil p are truncated to the value of percentil p, and
51
+values beyond 1-p are truncated to percentil 1-p. This step is performed
52
+ before any other tranformation. By default no truncation is performed.
53
+}
54
+\examples{
55
+data("brca_data")
56
+trans_data <- translate_matrix(brca_data, "hsa")
57
+exp_data <- normalize_data(trans_data)
58
+exp_data <- normalize_data(trans_data, by_quantiles = TRUE,
59
+truncation_percentil=0.95)
60
+
61
+}
0 62
new file mode 100644
... ...
@@ -0,0 +1,34 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/utils.R
3
+\name{normalize_paths}
4
+\alias{normalize_paths}
5
+\title{Normalize the pathway matrix by rows}
6
+\usage{
7
+normalize_paths(path_vals, metaginfo)
8
+}
9
+\arguments{
10
+\item{path_vals}{Matrix of the pathway values}
11
+
12
+\item{metaginfo}{Pathways object}
13
+}
14
+\value{
15
+Matrix of normalized pathway values
16
+}
17
+\description{
18
+Due to the nature of the Hipathia method, the length of a pathway may
19
+influence its signal rank. In order to compare signal values among
20
+subpathways, we strongly recommend to normalize the matrix with this
21
+normalization.
22
+}
23
+\details{
24
+This function removes the bias caused by the length of the subpathways
25
+by dividing by the value obtained from running the method with a basal
26
+value of 0.5 at each node.
27
+}
28
+\examples{
29
+data(path_vals)
30
+pathways <- load_pathways(species = "hsa", pathways_list = c("hsa03320",
31
+"hsa04012"))
32
+path_normalized <- normalize_paths(path_vals, pathways)
33
+
34
+}
0 35
new file mode 100644
... ...
@@ -0,0 +1,24 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/data.R
3
+\docType{data}
4
+\name{path_vals}
5
+\alias{path_vals}
6
+\title{Pathways matrix of the BRCA gene expression dataset}
7
+\format{Matrix with 40 columns and 1868 rows. Row names are Pathway IDs
8
+and column names are the TCGA identifyers of the samples.}
9
+\usage{
10
+data(path_vals)
11
+}
12
+\value{
13
+Matrix with 40 columns and 1868 rows. Row names are Pathway IDs
14
+and column names are the TCGA identifyers of the samples.
15
+}
16
+\description{
17
+Matrix of pathway activation values for the BRCA dataset. This matrix is
18
+extracted from the Results object returned by the \code{hipathia} function
19
+by means of the \code{get_paths_matrix} function.
20
+}
21
+\details{
22
+\code{path_vals <- get_paths_matrix(results)}
23
+}
24
+\keyword{datasets}
0 25
new file mode 100644
... ...
@@ -0,0 +1,53 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/utils.R
3
+\name{paths_to_go_ancestor}
4
+\alias{paths_to_go_ancestor}
5
+\title{Create path results table with highest significant GO ancestors}
6
+\usage{
7
+paths_to_go_ancestor(pathways, comp_paths, comp_go, pval = 0.05)
8
+}
9
+\arguments{
10
+\item{pathways}{Pathways object}
11
+
12
+\item{comp_paths}{Wilcoxon comparison of the matrix of pathways values
13
+as returned by \code{do_wilcoxon}.}
14
+
15
+\item{comp_go}{Wilcoxon comparison of the matrix of GO values as
16
+returned by \code{do_wilcoxon}.}
17
+
18
+\item{pval}{P-value cut-off. Default values is set to 0.05.}
19
+}
20
+\value{
21
+Table of comparisons with Highest common ancestors
22
+}
23
+\description{
24
+Create table of results with the comparison of the paths together with
25
+the GO functional annotation and the highest significant GO ancestor
26
+(HSGOA).
27
+}
28
+\details{
29
+The table returns in each row: the name of a pathway and its Wilcoxon
30
+comparison information (direction, adjusted p-value), the GO term to which
31
+the path is related (not necessarily unique), the Wilcoxon comparison
32
+informationfor this GO (direction, adjusted p-value), the HSGOA of this
33
+GO and its Wilcoxon comparison information (direction, adjusted p-value).
34
+
35
+The HSGOA is computed as the GO term with minimum level from all the
36
+significant (with respect to value \code{pval}) ancestors of a GO.
37
+The level of a GO term is computed as the number of nodes in the shortest
38
+path from this GO term to the term "GO:0008150". The ancestors of a node
39
+are defined as all the nodes from which a path can be defined from the
40
+ancestor to the node.
41
+}
42
+\examples{
43
+data(comp)
44
+data(go_vals)
45
+data(brca_design)
46
+data(path_vals)
47
+sample_group <- brca_design[colnames(path_vals),"group"]
48
+comp_go <- do_wilcoxon(go_vals, sample_group, g1 = "Tumor", g2 = "Normal")
49
+\dontrun{pathways <- load_pathways(species = "hsa", pathways_list =
50
+c("hsa03320", "hsa04012"))
51
+table <- paths_to_go_ancestor(pathways, comp, comp_go)}
52
+
53
+}
0 54
new file mode 100644
... ...
@@ -0,0 +1,63 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/chart.R
3
+\name{pathway_comparison_plot}
4
+\alias{pathway_comparison_plot}
5
+\title{Plots pathway with colored significant paths}
6
+\usage{
7
+pathway_comparison_plot(comp, metaginfo, pathway, conf = 0.05,
8
+  node_colors = NULL, colors = "classic")
9
+}
10
+\arguments{
11
+\item{comp}{Comparison data frame as returned by the \code{do_wilcox}
12
+function.}
13
+
14
+\item{metaginfo}{Pathways object.}
15
+
16
+\item{pathway}{Name of the pathway to be plotted.}
17
+
18
+\item{conf}{Level of significance of the comparison for the adjusted
19
+p-value. Default is 0.05.}
20
+
21
+\item{node_colors}{List, named by the pathway name, including the
22
+color of each node for each pathway.}
23
+
24
+\item{colors}{Either a character vector with 3 colors (indicating,
25
+in this order, down-regulation, non-significance and up-regulation colors)
26
+or a key name indicating the color scheme to be used. Options are:}
27
+}
28
+\value{
29
+Image in which a pathway is ploted. Edges are colored so that the
30
+UP- and DOWN-activated subpathways are identified.
31
+}
32
+\description{
33
+Plots the layout of a pathway, coloring the significant subpathways
34
+in different colors depending on whether they are significantly up- or
35
+down-regulated. Nodes may be also colored providing a suitable list of
36
+colors for each node. Function \code{node_color_per_de}
37
+assigns colors to the nodes depending on their differential expression.
38
+}
39
+\section{Slots}{
40
+
41
+\describe{
42
+\item{\code{classic}}{ColorBrewer blue, white and colorBrewer red.}
43
+
44
+\item{\code{hipathia}}{Hipathia predefined color scheme: Green, white and orange.
45
+By default \code{classic} color scheme is applied.}
46
+}}
47
+
48
+\examples{
49
+data(comp)
50
+pathways <- load_pathways(species = "hsa", pathways_list = c("hsa03320",
51
+"hsa04012"))
52
+pathway_comparison_plot(comp, metaginfo = pathways, pathway = "hsa03320")
53
+
54
+data(results)
55
+data(brca_design)
56
+data(path_vals)
57
+sample_group <- brca_design[colnames(path_vals),"group"]
58
+colors_de <- node_color_per_de(results, pathways,
59
+sample_group, "Tumor", "Normal")
60
+pathway_comparison_plot(comp, metaginfo = pathways, pathway = "hsa04012",
61
+node_colors = colors_de)
62
+
63
+}
0 64
new file mode 100644
... ...
@@ -0,0 +1,60 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/chart.R
3
+\name{pca_plot}
4
+\alias{pca_plot}
5
+\title{Plots two components of a PCA}
6
+\usage{
7
+pca_plot(fit, sample_type = NULL, sample_colors = NULL, cp1 = 1,
8
+  cp2 = 2, legend = TRUE, legend_xy = "bottomleft", cex = 2, pch = 20,
9
+  mgp = c(3, 1, 0), main = "PCA plot", save_png = NULL)
10
+}
11
+\arguments{
12
+\item{fit}{princomp object as returned by \code{do_pca}}
13
+
14
+\item{sample_type}{Vector with the group to which each sample belongs.
15
+The samples must be ordered as in \code{path_vals}.
16
+By default, all samples will be assigned to the same class.}
17
+
18
+\item{sample_colors}{Named character vector of colors. The names of
19
+the colors must be the classes in \code{sample_type}. Each sample will be
20
+assigned the color corresponding to its class, taken from the
21
+\code{sample_type} vector. By default a color will be assigned
22
+automatically to each class.}
23
+
24
+\item{cp1}{Integer, number of the component in the X-axis.
25
+Default is 1, the first component.}
26
+
27
+\item{cp2}{Integer, number of the component in the Y-axis.
28
+Default is 2, the second component.}
29
+
30
+\item{legend}{Boolean, whether to plot a legend in the plot.
31
+Default is TRUE.}
32
+
33
+\item{legend_xy}{Situation of the legend in the plot. Available
34
+options are: "bottomright", "bottom", "bottomleft", "left",
35
+"topleft", "top", "topright", "right" and "center".}
36
+
37
+\item{cex}{Graphical parameter from \code{par()} function.}
38
+
39
+\item{pch}{Graphical parameter from \code{par()} function.}
40
+
41
+\item{mgp}{Graphical parameter from \code{par()} function.}
42
+
43
+\item{main}{Title of the graphics}
44
+
45
+\item{save_png}{Path to the file where the image as PNG will be saved.
46
+By default, the image is not saved.}
47
+}
48
+\value{
49
+Plots two components of a PCA
50
+}
51
+\description{
52
+Plots two components of a PCA computed with \code{do_pca}
53
+}
54
+\examples{
55
+data(path_vals)
56
+sample_group <- brca_design[colnames(path_vals),"group"]
57
+pca_model <- do_pca(path_vals[1:ncol(path_vals),])
58
+pca_plot(pca_model, sample_group)
59
+
60
+}
0 61
new file mode 100644
... ...
@@ -0,0 +1,41 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/functions.R
3
+\name{quantify_terms}
4
+\alias{quantify_terms}
5
+\title{Computes the level of activation of the functions related to the
6
+previously computed subpathways}
7
+\usage{
8
+quantify_terms(results, metaginfo, dbannot, normalize = TRUE)
9
+}
10
+\arguments{
11
+\item{results}{List of results as returned by the \code{hipathia} function}
12
+
13
+\item{metaginfo}{Pathways object}
14
+
15
+\item{dbannot}{Either a string indicating which precomputed annotation to
16
+use ("uniprot" for Uniprot Keywords or "GO" for Gene Ontology terms), or
17
+a dataframe with the annotation of the genes to the functions. First
18
+column are gene symbols, second column the functions.}
19
+
20
+\item{normalize}{Boolean, whether to normalize the matrix of pathway
21
+values with \code{normalize_paths} before quantifying the signal. Due to
22
+the nature of the Hipathia method, in which the length of each pathway may
23
+alter its signal rank, we strongly recommend to perform this normalization.
24
+This normalization removes the bias. Default is set to TRUE.}
25
+}
26
+\value{
27
+Matrix with the level of activation of the functions in
28
+\code{dbannot}
29
+}
30
+\description{
31
+Computes the level of activation of the functions related to the
32
+previously computed subpathways
33
+}
34
+\examples{
35
+data(results)
36
+pathways <- load_pathways(species = "hsa", pathways_list = c("hsa03320",
37
+"hsa04012"))
38
+go_values <- quantify_terms(results, pathways, "GO")
39
+uniprot_values <- quantify_terms(results, pathways, "uniprot")
40
+
41
+}
0 42
new file mode 100644
... ...
@@ -0,0 +1,18 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/data.R
3
+\docType{data}
4
+\name{results}
5
+\alias{results}
6
+\title{Results object}
7
+\format{Object of results, including pathways information.}
8
+\usage{
9
+data(results)
10
+}
11
+\value{
12
+Object of results, including pathways information.
13
+}
14
+\description{
15
+Results object returned by \code{hipathia::hipathia} function, after calling
16
+\code{results <- hipathia(exp_data, pathways, verbose=TRUE)}
17
+}
18
+\keyword{datasets}
0 19
new file mode 100644
... ...
@@ -0,0 +1,36 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/save.R
3
+\name{save_results}
4
+\alias{save_results}
5
+\title{Save results to folder}
6
+\usage{
7
+save_results(results, comp, metaginfo, output_folder)
8
+}
9
+\arguments{
10
+\item{results}{Results object as returned by the \code{hipathia} function.}
11
+
12
+\item{comp}{Comparison as returned by the \code{do_wilcoxon} function.}
13
+
14
+\item{metaginfo}{Pathways object}
15
+
16
+\item{output_folder}{Absolute path to the folder in which results will be
17
+saved. If this folder does not exist, it will be created.
18
+However, the parent folder must exist.}
19
+}
20
+\value{
21
+Creates a folder in disk in which all the information to browse the
22
+pathway results is stored.
23
+}
24
+\description{
25
+Saves results to a folder. In particular, it saves the matrix of subpathway
26
+values, a table with the results of the provided comparison,
27
+the accuracy of the results and the .SIF and attributes of the pathways.
28
+}
29
+\examples{
30
+data(results)
31
+data(comp)
32
+pathways <- load_pathways(species = "hsa", pathways_list = c("hsa03320",
33
+"hsa04012"))
34
+save_results(results, comp, pathways, "output_results")
35
+
36
+}
0 37
new file mode 100644
... ...
@@ -0,0 +1,28 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/utils.R
3
+\name{translate_matrix}
4
+\alias{translate_matrix}
5
+\title{Translation of the rownames IDs to Entrez IDs.}
6
+\usage{
7
+translate_matrix(exp, species, verbose = TRUE)
8
+}
9
+\arguments{
10
+\item{exp}{Matrix of gene expression.}
11
+
12
+\item{species}{Species of the samples.}
13
+
14
+\item{verbose}{Boolean, whether to show details about the results of the
15
+execution.}
16
+}
17
+\value{
18
+Matrix of gene expression with Entrez IDs as rownames.
19
+}
20
+\description{
21
+Translates the IDs in the rownames of a matrix to Entrez IDs.
22
+For accepted IDs to be transformed see the DOCUMENTATION.
23
+}
24
+\examples{
25
+data("brca_data")
26
+trans_data <- translate_matrix(brca_data, "hsa")
27
+
28
+}
0 29
new file mode 100644
... ...
@@ -0,0 +1,24 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/data.R
3
+\docType{data}
4
+\name{uni_vals}
5
+\alias{uni_vals}
6
+\title{Uniprot matrix of the BRCA gene expression dataset}
7
+\format{Matrix with 40 columns and 142 rows. Row names are Uniprot functions
8
+and column names are the TCGA identifyers of the samples.}
9
+\usage{
10
+data(uni_vals)
11
+}
12
+\value{
13
+Matrix with 40 columns and 142 rows. Row names are Uniprot functions
14
+and column names are the TCGA identifyers of the samples.
15
+}
16
+\description{
17
+Matrix of Uniprot functions activation values for the BRCA dataset.
18
+This matrix is computed from the Results object returned by the
19
+\code{hipathia} function by means of the \code{quantify_terms} function.
20
+}
21
+\details{
22
+\code{uni_vals <- quantify_terms(results, pathways, "uniprot")}
23
+}
24
+\keyword{datasets}
0 25
new file mode 100644
... ...
@@ -0,0 +1,35 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/save.R
3
+\name{visualize_report}
4
+\alias{visualize_report}
5
+\title{Visualize a HiPathia report}
6
+\usage{
7
+visualize_report(output_folder, port = 4000)
8
+}
9
+\arguments{
10
+\item{output_folder}{Folder in which results to visualize are stored}
11
+
12
+\item{port}{Port to use}
13
+}
14
+\value{
15
+The instructions to visualize a HiPathia report in a web browser
16
+}
17
+\description{
18
+Visualize a HiPathia report
19
+}
20
+\examples{
21
+data(results)
22
+data(brca_design)
23
+data(path_vals)
24
+pathways <- load_pathways(species = "hsa", pathways_list = c("hsa03320",
25
+"hsa04012"))
26
+sample_group <- brca_design[colnames(path_vals),"group"]
27
+colors_de <- node_color_per_de(results, pathways,
28
+sample_group, "Tumor", "Normal")
29
+create_report(comp, pathways, "~/save_results/",
30
+node_colors = colors_de)
31
+visualize_report("~/save_results/")
32
+visualize_report("~/save_results/", port=5000)
33
+\dontshow{servr::daemon_stop()}
34
+
35
+}