diff --git a/404.html b/404.html index 04589ad..7dcc1e6 100644 --- a/404.html +++ b/404.html @@ -1,66 +1,27 @@ - - - - + + + + - Page not found (404) • OmicSignature - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - - - - -
-
- + +
+ + + - - -
+
+
-
+ + - - diff --git a/LICENSE-text.html b/LICENSE-text.html index 5c358ab..e0c0600 100644 --- a/LICENSE-text.html +++ b/LICENSE-text.html @@ -1,66 +1,12 @@ - - - - - - - -License • OmicSignature - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -License • OmicSignature - - + + - - -
-
- -
- -
+
+
-
- +
- - + + diff --git a/articles/BRENDA.html b/articles/BRENDA.html index 7d2e838..71ede88 100644 --- a/articles/BRENDA.html +++ b/articles/BRENDA.html @@ -19,6 +19,8 @@ + +
-
-

-Search for a GEO platform

+
+

Search for a GEO platform +

-GEOPlatformSearch("Illumina HiSeq 4000", species = "Homo Sapiens")
-
##      Accession
-## 633   GPL28185
-## 881   GPL27803
-## 1407  GPL26865
-## 1569  GPL26639
-## 2090  GPL25904
-## 2248  GPL25719
-## 2422  GPL25476
-## 2441  GPL25431
-## 2894  GPL24850
-## 4101  GPL23362
-## 5175  GPL22132
-## 6856  GPL20301
-##                                                                         Title
-## 633                    Illumina HiSeq 4000 (Homo sapiens; Plasmodium berghei)
-## 881                       Illumina HiSeq 4000 (Homo sapiens; Pan troglodytes)
-## 1407 Illumina HiSeq 4000 (Canis lupus familiaris; Homo sapiens; Mus musculus)
-## 1569                Illumina HiSeq 4000 ([Haemophilus] ducreyi; Homo sapiens)
-## 2090                Illumina HiSeq 4000 (Homo sapiens; Neisseria gonorrhoeae)
-## 2248             Illumina HiSeq 4000 (Homo sapiens; Human gammaherpesvirus 8)
-## 2422              Illumina HiSeq 4000 (Drosophila melanogaster; Homo sapiens)
-## 2441                         Illumina HiSeq 4000 (Homo sapiens; Mus musculus)
-## 2894                        Illumina HiSeq 4000 (Gallus gallus; Homo sapiens)
-## 4101             Illumina HiSeq 4000 (Homo sapiens; Human gammaherpesvirus 4)
-## 5175                  Illumina HiSeq 4000 (Homo sapiens; Human herpesvirus 4)
-## 6856                                       Illumina HiSeq 4000 (Homo sapiens)
-##                      Technology
-## 633  high-throughput sequencing
-## 881  high-throughput sequencing
-## 1407 high-throughput sequencing
-## 1569 high-throughput sequencing
-## 2090 high-throughput sequencing
-## 2248 high-throughput sequencing
-## 2422 high-throughput sequencing
-## 2441 high-throughput sequencing
-## 2894 high-throughput sequencing
-## 4101 high-throughput sequencing
-## 5175 high-throughput sequencing
-## 6856 high-throughput sequencing
-##                                              Taxonomy Data.Rows Samples.Count
-## 633                   Homo sapiens;Plasmodium berghei         0            31
-## 881                      Homo sapiens;Pan troglodytes         0             9
-## 1407 Canis lupus familiaris;Homo sapiens;Mus musculus         0             5
-## 1569               Homo sapiens;[Haemophilus] ducreyi         0             4
-## 2090               Homo sapiens;Neisseria gonorrhoeae         0           109
-## 2248            Homo sapiens;Human gammaherpesvirus 8         0            27
-## 2422             Drosophila melanogaster;Homo sapiens         0             8
-## 2441                        Homo sapiens;Mus musculus         0            57
-## 2894                       Gallus gallus;Homo sapiens         0             3
-## 4101            Homo sapiens;Human gammaherpesvirus 4         0            49
-## 5175            Homo sapiens;Human gammaherpesvirus 4         0            51
-## 6856                                     Homo sapiens         0         56722
-##      Series.Count Contact Release.Date
-## 633             1     GEO Feb 21, 2020
-## 881             1     GEO Nov 25, 2019
-## 1407            3     GEO Jun 29, 2019
-## 1569            1     GEO May 08, 2019
-## 2090            1     GEO Dec 06, 2018
-## 2248            5     GEO Oct 24, 2018
-## 2422            2     GEO Aug 20, 2018
-## 2441            7     GEO Aug 06, 2018
-## 2894            2     GEO Apr 05, 2018
-## 4101            9     GEO Apr 24, 2017
-## 5175            4     GEO Jul 10, 2016
-## 6856         2501     GEO Jun 09, 2015
+GEOPlatformSearch("Illumina HiSeq 4000", species = "Homo Sapiens")
+
##      Accession
+## 633   GPL28185
+## 881   GPL27803
+## 1407  GPL26865
+## 1569  GPL26639
+## 2090  GPL25904
+## 2248  GPL25719
+## 2422  GPL25476
+## 2441  GPL25431
+## 2894  GPL24850
+## 4101  GPL23362
+## 5175  GPL22132
+## 6856  GPL20301
+##                                                                         Title
+## 633                    Illumina HiSeq 4000 (Homo sapiens; Plasmodium berghei)
+## 881                       Illumina HiSeq 4000 (Homo sapiens; Pan troglodytes)
+## 1407 Illumina HiSeq 4000 (Canis lupus familiaris; Homo sapiens; Mus musculus)
+## 1569                Illumina HiSeq 4000 ([Haemophilus] ducreyi; Homo sapiens)
+## 2090                Illumina HiSeq 4000 (Homo sapiens; Neisseria gonorrhoeae)
+## 2248             Illumina HiSeq 4000 (Homo sapiens; Human gammaherpesvirus 8)
+## 2422              Illumina HiSeq 4000 (Drosophila melanogaster; Homo sapiens)
+## 2441                         Illumina HiSeq 4000 (Homo sapiens; Mus musculus)
+## 2894                        Illumina HiSeq 4000 (Gallus gallus; Homo sapiens)
+## 4101             Illumina HiSeq 4000 (Homo sapiens; Human gammaherpesvirus 4)
+## 5175                  Illumina HiSeq 4000 (Homo sapiens; Human herpesvirus 4)
+## 6856                                       Illumina HiSeq 4000 (Homo sapiens)
+##                      Technology
+## 633  high-throughput sequencing
+## 881  high-throughput sequencing
+## 1407 high-throughput sequencing
+## 1569 high-throughput sequencing
+## 2090 high-throughput sequencing
+## 2248 high-throughput sequencing
+## 2422 high-throughput sequencing
+## 2441 high-throughput sequencing
+## 2894 high-throughput sequencing
+## 4101 high-throughput sequencing
+## 5175 high-throughput sequencing
+## 6856 high-throughput sequencing
+##                                              Taxonomy Data.Rows Samples.Count
+## 633                   Homo sapiens;Plasmodium berghei         0            31
+## 881                      Homo sapiens;Pan troglodytes         0             9
+## 1407 Canis lupus familiaris;Homo sapiens;Mus musculus         0             5
+## 1569               Homo sapiens;[Haemophilus] ducreyi         0             4
+## 2090               Homo sapiens;Neisseria gonorrhoeae         0           109
+## 2248            Homo sapiens;Human gammaherpesvirus 8         0            27
+## 2422             Drosophila melanogaster;Homo sapiens         0             8
+## 2441                        Homo sapiens;Mus musculus         0            57
+## 2894                       Gallus gallus;Homo sapiens         0             3
+## 4101            Homo sapiens;Human gammaherpesvirus 4         0            49
+## 5175            Homo sapiens;Human gammaherpesvirus 4         0            51
+## 6856                                     Homo sapiens         0         56722
+##      Series.Count Contact Release.Date
+## 633             1     GEO Feb 21, 2020
+## 881             1     GEO Nov 25, 2019
+## 1407            3     GEO Jun 29, 2019
+## 1569            1     GEO May 08, 2019
+## 2090            1     GEO Dec 06, 2018
+## 2248            5     GEO Oct 24, 2018
+## 2422            2     GEO Aug 20, 2018
+## 2441            7     GEO Aug 06, 2018
+## 2894            2     GEO Apr 05, 2018
+## 4101            9     GEO Apr 24, 2017
+## 5175            4     GEO Jul 10, 2016
+## 6856         2501     GEO Jun 09, 2015

Show only accession id:

-GEOPlatformSearch("Illumina HiSeq 4000", species = "Homo Sapiens", accession_only = TRUE)
-
##  [1] "GPL28185" "GPL27803" "GPL26865" "GPL26639" "GPL25904" "GPL25719"
-##  [7] "GPL25476" "GPL25431" "GPL24850" "GPL23362" "GPL22132" "GPL20301"
+GEOPlatformSearch("Illumina HiSeq 4000", species = "Homo Sapiens", accession_only = TRUE)
+
##  [1] "GPL28185" "GPL27803" "GPL26865" "GPL26639" "GPL25904" "GPL25719"
+##  [7] "GPL25476" "GPL25431" "GPL24850" "GPL23362" "GPL22132" "GPL20301"

Search for multiple terms:

-GEOPlatformSearch(c("Drosophila melanogaster", "Illumina HiSeq 4000"), species = "Homo Sapiens", contain_all = TRUE)
-
##      Accession                                                       Title
-## 2422  GPL25476 Illumina HiSeq 4000 (Drosophila melanogaster; Homo sapiens)
-##                      Technology                             Taxonomy Data.Rows
-## 2422 high-throughput sequencing Drosophila melanogaster;Homo sapiens         0
-##      Samples.Count Series.Count Contact Release.Date
-## 2422             8            2     GEO Aug 20, 2018
-

Set contain_all = T to show results include all search terms. Set contain_all = FALSE to show results include any of the search terms.

+GEOPlatformSearch(c("Drosophila melanogaster", "Illumina HiSeq 4000"), species = "Homo Sapiens", contain_all = TRUE)
+
##      Accession                                                       Title
+## 2422  GPL25476 Illumina HiSeq 4000 (Drosophila melanogaster; Homo sapiens)
+##                      Technology                             Taxonomy Data.Rows
+## 2422 high-throughput sequencing Drosophila melanogaster;Homo sapiens         0
+##      Samples.Count Series.Count Contact Release.Date
+## 2422             8            2     GEO Aug 20, 2018
+

Set contain_all = T to show results include all search +terms. Set contain_all = FALSE to show results include any +of the search terms.

-
-

+
+

@@ -238,11 +246,13 @@

-

Site built with pkgdown 1.6.1.

+

+

Site built with pkgdown 2.0.7.

@@ -251,5 +261,7 @@

+ + diff --git a/articles/BRENDA_files/header-attrs-2.8/header-attrs.js b/articles/BRENDA_files/header-attrs-2.8/header-attrs.js deleted file mode 100644 index dd57d92..0000000 --- a/articles/BRENDA_files/header-attrs-2.8/header-attrs.js +++ /dev/null @@ -1,12 +0,0 @@ -// Pandoc 2.9 adds attributes on both header and div. We remove the former (to -// be compatible with the behavior of Pandoc < 2.8). -document.addEventListener('DOMContentLoaded', function(e) { - var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); - var i, h, a; - for (i = 0; i < hs.length; i++) { - h = hs[i]; - if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 - a = h.attributes; - while (a.length > 0) h.removeAttribute(a[0].name); - } -}); diff --git a/articles/CreateOmS.html b/articles/CreateOmS.html index 9f21de8..7f5b747 100644 --- a/articles/CreateOmS.html +++ b/articles/CreateOmS.html @@ -19,6 +19,8 @@ + +

-
-

-1. Components to create an OmicSignature Object

-

An OmicSignature object contains three parts:

+
+

1. Components to create an OmicSignature Object +

+

An OmicSignature object contains three parts:

    -
  • metadata, a list containing metadata fields.
    -required fields: “signature_name”, “organism”, “platform”, “direction_type”, “phenotype”.

  • +
  • metadata, a list containing metadata +fields.
    +required fields: “signature_name”, +“organism”, “platform”, +“direction_type”, “phenotype”.

  • signature, a dataframe.
    -required columns: “signature_symbol”, “signature_direction
    +required columns: “signature_symbol”, +“signature_direction
    optional column: “signature_score
    -“signature_symbol” should be a subset of “symbol” in difexp (if present).

  • -
  • difexp (optional), a dataframe of differential expression analysis results.
    -required columns: “id”, “symbol”, “score”, “p_value”.

  • +“signature_symbol” should be a subset of “symbol” in difexp (if +present).

    +
  • difexp (optional), a dataframe of differential +expression analysis results.
    +required columns: “id”, “symbol”, +“score”, “p_value”.

-

Once you have the componants above, you can create your own object:

-
OmicObj <- OmicSignature$new(
-  metadata = metadata,
-  signature = signatures,
-  difexp = difexp
-)
-

Or, you can read an OmicSignature saved in .json format using readJson(). See “here”.

+

Create the object:

+
OmicObj <- OmicSignature$new(
+  metadata = metadata,
+  signature = signatures,
+  difexp = difexp
+)
+

You can also read an OmicSignature saved in .json format +using readJson(). See “here” +for more details.

-
-

-2. Create an OmicSignature Object Step-by-Step

-

The example provided below is from an experiment for Myc gene reduce in mice. Signatures was extracted by comparing the liver of treatment and control when mice is 24-month old. This is a bi-directional signature example, which contains up and down regulated features (genes).

-
-

-2.1. Metadata

-

To be saved into a OmicSignature object, the required metadata fields are:
-“signature_name”, “organism”, “direction_type”.
-Fields not required but highly recommended if available: “platform”, “sample_type”, “phenotype”.
-Additional optional fields can be added, e.g., score_cutoff, adj_p_cutoff, logfc_cutoff, or additional experiment descriptors, which will make the information more complete.

-

One option is to create metadata list by hand:

-
metadata <- list(
-  "signature_name" = Myc_reduce_mice_liver_24m,
-  "organism" = "Mus Musculus",
-  "sample_type" = "liver",
-  "phenotype" = "Myc_reduce",
-  "direction_type" = "bi-directional",
-  "platform" = "GPL6246",
-  "adj_p_cutoff" = 0.05,
-  "score_cutoff" = 7,
-  "keywords" = c("Myc", "KO", "longevity"),
-  "PMID" = 25619689,
-  "year" = 2015
-)
-

Or use the built-in function createMetadata() (recommended). The function reminds you what attributes to include. You can also provide your own customized attributes.
-Click here to see a full list of built-in attributes.

+
+

2. Create an OmicSignature Object Step-by-Step +

+

The example provided below is from an experiment for Myc gene reduce +in mice. Signatures were extracted by comparing the liver of treatment +and control when mice is 24-month old. This is a bi-directional +signature example, which contains up and down regulated features +(genes).

+
+

2.1. Metadata +

+

Required metadata fields:
+“signature_name”, “organism”, +“direction_type”.
+Fields not required, but highly recommended when applicable:
+“phenotype”, “platform”, +“sample_type”, “covariates”, +“score_cutoff”, “adj_p_cutoff”, +“logfc_cutoff”.

+

Option 1: Create metadata by hand (not recommended because typos can +occur)

+
metadata <- list(
+  "signature_name" = Myc_reduce_mice_liver_24m,
+  "organism" = "Mus Musculus",
+  "sample_type" = "liver",
+  "phenotype" = "Myc_reduce",
+  "direction_type" = "bi-directional",
+  "platform" = "GPL6246",
+  "adj_p_cutoff" = 0.05,
+  "score_cutoff" = 7,
+  "keywords" = c("Myc", "KO", "longevity"),
+  "PMID" = 25619689,
+  "year" = 2015
+)
+

Option 2: Use function createMetadata() +(recommended).
+This function helps remind you of the built-in attributes. The full list +of current built-in attributes is shown here.
+You can also provide your own customized attributes.

-metadata <- createMetadata(
-  # examples of build-in attributes:
-  signature_name = "Myc_reduce_mice_liver_24m", # required
-  organism = "Mus Musculus", # required
-  phenotype = "Myc_reduce", # optional but highly recommended
-  direction_type = "bi-directional", # required
-  platform = "GPL6246", # optional but highly recommended; must be a GEO platform ID
-  sample_type = "liver", # optional but highly recommended; must be BRENDA ontology
-  adj_p_cutoff = 0.05,
-  score_cutoff = 7,
-  keywords = c("Myc", "KO", "longevity"),
-  PMID = 25619689,
-  year = 2015,
-  
-  # example of cursomized attributes:
-  animal_strain = "C57BL/6"
-)
-

Note: If “sample_type” is NOT a BRENDA ontology term or “platform” is NOT a valid GEO platform accession ID, you will get warnings. See how to search for the correct term to use in “BRENDA ontology & GEO platform ID” section.

-
-

-2.1.1 Additional info for “direction_type”

-

direction_type is one of:

+metadata <- createMetadata( + # required attributes: + signature_name = "Myc_reduce_mice_liver_24m", + organism = "Mus Musculus", + direction_type = "bi-directional", + + # optional and recommended: + phenotype = "Myc_reduce", + covariates = "none", + platform = "GPL6246", # must be a GEO platform ID + sample_type = "liver", # must be BRENDA ontology + + # optional cut-off attributes. + # specifying them can facilitate the extraction of signatures. + # feel free to delete any that are not relevant. + logfc_cutoff = NULL, + p_value_cutoff = NULL, + adj_p_cutoff = 0.05, + score_cutoff = 7, + + # other optional built-in attributes: + keywords = c("Myc", "KO", "longevity"), + cutoff_description = NULL, + author = NULL, + PMID = 25619689, + year = 2015, + + # example of a customized attribute: + animal_strain = "C57BL/6" +)
+
+

2.1.1 Instruction for “sample_type” and “platform” +

+

If “sample_type” is NOT a BRENDA ontology term, or “platform” is NOT +a valid GEO platform accession ID, you will get warnings. See how to +search for the correct term in “BRENDA +ontology & GEO platform ID”.

+
+
+

2.1.2 Instruction for “direction_type” +

+

direction_type must be one of the following:

    -
  • “uni-directional”. You only have a list of significant feature names but don’t know if they are up or down regulated in the treatment group, or directional information is not applicable.

  • -
  • “bi-directional”. In most cases significant features can be grouped into “up” and “down” regulated features. For example, when comparing treatment vs. control groups, some features will be higher (“up”, or “+”) and some will be lower (“down” or “-”) in treatment.

  • -
  • “multi-directional”. Used with multi-valued categorical phenotypes (e.g., “low” vs. “medium” vs. “high”), usually analyzed by ANOVA. In this case, the “direction” column in signature table should be the phenotype’s value name (e.g., “low”).

  • +
  • “uni-directional”. You only have a list of significant feature +names, and don’t know if they are up or down regulated in the treatment +group, or directional information is not applicable. An example would be +“genes mutated in a disease.”

  • +
  • “bi-directional”. Significant features can be grouped into “up” +and “down” categories. For example, when comparing treatment +vs. control groups, some features will be higher (“up”, or “+”) +and some will be lower (“down” or “-”) in the treatment group. +Similarly, when the phenotype is a continuous trait, such as age, some +features will increase (“up”, or “+”) with age, while others will +decrease (“down”, or “-”).

  • +
  • “multi-directional”. Used with multi-valued categorical +phenotypes (e.g., “low” vs. “medium” vs. “high”), +usually analyzed by ANOVA. In this case, the “direction” column in +signature table should be the phenotype’s category (e.g., “low”).

-
-

-2.2. Diffanal results (difexp)

-

A differential expression analysis matrix is optional but highly recommended if you have it.

-

To be saved into a OmicSignature object, the matrix’ required columns are:
-“id”, “symbol”, “score”, “p_value”.
-“id” is used as an unique identifier in case there are duplicated gene symbols. Frequently used id’s include probe ID, ENSEMBL ID, or unique numbers.

-

Here we show an example of how to derive the difexp object from the results of a differential expression analysis based on the limma package. Output columns include logFC, AveExpr, t, P.Value, adj.P.Val, B score, Probe.ID, gene_symbol, and gene_name. In this example, we use t-test statistic (column t) as the score for the symbols.

+
+

2.2. Diffanal results (difexp) +

+

A differential expression dataframe is optional but +highly recommended if available. It facilitates +downstream signature extraction.

+

difexp is a dataframe with required +columns:
+“id”, “symbol”, +“score”, “p_value”.
+“id” is used as an unique identifier in case there are duplicated +symbols. Frequently used examples including: probe ID, ENSEMBL ID, +UniProt ID, unique numbers.
+“score” is usually t-test statistics or Z-score.

+

Some frequently used optional column names:
+“logfc”, “est”, “aveexpr”, “se”, “robust_se”, “HR”, “adj_p”, +“gene_name”, “gene_annotation”.

+

Here we use an example out put from the differential expression +analysis using the limma package.

-difexp <- read.table(file.path(system.file("extdata", package = "OmicSignature"), "difmatrix_Myc_mice_liver_24m_raw.txt"),
-  header = TRUE, sep = "\t", stringsAsFactors = FALSE
-)
-head(difexp)
-#>         logFC   AveExpr          t    P.Value adj.P.Val         b Probe.ID
-#> 1 -0.09301000  6.676552 -1.0304955 0.33776819 0.7015182 -6.370549 10344614
-#> 2 -0.09837667  2.998012 -1.1161772 0.30194862 0.6735042 -6.281333 10344616
-#> 3 -0.21524000  5.055207 -2.5893972 0.03664519 0.2872695 -4.287330 10344620
-#> 4 -0.12186667 12.056667 -1.5881487 0.15719140 0.5256233 -5.713531 10344624
-#> 5  0.01440000 10.087133  0.2221561 0.83066749 0.9532330 -6.902609 10344633
-#> 6 -0.03361667  9.947465 -0.4638379 0.65713620 0.8842391 -6.810300 10344637
-#>   gene_symbol                                       gene_name
-#> 1     Gm16088                            predicted gene 16088
-#> 2     Gm26206                           predicted gene, 26206
-#> 3     Gm10568                            predicted gene 10568
-#> 4      Lypla1                             lysophospholipase 1
-#> 5       Tcea1       transcription elongation factor A (SII) 1
-#> 6     Atp6v1h ATPase, H+ transporting, lysosomal V1 subunit H
-

You can manually modify the column names to match the requirements. Alternatively, you can use the built-in function replaceDifexpCol(), designed to replace some frequently-used alternative column names.

+difexp <- read.table(file.path(system.file("extdata", package = "OmicSignature"), "difmatrix_Myc_mice_liver_24m_raw.txt"), + header = TRUE, sep = "\t", stringsAsFactors = FALSE +) +head(difexp) +#> logFC AveExpr t P.Value adj.P.Val b Probe.ID +#> 1 -0.09301000 6.676552 -1.0304955 0.33776819 0.7015182 -6.370549 10344614 +#> 2 -0.09837667 2.998012 -1.1161772 0.30194862 0.6735042 -6.281333 10344616 +#> 3 -0.21524000 5.055207 -2.5893972 0.03664519 0.2872695 -4.287330 10344620 +#> 4 -0.12186667 12.056667 -1.5881487 0.15719140 0.5256233 -5.713531 10344624 +#> 5 0.01440000 10.087133 0.2221561 0.83066749 0.9532330 -6.902609 10344633 +#> 6 -0.03361667 9.947465 -0.4638379 0.65713620 0.8842391 -6.810300 10344637 +#> gene_symbol gene_name +#> 1 Gm16088 predicted gene 16088 +#> 2 Gm26206 predicted gene, 26206 +#> 3 Gm10568 predicted gene 10568 +#> 4 Lypla1 lysophospholipase 1 +#> 5 Tcea1 transcription elongation factor A (SII) 1 +#> 6 Atp6v1h ATPase, H+ transporting, lysosomal V1 subunit H
+

We can manually modify the column names to match the requirements. +Alternatively, we can use the built-in function +replaceDifexpCol() designed to replace some frequently used +alternative column names.

-colnames(difexp) <- replaceDifexpCol(colnames(difexp))
-head(difexp)
-#>         logfc   aveexpr      score    p_value     adj_p         b       id
-#> 1 -0.09301000  6.676552 -1.0304955 0.33776819 0.7015182 -6.370549 10344614
-#> 2 -0.09837667  2.998012 -1.1161772 0.30194862 0.6735042 -6.281333 10344616
-#> 3 -0.21524000  5.055207 -2.5893972 0.03664519 0.2872695 -4.287330 10344620
-#> 4 -0.12186667 12.056667 -1.5881487 0.15719140 0.5256233 -5.713531 10344624
-#> 5  0.01440000 10.087133  0.2221561 0.83066749 0.9532330 -6.902609 10344633
-#> 6 -0.03361667  9.947465 -0.4638379 0.65713620 0.8842391 -6.810300 10344637
-#>    symbol                                       gene_name
-#> 1 Gm16088                            predicted gene 16088
-#> 2 Gm26206                           predicted gene, 26206
-#> 3 Gm10568                            predicted gene 10568
-#> 4  Lypla1                             lysophospholipase 1
-#> 5   Tcea1       transcription elongation factor A (SII) 1
-#> 6 Atp6v1h ATPase, H+ transporting, lysosomal V1 subunit H
+colnames(difexp) <- replaceDifexpCol(colnames(difexp)) +head(difexp) +#> logfc aveexpr score p_value adj_p b id +#> 1 -0.09301000 6.676552 -1.0304955 0.33776819 0.7015182 -6.370549 10344614 +#> 2 -0.09837667 2.998012 -1.1161772 0.30194862 0.6735042 -6.281333 10344616 +#> 3 -0.21524000 5.055207 -2.5893972 0.03664519 0.2872695 -4.287330 10344620 +#> 4 -0.12186667 12.056667 -1.5881487 0.15719140 0.5256233 -5.713531 10344624 +#> 5 0.01440000 10.087133 0.2221561 0.83066749 0.9532330 -6.902609 10344633 +#> 6 -0.03361667 9.947465 -0.4638379 0.65713620 0.8842391 -6.810300 10344637 +#> symbol gene_name +#> 1 Gm16088 predicted gene 16088 +#> 2 Gm26206 predicted gene, 26206 +#> 3 Gm10568 predicted gene 10568 +#> 4 Lypla1 lysophospholipase 1 +#> 5 Tcea1 transcription elongation factor A (SII) 1 +#> 6 Atp6v1h ATPase, H+ transporting, lysosomal V1 subunit H
-
-

-2.3. Signature

-

Here we create a bi-directional signature manually from the difexp object, using the filter() function from the dplyr package. In this example, we use the score_cutoff and adj_p_cutoff previously specified in the metadata.

+
+

2.3. Signature +

+

To be stored into an OmicSignature object, signature +need to be a dataframe with column “signature_symbol”. +Also, if the signature is “bi-directional” or “multi-directional” +(specified in direction_type in metadata +list), then column “signature_direction” is also +required.
+An optional column “signature_score” is recommended when feature scores +are available.

+

Option 1: Extract signature from difexp.
+Here we create a bi-directional signature manually from the difexp +generated above, using the score_cutoff and +adj_p_cutoff previously specified in the metadata.

-signatures <- difexp %>%
-  dplyr::filter(abs(score) > metadata$score_cutoff & adj_p < metadata$adj_p_cutoff) %>%
-  dplyr::select(symbol, score) %>%
-  dplyr::mutate(signature_direction = ifelse(score > 0, "+", "-")) %>%
-  dplyr::rename(signature_symbol = "symbol", signature_score = "score")
-head(signatures)
-#>   signature_symbol signature_score signature_direction
-#> 1            Il1r1      -13.542734                   -
-#> 2             Ctse       14.762071                   +
-#> 3            Chil1      -25.413178                   -
-#> 4            Kcnt2       -7.727982                   -
-#> 5          Sh2d1b1        8.818281                   +
-#> 6           Olfr16       -7.010304                   -
-

(note: if you see numbers instead of gene symbol name in the first column, please check if the “symbol” column in your difexp matrix is “character” and not accidentally be “factor”)

-

To be stored into OmicSignature object, signature need to be a dataframe with column “signature_symbol”. Also, if the signature is “bi-directional” or “multi-directional” (specified in direction_type in metadata list), then the column “signature_direction” is also required. “uni-directional” type does not require this column. The optional column “signature_score” is used when feature scores are available.

-

Our function standardizeSigDF() can help you to remove duplicate rows, empty symbols in the signature dataframe, if any.

+signatures <- difexp %>% + dplyr::filter(abs(score) > metadata$score_cutoff & adj_p < metadata$adj_p_cutoff) %>% + dplyr::select(symbol, score) %>% + dplyr::mutate(signature_direction = ifelse(score > 0, "+", "-")) %>% + dplyr::rename(signature_symbol = "symbol", signature_score = "score") +head(signatures) +#> signature_symbol signature_score signature_direction +#> 1 Il1r1 -13.542734 - +#> 2 Ctse 14.762071 + +#> 3 Chil1 -25.413178 - +#> 4 Kcnt2 -7.727982 - +#> 5 Sh2d1b1 8.818281 + +#> 6 Olfr16 -7.010304 -
+

(note: if you see numbers instead of gene symbol name in the first +column, please check if the “symbol” column in your difexp matrix is +“character” and not accidentally be “factor”)

+

Function standardizeSigDF() can help remove duplicate +rows, empty symbols in the signature dataframe.

-signatures <- standardizeSigDF(signatures)
-head(signatures)
-#>    signature_symbol signature_score signature_direction
-#> 1              Saa1       -35.29997                   -
-#> 3           Sult3a1       -31.75527                   -
-#> 4            Isyna1       -29.93255                   -
-#> 6             Chil1       -25.41318                   -
-#> 8              Saa2       -23.81452                   -
-#> 11          Sult1e1       -22.76345                   -
-tail(signatures)
-#>     signature_symbol signature_score signature_direction
-#> 339              Cfp        7.040545                   +
-#> 340        Igkv9-124        7.031580                   +
-#> 341           Mtnr1a        7.030133                   +
-#> 343          Clec12a        7.024170                   +
-#> 344           Angpt2        7.021941                   +
-#> 345             Gas2        7.013040                   +
-

Alternatively, you can provide signatures as a character vector. For example:

-
signatures <- c("gene1", "gene2", "gene3")
-

Or as a numeric vector and provide symbols as its name:

-
signatures <- c(0.45, -3.21, 2.44)
-names(signatures) <- c("gene1", "gene2", "gene3")
-

If direction_type in metadata is set to be “bi-directional”, the direction will be determined by whether a symbol has a positive or negative score.

+signatures <- standardizeSigDF(signatures) +head(signatures) +#> signature_symbol signature_score signature_direction +#> 1 Saa1 -35.29997 - +#> 3 Sult3a1 -31.75527 - +#> 4 Isyna1 -29.93255 - +#> 6 Chil1 -25.41318 - +#> 8 Saa2 -23.81452 - +#> 11 Sult1e1 -22.76345 - +tail(signatures) +#> signature_symbol signature_score signature_direction +#> 339 Cfp 7.040545 + +#> 340 Igkv9-124 7.031580 + +#> 341 Mtnr1a 7.030133 + +#> 343 Clec12a 7.024170 + +#> 344 Angpt2 7.021941 + +#> 345 Gas2 7.013040 +
+

Option 2: Manually write signature.
+For uni-directional signatures:

+
signatures <- c("gene1", "gene2", "gene3")
+

For bi-directional signatures:

+
signatures <- c(0.45, -3.21, 2.44)
+names(signatures) <- c("gene1", "gene2", "gene3")
+

The direction will be automatically determined by the score value +provided.

-
-

-2.4. Create OmicSignature object

-

We have everything we need now.
-Use OmicSignature$new() to create a new OmicSignature R6 object.

+
+

2.4. Create the OmicSignature object +

+

Use OmicSignature$new() to create a new OmicSignature R6 +object.

-OmicObj <- OmicSignature$new(
-  metadata = metadata,
-  signature = signatures,
-  difexp = difexp
-)
-#>   [Success] OmicSignature object Myc_reduce_mice_liver_24m created.
-

Use print() to see its information:

+OmicObj <- OmicSignature$new( + metadata = metadata, + signature = signatures, + difexp = difexp +) +#> [Success] OmicSignature object Myc_reduce_mice_liver_24m created.
+

You can also ask the program to print the messages while creating the +OmicSignature Object. By default, print_message is set to +be FALSE.

-print(OmicObj)
-#> Signature Object: 
-#>   Metadata: 
-#>     adj_p_cutoff = 0.05 
-#>     animal_strain = C57BL/6 
-#>     covariates = none 
-#>     direction_type = bi-directional 
-#>     keywords = Myc, KO, longevity 
-#>     organism = Mus Musculus 
-#>     phenotype = Myc_reduce 
-#>     platform = GPL6246 
-#>     PMID = 25619689 
-#>     sample_type = liver 
-#>     score_cutoff = 7 
-#>     signature_name = Myc_reduce_mice_liver_24m 
-#>     year = 2015 
-#>   signature: 
-#>     - (152)
-#>     + (194)
-#>   Differential Expression Data: 
-#>     27359 x 9
-

You can also ask the program to print the messages while creating the OmicSignature Object. By default, print_message is set to be FALSE.

+OmicObj <- OmicSignature$new( + metadata = metadata, + signature = signatures, + difexp = difexp, + print_message = TRUE +) +#> --Required attributes for metadata: signature_name, organism, direction_type -- +#> [Success] Metadata is saved. +#> [Success] Signature is valid. +#> difexp: additional columns found: logfc, aveexpr, p_value, b, gene_name. +#> [Success] difexp matrix is valid. +#> [Success] OmicSignature object Myc_reduce_mice_liver_24m created.
+

Now we can print() to see the information:

-OmicObj <- OmicSignature$new(
-  metadata = metadata,
-  signature = signatures,
-  difexp = difexp,
-  print_message = TRUE
-)
-#>   --Required attributes for metadata: signature_name, organism, direction_type --
-#>   [Success] Metadata is saved. 
-#>   [Success] Signature is valid. 
-#>   difexp: additional columns found: logfc, aveexpr, p_value, b, gene_name. 
-#>   [Success] difexp matrix is valid. 
-#>   [Success] OmicSignature object Myc_reduce_mice_liver_24m created.
+print(OmicObj) +#> Signature Object: +#> Metadata: +#> adj_p_cutoff = 0.05 +#> animal_strain = C57BL/6 +#> covariates = none +#> direction_type = bi-directional +#> keywords = Myc, KO, longevity +#> organism = Mus Musculus +#> phenotype = Myc_reduce +#> platform = GPL6246 +#> PMID = 25619689 +#> sample_type = liver +#> score_cutoff = 7 +#> signature_name = Myc_reduce_mice_liver_24m +#> year = 2015 +#> signature: +#> - (152) +#> + (194) +#> Differential Expression Data: +#> 27359 x 9
+

And use new criteria to extract new significant features:
+(note: this does not change the signature saved in +the object)

+
+OmicObj$extractSignature("abs(score) > 25; adj_p < 0.001")
+#>    symbol     score direction
+#> 1    Saa1 -35.29997         -
+#> 2    Cpa1  34.62008         +
+#> 3 Sult3a1 -31.75527         -
+#> 4  Isyna1 -29.93255         -
+#> 5    Zg16  28.51562         +
+#> 6   Chil1 -25.41318         -
+

See more in “Functionalities +of OmicSignature” section.

-
-

-3. Create an OmicSignature from difexp and metadata +
+

3. Create an OmicSignature from difexp and +metadata

-

You can by-pass the generating signature process once you are an expert. Simply provide cutoffs in metadata, and OmicSigFromDifexp() will extract signatures from the difexp provided according to those criteria, and create the OmicSignature object for you.

-

Remember to provide cutoffs, e.g. adj_p_cutoff and score_cutoff in metadata, and make sure your input difexp has those columns.

-
-OmicObj1 <- OmicSigFromDifexp(difexp, metadata)
-#> -- criterias used to extract signatures:  abs(score) > 7; adj_p < 0.05 . 
-#> 
-#>   [Success] OmicSignature object Myc_reduce_mice_liver_24m created.
-OmicObj1
-#> Signature Object: 
-#>   Metadata: 
-#>     adj_p_cutoff = 0.05 
-#>     animal_strain = C57BL/6 
-#>     covariates = none 
-#>     direction_type = bi-directional 
-#>     keywords = Myc, KO, longevity 
-#>     organism = Mus Musculus 
-#>     phenotype = Myc_reduce 
-#>     platform = GPL6246 
-#>     PMID = 25619689 
-#>     sample_type = liver 
-#>     score_cutoff = 7 
-#>     signature_name = Myc_reduce_mice_liver_24m 
-#>     year = 2015 
-#>   signature: 
-#>     - (152)
-#>     + (194)
-#>   Differential Expression Data: 
-#>     27359 x 9
-

See the top signatures:

+

You can by-pass the generating signature process once you are an +expert. Simply provide cutoffs (e.g. adj_p_cutoff and +score_cutoff) in the metadata, make sure +difexp has those columns available, and use +OmicSigFromDifexp() to extract significant features and +create the OmicSignature object.

-head(OmicObj1$signature %>% dplyr::arrange(desc(abs(signature_score))))
-#>   signature_symbol signature_score signature_direction
-#> 1             Saa1       -35.29997                   -
-#> 2             Cpa1        34.62008                   +
-#> 3          Sult3a1       -31.75527                   -
-#> 4           Isyna1       -29.93255                   -
-#> 5             Zg16        28.51562                   +
-#> 6            Chil1       -25.41318                   -
+OmicObj1 <- OmicSigFromDifexp(difexp, metadata) +#> -- criterias used to extract signatures: abs(score) > 7; adj_p < 0.05 . +#> +#> [Success] OmicSignature object Myc_reduce_mice_liver_24m created. +OmicObj1 +#> Signature Object: +#> Metadata: +#> adj_p_cutoff = 0.05 +#> animal_strain = C57BL/6 +#> covariates = none +#> direction_type = bi-directional +#> keywords = Myc, KO, longevity +#> organism = Mus Musculus +#> phenotype = Myc_reduce +#> platform = GPL6246 +#> PMID = 25619689 +#> sample_type = liver +#> score_cutoff = 7 +#> signature_name = Myc_reduce_mice_liver_24m +#> year = 2015 +#> signature: +#> - (152) +#> + (194) +#> Differential Expression Data: +#> 27359 x 9

-
-

+
+

@@ -383,11 +478,13 @@

-

Site built with pkgdown 1.6.1.

+

+

Site built with pkgdown 2.0.7.

@@ -396,5 +493,7 @@

+ + diff --git a/articles/CreateOmSC.html b/articles/CreateOmSC.html index 0b90012..3921e69 100644 --- a/articles/CreateOmSC.html +++ b/articles/CreateOmSC.html @@ -19,6 +19,8 @@ + +

-
-

-Create an OmicSignatureCollection Object

-

This object contains several OmicSignature objects to facilitate further analysis.

-

An OmicSignatureCollection object contains two parts:

+
+

Create an OmicSignatureCollection Object +

+

This object contains several OmicSignature objects to +facilitate further analysis.

+

An OmicSignatureCollection object contains two +parts:

  • metadata

  • OmicSigList, a list of OmicSignature Objects

-
-

-1. Create an OmicSignatureCollection object

-

Use OmicSignatureCollection$new() and provide metadata and a list of OmicSignature objects:

+
+

1. Create an OmicSignatureCollection object +

+

Use OmicSignatureCollection$new() and provide metadata +and a list of OmicSignature objects:

-OmicCol <- OmicSignatureCollection$new(
-  OmicSigList = list(OmicObj1, OmicObj2, OmicObj3),
-  metadata = ColMeta,
-  print_message = FALSE
-)
+OmicCol <- OmicSignatureCollection$new( + OmicSigList = list(OmicObj1, OmicObj2, OmicObj3), + metadata = ColMeta, + print_message = FALSE +)
-
-

-2. Metadata for the collection

-

The required fields for metadata are: “collection_name”, “description”.
+

+

2. Metadata for the collection +

+

The required fields for metadata are: +“collection_name”, +“description”.
Additional optional fields can be added.

-ColMeta <- list(
-  "collection_name" = "Myc_mice_collection",
-  "description" = "A collection for Myc reduced mice 24 month",
-  "organism" = "Mus Musculus",
-  "author" = "me"
-)
+ColMeta <- list( + "collection_name" = "Myc_mice_collection", + "description" = "A collection for Myc reduced mice 24 month", + "organism" = "Mus Musculus", + "author" = "me" +)
-
-

-3. OmicSignature objects

-

The OmicSignature objects to include in the collection can be created manually, see here. In this example, we use read.json() function to read OmicSignature objects we previously created.

+
+

3. OmicSignature objects +

+

The OmicSignature objects to include in the collection +can be created manually, see here. +In this example, we use read.json() function to read +OmicSignature objects we previously created.

-OmicObj1 <- readJson(file.path(system.file("extdata", package = "OmicSignature"), "Myc_reduce_mice_adipose_24m_obj.json"))
-#>   [Success] OmicSignature object Myc_reduce_mice_adipose_24m created.
-OmicObj2 <- readJson(file.path(system.file("extdata", package = "OmicSignature"), "Myc_reduce_mice_muscle_24m_obj.json"))
-#>   [Success] OmicSignature object Myc_reduce_mice_muscle_24m created.
-OmicObj3 <- readJson(file.path(system.file("extdata", package = "OmicSignature"), "Myc_reduce_mice_liver_24m_obj.json"))
-#>   [Success] OmicSignature object Myc_reduce_mice_liver_24m created.
-

By default, print_message is set to FALSE. You can change it to TRUE to see the messages. During the creation of OmicSignatureCollection object, all input OmicSignature objects will be re-created to make sure they are all valid.

+OmicObj1 <- readJson(file.path(system.file("extdata", package = "OmicSignature"), "Myc_reduce_mice_adipose_24m_obj.json")) +#> [Success] OmicSignature object Myc_reduce_mice_adipose_24m created. +OmicObj2 <- readJson(file.path(system.file("extdata", package = "OmicSignature"), "Myc_reduce_mice_muscle_24m_obj.json")) +#> [Success] OmicSignature object Myc_reduce_mice_muscle_24m created. +OmicObj3 <- readJson(file.path(system.file("extdata", package = "OmicSignature"), "Myc_reduce_mice_liver_24m_obj.json")) +#> [Success] OmicSignature object Myc_reduce_mice_liver_24m created.
+

By default, print_message is set to FALSE. +You can change it to TRUE to see the messages. During the +creation of OmicSignatureCollection object, all input +OmicSignature objects will be re-created to make sure they +are all valid.

-
-

+
+

@@ -165,11 +180,13 @@

-

Site built with pkgdown 1.6.1.

+

+

Site built with pkgdown 2.0.7.

@@ -178,5 +195,7 @@

+ + diff --git a/articles/CreateOmSC_files/header-attrs-2.8/header-attrs.js b/articles/CreateOmSC_files/header-attrs-2.8/header-attrs.js deleted file mode 100644 index dd57d92..0000000 --- a/articles/CreateOmSC_files/header-attrs-2.8/header-attrs.js +++ /dev/null @@ -1,12 +0,0 @@ -// Pandoc 2.9 adds attributes on both header and div. We remove the former (to -// be compatible with the behavior of Pandoc < 2.8). -document.addEventListener('DOMContentLoaded', function(e) { - var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); - var i, h, a; - for (i = 0; i < hs.length; i++) { - h = hs[i]; - if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 - a = h.attributes; - while (a.length > 0) h.removeAttribute(a[0].name); - } -}); diff --git a/articles/CreateOmS_files/header-attrs-2.8/header-attrs.js b/articles/CreateOmS_files/header-attrs-2.8/header-attrs.js deleted file mode 100644 index dd57d92..0000000 --- a/articles/CreateOmS_files/header-attrs-2.8/header-attrs.js +++ /dev/null @@ -1,12 +0,0 @@ -// Pandoc 2.9 adds attributes on both header and div. We remove the former (to -// be compatible with the behavior of Pandoc < 2.8). -document.addEventListener('DOMContentLoaded', function(e) { - var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); - var i, h, a; - for (i = 0; i < hs.length; i++) { - h = hs[i]; - if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 - a = h.attributes; - while (a.length > 0) h.removeAttribute(a[0].name); - } -}); diff --git a/articles/FunOmS.html b/articles/FunOmS.html index 80b12f8..134133a 100644 --- a/articles/FunOmS.html +++ b/articles/FunOmS.html @@ -19,6 +19,8 @@ + +

-
-

-Read an OmicSignature object from a json file

+
+

Read an OmicSignature object from a json file +

-OmicObj <- readJson(file.path(system.file("extdata", package = "OmicSignature"), "Myc_reduce_mice_liver_24m_obj.json"))
-#>   [Success] OmicSignature object Myc_reduce_mice_liver_24m created.
+OmicObj <- readJson(file.path(system.file("extdata", package = "OmicSignature"), "Myc_reduce_mice_liver_24m_obj.json")) +#> [Success] OmicSignature object Myc_reduce_mice_liver_24m created.
-
-

-Write an OmicSignature object into a json file

-
writeJson(OmicObj, "Myc_reduce_mice_liver_24m.json")
+
+

Write an OmicSignature object into a json file +

+
writeJson(OmicObj, "Myc_reduce_mice_liver_24m.json")
- -
-

-Extract new signatures from the OmicSignature object

-

We can use new criterias to extract new signatures conveniently from the OmicSignature Object, if it has difexp matrix included.
-For example, extract all features with a t-score with absolute value higher than 20 and adj_p less than 0.001:

+
+

Extract new signatures from the OmicSignature +object +

+

We can use new criterias to extract new signatures conveniently from +the OmicSignature Object, if it has difexp matrix +included.
+For example, extract all features with a t-score with absolute value +higher than 20 and adj_p less than 0.001:

-OmicObj$extractSignature("abs(score) > 20; adj_p < 0.001")
-#>           symbol    score direction
-#> 1           Saa1 -35.3000         -
-#> 2           Cpa1  34.6201         +
-#> 3        Sult3a1 -31.7553         -
-#> 4         Isyna1 -29.9326         -
-#> 5           Zg16  28.5156         +
-#> 6          Chil1 -25.4132         -
-#> 7  2210010C04Rik  24.5445         +
-#> 8           Saa2 -23.8145         -
-#> 9          Cidec  23.3957         +
-#> 10        Amy2a5  22.9129         +
-#> 11       Sult1e1 -22.7635         -
-#> 12           Pf4  21.7126         +
-#> 13          Orm3 -21.2509         -
-#> 14          Cpb1  20.9806         +
+OmicObj$extractSignature("abs(score) > 20; adj_p < 0.001") +#> symbol score direction +#> 1 Saa1 -35.3000 - +#> 2 Cpa1 34.6201 + +#> 3 Sult3a1 -31.7553 - +#> 4 Isyna1 -29.9326 - +#> 5 Zg16 28.5156 + +#> 6 Chil1 -25.4132 - +#> 7 2210010C04Rik 24.5445 + +#> 8 Saa2 -23.8145 - +#> 9 Cidec 23.3957 + +#> 10 Amy2a5 22.9129 + +#> 11 Sult1e1 -22.7635 - +#> 12 Pf4 21.7126 + +#> 13 Orm3 -21.2509 - +#> 14 Cpb1 20.9806 +
-
-

+
+

@@ -179,11 +186,13 @@

-

Site built with pkgdown 1.6.1.

+

+

Site built with pkgdown 2.0.7.

@@ -192,5 +201,7 @@

+ + diff --git a/articles/FunOmSC.html b/articles/FunOmSC.html index fcc70b5..fa83645 100644 --- a/articles/FunOmSC.html +++ b/articles/FunOmSC.html @@ -19,6 +19,8 @@ + +

-

First create an OmicSignatureCollection object. This is the same code in “Create OmicSignatureCollection” section.

+

First create an OmicSignatureCollection object. This is +the same code in “Create +OmicSignatureCollection” section.

-OmicObj1 <- readJson(file.path(system.file("extdata", package = "OmicSignature"), "Myc_reduce_mice_adipose_24m_obj.json"))
-#>   [Success] OmicSignature object Myc_reduce_mice_adipose_24m created.
-OmicObj2 <- readJson(file.path(system.file("extdata", package = "OmicSignature"), "Myc_reduce_mice_muscle_24m_obj.json"))
-#>   [Success] OmicSignature object Myc_reduce_mice_muscle_24m created.
-OmicObj3 <- readJson(file.path(system.file("extdata", package = "OmicSignature"), "Myc_reduce_mice_liver_24m_obj.json"))
-#>   [Success] OmicSignature object Myc_reduce_mice_liver_24m created.
-ColMeta <- list(
-  "collection_name" = "Myc_mice_collection",
-  "description" = "A collection for Myc reduced mice 24 month",
-  "organism" = "Mus Musculus",
-  "author" = "me"
-)
-OmicCol <- OmicSignatureCollection$new(
-  OmicSigList = list(OmicObj1, OmicObj2, OmicObj3),
-  metadata = ColMeta,
-  print_message = FALSE
-)
-#>   [Success] OmicSignature Collection Myc_mice_collection created.
- +
+ -

$metadataSummary() will print out the metadata fields in all OmicSignature objects stored in the OmicSignatureCollection.
-When parameter “only_shared” is set to be TRUE, only shared metadata fields among all OmicSignature objects will be included. Otherwise, all metadata fields will be included.

+

$metadataSummary() will print out the metadata fields in +all OmicSignature objects stored in the +OmicSignatureCollection.
+When parameter “only_shared” is set to be TRUE, only shared +metadata fields among all OmicSignature objects will be +included. Otherwise, all metadata fields will be included.

-OmicCol$metadataSummary(only_shared = TRUE)
-#>                Myc_reduce_mice_adipose_24m   Myc_reduce_mice_muscle_24m  
-#> adj_p_cutoff   0.05                          0.05                        
-#> covariates     "none"                        "none"                      
-#> direction_type "bi-directional"              "bi-directional"            
-#> keywords       character,3                   character,3                 
-#> logfc_cutoff   0                             0                           
-#> organism       "Mus Musculus"                "Mus Musculus"              
-#> phenotype      "Myc_reduce"                  "Myc_reduce"                
-#> platform       "GPL6246"                     "GPL6246"                   
-#> PMID           25619689                      25619689                    
-#> sample_type    "adipose tissue"              "muscle"                    
-#> score_cutoff   7                             7                           
-#> signature_name "Myc_reduce_mice_adipose_24m" "Myc_reduce_mice_muscle_24m"
-#> year           2015                          2015                        
-#>                Myc_reduce_mice_liver_24m  
-#> adj_p_cutoff   0.05                       
-#> covariates     "none"                     
-#> direction_type "bi-directional"           
-#> keywords       character,3                
-#> logfc_cutoff   0                          
-#> organism       "Mus Musculus"             
-#> phenotype      "Myc_reduce"               
-#> platform       "GPL6246"                  
-#> PMID           25619689                   
-#> sample_type    "liver"                    
-#> score_cutoff   7                          
-#> signature_name "Myc_reduce_mice_liver_24m"
-#> year           2015
+OmicCol$metadataSummary(only_shared = TRUE) +#> Myc_reduce_mice_adipose_24m Myc_reduce_mice_muscle_24m +#> adj_p_cutoff 0.05 0.05 +#> covariates "none" "none" +#> direction_type "bi-directional" "bi-directional" +#> keywords character,3 character,3 +#> logfc_cutoff 0 0 +#> organism "Mus Musculus" "Mus Musculus" +#> phenotype "Myc_reduce" "Myc_reduce" +#> platform "GPL6246" "GPL6246" +#> PMID 25619689 25619689 +#> sample_type "adipose tissue" "muscle" +#> score_cutoff 7 7 +#> signature_name "Myc_reduce_mice_adipose_24m" "Myc_reduce_mice_muscle_24m" +#> year 2015 2015 +#> Myc_reduce_mice_liver_24m +#> adj_p_cutoff 0.05 +#> covariates "none" +#> direction_type "bi-directional" +#> keywords character,3 +#> logfc_cutoff 0 +#> organism "Mus Musculus" +#> phenotype "Myc_reduce" +#> platform "GPL6246" +#> PMID 25619689 +#> sample_type "liver" +#> score_cutoff 7 +#> signature_name "Myc_reduce_mice_liver_24m" +#> year 2015
-
-

-Extract new signatures from the OmicSignatureCollection object

-

For example, extract all features with a absolute score > 25 and adj_p < 0.001 from all the OmicSignature object stored in this Collection.
+

+

Extract new signatures from the OmicSignatureCollection +object +

+

For example, extract all features with a absolute score > 25 and +adj_p < 0.001 from all the OmicSignature object stored +in this Collection.
By default, the features are ranked by score.
-By default, bind is set to be TRUE to output results from all OmicSignature objects as a single dataframe.

+By default, bind is set to be TRUE to output +results from all OmicSignature objects as a single +dataframe.

-OmicCol$extractSignature("abs(score) > 25 & adj_p < 0.05")
-#>                       sig_name    symbol    score direction
-#> 1  Myc_reduce_mice_adipose_24m    Crisp1  85.2374         +
-#> 2  Myc_reduce_mice_adipose_24m    Akr1b7  49.0361         +
-#> 3  Myc_reduce_mice_adipose_24m      Pcp4  40.2846         +
-#> 5  Myc_reduce_mice_adipose_24m    Spink8  36.2846         +
-#> 15   Myc_reduce_mice_liver_24m      Cpa1  34.6201         +
-#> 6  Myc_reduce_mice_adipose_24m       Kap  30.6262         +
-#> 7  Myc_reduce_mice_adipose_24m     Ces5a  30.0132         +
-#> 18   Myc_reduce_mice_liver_24m      Zg16  28.5156         +
-#> 9  Myc_reduce_mice_adipose_24m    Defb26  27.7851         +
-#> 13  Myc_reduce_mice_muscle_24m       Alb  27.7297         +
-#> 10 Myc_reduce_mice_adipose_24m      Smcp  27.3482         +
-#> 11 Myc_reduce_mice_adipose_24m   Sprr2a2  27.2045         +
-#> 12 Myc_reduce_mice_adipose_24m Serpina1f  25.5037         +
-#> 4  Myc_reduce_mice_adipose_24m      Mmp7 -36.8727         -
-#> 14   Myc_reduce_mice_liver_24m      Saa1    -35.3         -
-#> 16   Myc_reduce_mice_liver_24m   Sult3a1 -31.7553         -
-#> 17   Myc_reduce_mice_liver_24m    Isyna1 -29.9326         -
-#> 8  Myc_reduce_mice_adipose_24m   Ighv3-5 -29.0765         -
-#> 19   Myc_reduce_mice_liver_24m     Chil1 -25.4132         -
-

If bind is set to be FALSE, the output of each OmicSignature objects are provided individually as one element in a list.

+OmicCol$extractSignature("abs(score) > 25 & adj_p < 0.05") +#> sig_name symbol score direction +#> 1 Myc_reduce_mice_adipose_24m Crisp1 85.2374 + +#> 2 Myc_reduce_mice_adipose_24m Akr1b7 49.0361 + +#> 3 Myc_reduce_mice_adipose_24m Pcp4 40.2846 + +#> 5 Myc_reduce_mice_adipose_24m Spink8 36.2846 + +#> 15 Myc_reduce_mice_liver_24m Cpa1 34.6201 + +#> 6 Myc_reduce_mice_adipose_24m Kap 30.6262 + +#> 7 Myc_reduce_mice_adipose_24m Ces5a 30.0132 + +#> 18 Myc_reduce_mice_liver_24m Zg16 28.5156 + +#> 9 Myc_reduce_mice_adipose_24m Defb26 27.7851 + +#> 13 Myc_reduce_mice_muscle_24m Alb 27.7297 + +#> 10 Myc_reduce_mice_adipose_24m Smcp 27.3482 + +#> 11 Myc_reduce_mice_adipose_24m Sprr2a2 27.2045 + +#> 12 Myc_reduce_mice_adipose_24m Serpina1f 25.5037 + +#> 4 Myc_reduce_mice_adipose_24m Mmp7 -36.8727 - +#> 14 Myc_reduce_mice_liver_24m Saa1 -35.3 - +#> 16 Myc_reduce_mice_liver_24m Sult3a1 -31.7553 - +#> 17 Myc_reduce_mice_liver_24m Isyna1 -29.9326 - +#> 8 Myc_reduce_mice_adipose_24m Ighv3-5 -29.0765 - +#> 19 Myc_reduce_mice_liver_24m Chil1 -25.4132 -
+

If bind is set to be FALSE, the output of +each OmicSignature objects are provided individually as one +element in a list.

-OmicCol$extractSignature("abs(score) > 25 & adj_p < 0.05", bind = F)
-#> $Myc_reduce_mice_adipose_24m
-#>       symbol    score direction
-#> 1     Crisp1  85.2374         +
-#> 2     Akr1b7  49.0361         +
-#> 3       Pcp4  40.2846         +
-#> 4       Mmp7 -36.8727         -
-#> 5     Spink8  36.2846         +
-#> 6        Kap  30.6262         +
-#> 7      Ces5a  30.0132         +
-#> 8    Ighv3-5 -29.0765         -
-#> 9     Defb26  27.7851         +
-#> 10      Smcp  27.3482         +
-#> 11   Sprr2a2  27.2045         +
-#> 12 Serpina1f  25.5037         +
-#> 
-#> $Myc_reduce_mice_muscle_24m
-#>   symbol   score direction
-#> 1    Alb 27.7297         +
-#> 
-#> $Myc_reduce_mice_liver_24m
-#>    symbol    score direction
-#> 1    Saa1    -35.3         -
-#> 2    Cpa1  34.6201         +
-#> 3 Sult3a1 -31.7553         -
-#> 4  Isyna1 -29.9326         -
-#> 5    Zg16  28.5156         +
-#> 6   Chil1 -25.4132         -
+OmicCol$extractSignature("abs(score) > 25 & adj_p < 0.05", bind = F) +#> $Myc_reduce_mice_adipose_24m +#> symbol score direction +#> 1 Crisp1 85.2374 + +#> 2 Akr1b7 49.0361 + +#> 3 Pcp4 40.2846 + +#> 4 Mmp7 -36.8727 - +#> 5 Spink8 36.2846 + +#> 6 Kap 30.6262 + +#> 7 Ces5a 30.0132 + +#> 8 Ighv3-5 -29.0765 - +#> 9 Defb26 27.7851 + +#> 10 Smcp 27.3482 + +#> 11 Sprr2a2 27.2045 + +#> 12 Serpina1f 25.5037 + +#> +#> $Myc_reduce_mice_muscle_24m +#> symbol score direction +#> 1 Alb 27.7297 + +#> +#> $Myc_reduce_mice_liver_24m +#> symbol score direction +#> 1 Saa1 -35.3 - +#> 2 Cpa1 34.6201 + +#> 3 Sult3a1 -31.7553 - +#> 4 Isyna1 -29.9326 - +#> 5 Zg16 28.5156 + +#> 6 Chil1 -25.4132 -
-
-

+
+

@@ -235,11 +251,13 @@

-

Site built with pkgdown 1.6.1.

+

+

Site built with pkgdown 2.0.7.

@@ -248,5 +266,7 @@

+ + diff --git a/articles/FunOmSC_files/header-attrs-2.8/header-attrs.js b/articles/FunOmSC_files/header-attrs-2.8/header-attrs.js deleted file mode 100644 index dd57d92..0000000 --- a/articles/FunOmSC_files/header-attrs-2.8/header-attrs.js +++ /dev/null @@ -1,12 +0,0 @@ -// Pandoc 2.9 adds attributes on both header and div. We remove the former (to -// be compatible with the behavior of Pandoc < 2.8). -document.addEventListener('DOMContentLoaded', function(e) { - var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); - var i, h, a; - for (i = 0; i < hs.length; i++) { - h = hs[i]; - if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 - a = h.attributes; - while (a.length > 0) h.removeAttribute(a[0].name); - } -}); diff --git a/articles/FunOmS_files/header-attrs-2.8/header-attrs.js b/articles/FunOmS_files/header-attrs-2.8/header-attrs.js deleted file mode 100644 index dd57d92..0000000 --- a/articles/FunOmS_files/header-attrs-2.8/header-attrs.js +++ /dev/null @@ -1,12 +0,0 @@ -// Pandoc 2.9 adds attributes on both header and div. We remove the former (to -// be compatible with the behavior of Pandoc < 2.8). -document.addEventListener('DOMContentLoaded', function(e) { - var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); - var i, h, a; - for (i = 0; i < hs.length; i++) { - h = hs[i]; - if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 - a = h.attributes; - while (a.length > 0) h.removeAttribute(a[0].name); - } -}); diff --git a/articles/ObjectStructure.html b/articles/ObjectStructure.html index 0f1ada2..7f8e1b8 100644 --- a/articles/ObjectStructure.html +++ b/articles/ObjectStructure.html @@ -19,6 +19,8 @@ + +