diff --git a/docs/404.html b/docs/404.html new file mode 100644 index 0000000..c39eb79 --- /dev/null +++ b/docs/404.html @@ -0,0 +1,118 @@ + + + + + + + +Page not found (404) • SCATE.shortcourse + + + + + + + + + + + +
+
+ + + + +
+
+ + +Content not found. Please use links in the navbar. + +
+ + + +
+ + + + +
+ + + + + + + + diff --git a/docs/LICENSE.html b/docs/LICENSE.html index 43df7c6..28da970 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -1,55 +1,12 @@ - - - - - - - -CC0 1.0 Universal • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -CC0 1.0 Universal • SCATE.shortcourse - + + - - -
-
- -
-
+
-
-

-creative commons

+
+

creative commons

-
+

CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN “AS-IS” BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER.

-
-

-Statement of Purpose

+
+

Statement of Purpose

The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an “owner”) of an original work of authorship and/or a database (each, a “Work”).

Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works (“Commons”) that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.

For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the “Affirmer”), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.

-
    -
  1. +
    1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights (“Copyright and Related Rights”). Copyright and Related Rights include, but are not limited to, the following:

      -

      i. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;

      -

      ii. moral rights retained by the original author(s) and/or performer(s);

      -

      iii. publicity and privacy rights pertaining to a person’s image or likeness depicted in a Work;

      -

      iv. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;

      -

      v. rights protecting the extraction, dissemination, use and reuse of data in a Work;

      -

      vi. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and

      -

      vii. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.

      -
    2. +
      1. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;

      2. +
      3. moral rights retained by the original author(s) and/or performer(s);

      4. +
      5. publicity and privacy rights pertaining to a person’s image or likeness depicted in a Work;

      6. +
      7. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;

      8. +
      9. rights protecting the extraction, dissemination, use and reuse of data in a Work;

      10. +
      11. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and

      12. +
      13. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.

      14. +
    3. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer’s Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the “Waiver”). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer’s heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer’s express Statement of Purpose.

    4. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer’s express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer’s Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the “License”). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer’s express Statement of Purpose.

    5. Limitations and Disclaimers.

      -

      a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.

      -

      b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.

      -

      c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person’s Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.

      -

      d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.

      -
    6. -
    -
+
  1. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.

  2. +
  3. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.

  4. +
  5. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person’s Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.

  6. +
  7. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.

  8. +
+
+ +
-
- + +
+ + + - - + diff --git a/docs/articles/01_rphenoscape.html b/docs/articles/01_rphenoscape.html index 15a9c13..59d64ce 100644 --- a/docs/articles/01_rphenoscape.html +++ b/docs/articles/01_rphenoscape.html @@ -6,18 +6,21 @@ RPhenoscape Tutorial • SCATE.shortcourse - - - + + + + + - - + - + + +
-
-

-1. Introduction

-

The desired input of many comparative studies is a matrix that includes all the data available for a set of traits and a focal taxon. Bringing similar types of trait data together across studies is notoriously difficult, but is straightforward with ontology annotations. Trait data that are tagged using similar ontology terms can be automatically called using R functions.

-

This workshop uses trait data for vertebrates that has been annotated (tagged) with ontology terms. These data are accessed from the Phenoscape KB. In this lesson we use R functions to obtain and view character matrices from the KB, obtain synthetic matrices of inferred presence/absence characters, and understand the meaning and relations of ontology terms. The lesson assumes basic knowledge of R and RStudio.

+
+

1. Introduction +

+

The desired input of many comparative studies is a matrix that +includes all the data available for a set of traits and a focal taxon. +Bringing similar types of trait data together across studies is +notoriously difficult, but is straightforward with ontology annotations. +Trait data that are tagged using similar ontology terms can be +automatically called using R functions.

+

This workshop uses trait data for vertebrates that has been annotated +(tagged) with ontology terms. These data are accessed from the Phenoscape KB. In this lesson we +use R functions to obtain and view character matrices from the KB, +obtain synthetic matrices of inferred presence/absence characters, and +understand the meaning and relations of ontology terms. The lesson +assumes basic knowledge of R and RStudio.

-
-

-2. Browse and filter data in the KB to understand the scope of available data.

-

You would like to understand the evolution of morphological traits in a taxonomic group, and you need a matrix to map to your (typically molecular) phylogenetic tree. You come to the Phenoscape KB to see what types of data are available across the members of your clade. In this exercise, you are an ichthyologist, interested in catfishes (Siluriformes), specifically the bullhead catfishes in the family Ictaluridae.

-

You begin by querying ‘Siluriformes’ in the Phenoscape KB faceted browsing page (http://kb.phenoscape.org/#/facet). You immediately see the scope of the data:

+
+

2. Browse and filter data in the KB to understand the scope of +available data. +

+

You would like to understand the evolution of morphological traits in +a taxonomic group, and you need a matrix to map to your (typically +molecular) phylogenetic tree. You come to the Phenoscape KB to see what +types of data are available across the members of your clade. In this +exercise, you are an ichthyologist, interested in catfishes +(Siluriformes), specifically the bullhead catfishes in the family +Ictaluridae.

+

You begin by querying ‘Siluriformes’ in the Phenoscape KB faceted browsing page. You +immediately see the scope of the data:

From left to right across the top tabs, for ‘Siluriformes’:

    -
  • There are 4,537 unique phenotypes
  • -
  • There are 292,340 taxon annotations
  • -
  • There are 1,452 siluriform taxa with data in the KB
  • -
  • There are 25 publications in the KB that include catfish phenotypes
  • -
  • There are 18,430 candidate genes linked to the phenotypes
  • +
  • There are 4,969 unique phenotypes
  • +
  • There are 292,853 taxon annotations
  • +
  • There are 1,505 siluriform taxa with data in the KB
  • +
  • There are 40 publications in the KB that include catfish +phenotypes
  • +
  • There are 19,232 candidate genes linked to the phenotypes
-

Taxon annotations are the ontology terms tagged to original free text descriptions of phenotypes for each siluriform taxon. Click on the ‘Taxon annotations’ tab, and then the ‘Sources’ box on the right hand side of each row to see the publication source(s) and free text description of the phenotype to which each ontology annotation was tagged.

-

You are specifically interested in Ictaluridae (bullhead catfishes), and you click on that family in the faceted browsing interface. Now filter using ‘fin’ as the anatomical entity under ‘Query’ and include parts (check the ‘parts’ box.)

-

Download these taxa and their morphological trait data using the link provided.

-

Go to the publications tab, which shows nine publications that contain fin data. Note that any of these studies, e.g., Lundberg (1992), can be entered under ‘publications’ in faceted browsing, but the original matrix cannot be downloaded.

+

Taxon annotations are the ontology terms tagged to original free text +descriptions of phenotypes for each siluriform taxon. Click on the +‘Taxon annotations’ tab, and then the ‘Sources’ box on the right hand +side of each row to see the publication source(s) and free text +description of the phenotype to which each ontology annotation was +tagged.

+

You are specifically interested in Ictaluridae (bullhead catfishes), +and you click on that family in the faceted browsing interface. Now +filter using ‘fin’ as the anatomical entity under ‘Query’ and include +parts (check the ‘parts’ box.)

+

Download these taxa and their morphological trait data using the link +provided.

+

Go to the publications tab, which shows nine publications that +contain fin data. Note that any of these studies, e.g., Lundberg (1992), +can be entered under ‘publications’ in faceted browsing, but the +original matrix cannot be downloaded.

-
-

-3. Retrieve term info using RPhenoscape

-

Now we will repeat some of the above steps in R, beginning with a query for ‘Ictaluridae’ and ‘fin’ (including parts) to retrieve the list of studies that contain fin characters for this taxon.

-

The RPhenoscape package provides convenient access to the Phenoscape Knowledgebase in the form of R functions returning R-native data structures. So that we don’t have to prefix every call of the package’s functions with the package name, we will first attach the package:

-
library(rphenoscape)
-

First let’s look up information about the query terms. You can use the term detail functions pk_anatomical_detail(), pk_taxon_detail(), pk_phenotype_detail(), and pk_gene_detail() to retrieve an ontology term’s ID, label, and definition.

-

For example, view the details for the anatomy term “fin”:

-
pk_anatomical_detail("fin")
-#>   label
-#> 1   fin
-#>                                                                                           definition
-#> 1 An external projection of an aquatic animal as a fish used in propelling or guiding the body[BTO].
-#>                                              id
-#> 1 http://purl.obolibrary.org/obo/UBERON_0008897
-

You can also use find_term() to search the ontologies in the KB for partial name matches. For example, search for terms containing the string “pectoral fin” in the label or synonym:

-
find_term("pectoral fin")
-#>                                               id
-#> 1  http://purl.obolibrary.org/obo/UBERON_0000151
-#> 2     http://purl.obolibrary.org/obo/ZFA_0001161
-#> 3  http://purl.obolibrary.org/obo/UBERON_2005316
-#> 4  http://purl.obolibrary.org/obo/UBERON_0003934
-#> 5     http://purl.obolibrary.org/obo/ZFA_0001000
-#> 6  http://purl.obolibrary.org/obo/UBERON_0003413
-#> 7  http://purl.obolibrary.org/obo/UBERON_0003372
-#> 8  http://purl.obolibrary.org/obo/UBERON_4300228
-#> 9  http://purl.obolibrary.org/obo/UBERON_0002534
-#> 10    http://purl.obolibrary.org/obo/ZFA_0000085
-#> 11 http://purl.obolibrary.org/obo/UBERON_0004710
-#> 12 http://purl.obolibrary.org/obo/UBERON_0005419
-#> 13 http://purl.obolibrary.org/obo/UBERON_4300172
-#> 14    http://purl.obolibrary.org/obo/ZFA_0000141
-#> 15 http://purl.obolibrary.org/obo/UBERON_0005729
-#> 16 http://purl.obolibrary.org/obo/UBERON_0007300
-#> 17 http://purl.obolibrary.org/obo/UBERON_0007269
-#> 18 http://purl.obolibrary.org/obo/UBERON_0010710
-#> 19 http://purl.obolibrary.org/obo/UBERON_0007302
-#> 20 http://purl.obolibrary.org/obo/UBERON_4500007
-#> 21 http://purl.obolibrary.org/obo/UBERON_4500010
-#> 22 http://purl.obolibrary.org/obo/UBERON_2001993
-#> 23 http://purl.obolibrary.org/obo/UBERON_2000544
-#> 24 http://purl.obolibrary.org/obo/UBERON_4300147
-#> 25 http://purl.obolibrary.org/obo/UBERON_2001456
-#> 26 http://purl.obolibrary.org/obo/UBERON_2005317
-#> 27 http://purl.obolibrary.org/obo/UBERON_4300261
-#> 28    http://purl.obolibrary.org/obo/ZFA_0001551
-#> 29 http://purl.obolibrary.org/obo/UBERON_4000175
-#> 30 http://purl.obolibrary.org/obo/UBERON_2001761
-#> 31 http://purl.obolibrary.org/obo/UBERON_2001762
-#> 32 http://purl.obolibrary.org/obo/UBERON_2001763
-#> 33 http://purl.obolibrary.org/obo/UBERON_2001764
-#> 34 http://purl.obolibrary.org/obo/UBERON_2001765
-#> 35 http://purl.obolibrary.org/obo/UBERON_2001766
-#> 36 http://purl.obolibrary.org/obo/UBERON_2001767
-#> 37 http://purl.obolibrary.org/obo/UBERON_2001586
-#> 38 http://purl.obolibrary.org/obo/UBERON_2201586
-#> 39 http://purl.obolibrary.org/obo/UBERON_2101586
-#> 40 http://purl.obolibrary.org/obo/UBERON_4440009
-#> 41 http://purl.obolibrary.org/obo/UBERON_2001787
-#> 42 http://purl.obolibrary.org/obo/UBERON_4300103
-#> 43     http://purl.obolibrary.org/obo/GO_0035118
-#> 44     http://purl.obolibrary.org/obo/GO_0033339
-#> 45     http://purl.obolibrary.org/obo/GO_0035138
-#> 46    http://purl.obolibrary.org/obo/ZFA_0000257
-#> 47    http://purl.obolibrary.org/obo/ZFA_0000789
-#> 48    http://purl.obolibrary.org/obo/ZFA_0005545
-#> 49    http://purl.obolibrary.org/obo/ZFA_0001588
-#> 50    http://purl.obolibrary.org/obo/ZFA_0001453
-#> 51    http://purl.obolibrary.org/obo/ZFA_0005317
-#> 52    http://purl.obolibrary.org/obo/ZFA_0005766
-#> 53    http://purl.obolibrary.org/obo/ZFA_0001586
-#> 54    http://purl.obolibrary.org/obo/ZFA_0000943
-#>                                                   label
-#> 1                                          pectoral fin
-#> 2                              pectoral fin (zebrafish)
-#> 3                             fin fold pectoral fin bud
-#> 4                               mesenchyme pectoral fin
-#> 5                   mesenchyme pectoral fin (zebrafish)
-#> 6                     pectoral appendage bud mesenchyme
-#> 7                       pectoral appendage bud ectoderm
-#> 8                           pectoral fin bud mesenchyme
-#> 9                                            paired fin
-#> 10 apical ectodermal ridge pectoral fin bud (zebrafish)
-#> 11                                   pectoral appendage
-#> 12                               pectoral appendage bud
-#> 13                                     pectoral fin bud
-#> 14                         pectoral fin bud (zebrafish)
-#> 15                             pectoral appendage field
-#> 16                      pectoral appendage blood vessel
-#> 17                       pectoral appendage musculature
-#> 18                                pectoral fin skeleton
-#> 19                       pectoral appendage vasculature
-#> 20                                     pectoral fin ray
-#> 21                          unbranched pectoral fin ray
-#> 22                            branched pectoral fin ray
-#> 23                          pectoral fin actinotrichium
-#> 24                                    pectoral fin base
-#> 25                       pectoral fin endoskeletal disc
-#> 26                                    pectoral fin fold
-#> 27                                    pectoral fin hook
-#> 28              pectoral fin lepidotrichium (zebrafish)
-#> 29                          pectoral fin lepidotrichium
-#> 30                                   pectoral fin ray 1
-#> 31                                   pectoral fin ray 2
-#> 32                                   pectoral fin ray 3
-#> 33                                   pectoral fin ray 4
-#> 34                                   pectoral fin ray 5
-#> 35                                   pectoral fin ray 6
-#> 36                                   pectoral fin ray 7
-#> 37                             pectoral fin radial bone
-#> 38                        pectoral fin radial cartilage
-#> 39                          pectoral fin radial element
-#> 40                         pectoral fin radial skeleton
-#> 41                                   pectoral fin spine
-#> 42                         rudimentary pectoral fin ray
-#> 43                 embryonic pectoral fin morphogenesis
-#> 44                             pectoral fin development
-#> 45                           pectoral fin morphogenesis
-#> 46                   pectoral fin cartilage (zebrafish)
-#> 47                mesoderm pectoral fin bud (zebrafish)
-#> 48              pectoral fin actinotrichium (zebrafish)
-#> 49               pectoral fin distal radial (zebrafish)
-#> 50                       pectoral fin field (zebrafish)
-#> 51                        pectoral fin fold (zebrafish)
-#> 52                   pectoral fin plate fat (zebrafish)
-#> 53                      pectoral fin radial (zebrafish)
-#> 54                    pectoral fin skeleton (zebrafish)
-#>                                  isDefinedBy matchType
-#> 1  http://purl.obolibrary.org/obo/uberon.owl     exact
-#> 2     http://purl.obolibrary.org/obo/zfa.owl   partial
-#> 3  http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 4  http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 5     http://purl.obolibrary.org/obo/zfa.owl   partial
-#> 6  http://purl.obolibrary.org/obo/uberon.owl     broad
-#> 7  http://purl.obolibrary.org/obo/uberon.owl     broad
-#> 8  http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 9  http://purl.obolibrary.org/obo/uberon.owl     broad
-#> 10    http://purl.obolibrary.org/obo/zfa.owl   partial
-#> 11 http://purl.obolibrary.org/obo/uberon.owl     broad
-#> 12 http://purl.obolibrary.org/obo/uberon.owl     broad
-#> 13 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 14    http://purl.obolibrary.org/obo/zfa.owl   partial
-#> 15 http://purl.obolibrary.org/obo/uberon.owl     broad
-#> 16 http://purl.obolibrary.org/obo/uberon.owl     broad
-#> 17 http://purl.obolibrary.org/obo/uberon.owl     broad
-#> 18 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 19 http://purl.obolibrary.org/obo/uberon.owl     broad
-#> 20 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 21 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 22 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 23 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 24 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 25 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 26 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 27 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 28    http://purl.obolibrary.org/obo/zfa.owl   partial
-#> 29 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 30 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 31 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 32 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 33 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 34 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 35 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 36 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 37 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 38 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 39 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 40 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 41 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 42 http://purl.obolibrary.org/obo/uberon.owl   partial
-#> 43     http://purl.obolibrary.org/obo/go.owl   partial
-#> 44     http://purl.obolibrary.org/obo/go.owl   partial
-#> 45     http://purl.obolibrary.org/obo/go.owl   partial
-#> 46    http://purl.obolibrary.org/obo/zfa.owl   partial
-#> 47    http://purl.obolibrary.org/obo/zfa.owl   partial
-#> 48    http://purl.obolibrary.org/obo/zfa.owl   partial
-#> 49    http://purl.obolibrary.org/obo/zfa.owl   partial
-#> 50    http://purl.obolibrary.org/obo/zfa.owl   partial
-#> 51    http://purl.obolibrary.org/obo/zfa.owl   partial
-#> 52    http://purl.obolibrary.org/obo/zfa.owl   partial
-#> 53    http://purl.obolibrary.org/obo/zfa.owl   partial
-#> 54    http://purl.obolibrary.org/obo/zfa.owl   partial
-

There are several parameters to narrow and filter search results. For example, the parameter matchType allows restricting to exact matches only:

-
find_term("pectoral fin", matchTypes = c("exact"))
-#>                                              id        label
-#> 1 http://purl.obolibrary.org/obo/UBERON_0000151 pectoral fin
-#>                                 isDefinedBy matchType
-#> 1 http://purl.obolibrary.org/obo/uberon.owl     exact
-

For a specific taxon, such as Siluriformes, you can view the taxon rank, term label, whether or not the taxon is extinct, its common name, and ID:

-
pk_taxon_detail("Siluriformes")
-#>                                          rank.id rank.label        label
-#> 1 http://purl.obolibrary.org/obo/TAXRANK_0000003      order Siluriformes
-#>   extinct common_name                                         id
-#> 1   FALSE     catfish http://purl.obolibrary.org/obo/VTO_0034991
-

Ontology terms are related to each other by superclass (parent) and subclass (child) relationships, among other relationships such as part_of. You can use the term classification functions pk_anatomical_class(), pk_taxon_class(), and pk_phenotype_class()to view the superclass and subclass relationships for anatomy, taxonomy, or phenotypic quality terms.

-

For example, view the relationships for “pectoral fin”:

-
pk_anatomical_class("pectoral fin")
-#> Querying the IRI for pectoral fin
-#> Retrieving classification information
-#> $label
-#> [1] "pectoral fin"
-#> 
-#> $subClassOf
-#>                                             @id              label
-#> 1 http://purl.obolibrary.org/obo/UBERON_0002534         paired fin
-#> 2 http://purl.obolibrary.org/obo/UBERON_0004710 pectoral appendage
-#> 
-#> $equivalentTo
-#> list()
-#> 
-#> $superClassOf
-#>                                                                                                                                                                                                                                                                                         @id
-#> 1                                                                                                                                                                                                                                             http://purl.obolibrary.org/obo/UBERON_4200003
-#> 2                                                                                                                                                                                                                                                http://purl.obolibrary.org/obo/ZFA_0001161
-#> 3 http://purl.org/phenoscape/subclassof?value=%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FUBERON_0000151%3E%0A+and+%28%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FBFO_0000050%3E+some+%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FUBERON_0002548%3E%29#159c0d7e-73f8-4a97-84f7-d86b51652dfc
-#> 4 http://purl.org/phenoscape/subclassof?value=%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FUBERON_0000151%3E%0A+and+%28%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FBFO_0000050%3E+some+%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FUBERON_0002548%3E%29#0888ae16-5bb4-4cbc-8d22-425d25edf5d3
-#> 5 http://purl.org/phenoscape/subclassof?value=%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FUBERON_0000151%3E%0A+and+%28%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FBFO_0000050%3E+some+%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FUBERON_0000069%3E%29#a4bfb82c-cc6e-402a-a5b9-d0a8956df76a
-#> 6 http://purl.org/phenoscape/subclassof?value=%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FUBERON_0000151%3E%0A+and+%28%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FBFO_0000050%3E+some+%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FUBERON_0000069%3E%29#4ae642ac-9e5a-4a19-82d2-4e5d7e636723
-#>                                          label
-#> 1                           archipterygial fin
-#> 2                     pectoral fin (zebrafish)
-#> 3        pectoral fin and (part_of some larva)
-#> 4        pectoral fin and (part_of some larva)
-#> 5 pectoral fin and (part_of some larval stage)
-#> 6 pectoral fin and (part_of some larval stage)
-#> 
-#> $`@id`
-#> [1] "http://purl.obolibrary.org/obo/UBERON_0000151"
-

Note that because the KB integrates model organism phenotypes, the results show types of pectoral fin specific to model organisms, such as “pectoral fin (zebrafish)”.

+
+

3. Retrieve term info using RPhenoscape +

+

Now we will repeat some of the above steps in R, beginning with a +query for ‘Ictaluridae’ and ‘fin’ (including parts) to retrieve the list +of studies that contain fin characters for this taxon.

+

The RPhenoscape +package provides convenient access to the Phenoscape Knowledgebase in +the form of R functions returning R-native data structures. So that we +don’t have to prefix every call of the package’s functions with the +package name, we will first attach the package:

+ +

First let’s look up information about the query terms. The find_term() +function searches the KB for terms matching a given search text, and +will return the ID (term IRI), label, source ontology IRI, and type of +match (e.g., exact, broad). For example, search for terms containing the +string “fin” in the label or synonym:

+
+find_term("fin")
+#>                                               id
+#> 1  http://purl.obolibrary.org/obo/UBERON_0008897
+#> 2  http://purl.obolibrary.org/obo/UBERON_0002389
+#> 3  http://purl.obolibrary.org/obo/UBERON_0009565
+#> 4  http://purl.obolibrary.org/obo/UBERON_0009552
+#> 5     http://purl.obolibrary.org/obo/ZFA_0000108
+#> 6  http://purl.obolibrary.org/obo/UBERON_2005316
+#> 7      http://purl.obolibrary.org/obo/GO_0033333
+#> 8      http://purl.obolibrary.org/obo/GO_0033334
+#> 9      http://purl.obolibrary.org/obo/GO_0031101
+#> 10     http://purl.obolibrary.org/obo/HP_0001231
+#> 11     http://purl.obolibrary.org/obo/HP_0001161
+#> 12     http://purl.obolibrary.org/obo/HP_0001187
+#> 13     http://purl.obolibrary.org/obo/HP_0001238
+#> 14     http://purl.obolibrary.org/obo/HP_0001166
+#> 15     http://purl.obolibrary.org/obo/HP_0001182
+#> 16     http://purl.obolibrary.org/obo/HP_0001817
+#> 17     http://purl.obolibrary.org/obo/HP_0001500
+#> 18     http://purl.obolibrary.org/obo/HP_0001821
+#> 19     http://purl.obolibrary.org/obo/HP_0004095
+#> 20     http://purl.obolibrary.org/obo/HP_0004097
+#> 21     http://purl.obolibrary.org/obo/HP_0002213
+#> 22     http://purl.obolibrary.org/obo/HP_0004099
+#> 23     http://purl.obolibrary.org/obo/HP_0006101
+#> 24     http://purl.obolibrary.org/obo/HP_0006107
+#> 25     http://purl.obolibrary.org/obo/HP_0001812
+#> 26     http://purl.obolibrary.org/obo/HP_0001804
+#> 27     http://purl.obolibrary.org/obo/HP_0005867
+#> 28     http://purl.obolibrary.org/obo/HP_0007477
+#> 29     http://purl.obolibrary.org/obo/HP_0009380
+#> 30     http://purl.obolibrary.org/obo/HP_0008391
+#> 31     http://purl.obolibrary.org/obo/HP_0010525
+#> 32     http://purl.obolibrary.org/obo/HP_0009700
+#> 33     http://purl.obolibrary.org/obo/HP_0009381
+#> 34     http://purl.obolibrary.org/obo/HP_0010557
+#> 35     http://purl.obolibrary.org/obo/HP_0008402
+#> 36     http://purl.obolibrary.org/obo/HP_0010554
+#> 37     http://purl.obolibrary.org/obo/HP_0025131
+#> 38     http://purl.obolibrary.org/obo/HP_0025261
+#> 39     http://purl.obolibrary.org/obo/HP_0011300
+#> 40     http://purl.obolibrary.org/obo/HP_0031090
+#> 41     http://purl.obolibrary.org/obo/HP_0030367
+#> 42     http://purl.obolibrary.org/obo/HP_0030837
+#> 43     http://purl.obolibrary.org/obo/HP_0030771
+#> 44     http://purl.obolibrary.org/obo/HP_0030033
+#> 45     http://purl.obolibrary.org/obo/HP_0030029
+#> 46     http://purl.obolibrary.org/obo/HP_0012742
+#> 47     http://purl.obolibrary.org/obo/HP_0012276
+#> 48     http://purl.obolibrary.org/obo/HP_0100759
+#> 49     http://purl.obolibrary.org/obo/HP_0034037
+#> 50     http://purl.obolibrary.org/obo/HP_0045089
+#> 51     http://purl.obolibrary.org/obo/HP_0100798
+#> 52     http://purl.obolibrary.org/obo/HP_0040019
+#> 53     http://purl.obolibrary.org/obo/HP_0100807
+#> 54     http://purl.obolibrary.org/obo/HP_0045090
+#> 55     http://purl.obolibrary.org/obo/HP_0033976
+#> 56     http://purl.obolibrary.org/obo/MP_0000561
+#> 57     http://purl.obolibrary.org/obo/MP_0000562
+#> 58     http://purl.obolibrary.org/obo/MP_0003807
+#> 59     http://purl.obolibrary.org/obo/MP_0000564
+#> 60     http://purl.obolibrary.org/obo/MP_0002544
+#> 61     http://purl.obolibrary.org/obo/MP_0006296
+#> 62     http://purl.obolibrary.org/obo/MP_0009930
+#> 63     http://purl.obolibrary.org/obo/MP_0030929
+#> 64     http://purl.obolibrary.org/obo/MP_0030930
+#> 65 http://purl.obolibrary.org/obo/UBERON_4000172
+#> 66 http://purl.obolibrary.org/obo/UBERON_4400005
+#> 67    http://purl.obolibrary.org/obo/ZFA_0001058
+#> 68    http://purl.obolibrary.org/obo/VTO_0013147
+#> 69    http://purl.obolibrary.org/obo/VTO_0003107
+#> 70    http://purl.obolibrary.org/obo/VTO_0021975
+#> 71    http://purl.obolibrary.org/obo/VTO_0018051
+#> 72    http://purl.obolibrary.org/obo/VTO_0016713
+#> 73    http://purl.obolibrary.org/obo/VTO_0015894
+#> 74    http://purl.obolibrary.org/obo/VTO_0023422
+#> 75    http://purl.obolibrary.org/obo/VTO_0023456
+#> 76    http://purl.obolibrary.org/obo/VTO_0028227
+#> 77    http://purl.obolibrary.org/obo/VTO_0023261
+#> 78    http://purl.obolibrary.org/obo/VTO_0025094
+#> 79    http://purl.obolibrary.org/obo/VTO_0023240
+#> 80    http://purl.obolibrary.org/obo/VTO_0024763
+#> 81    http://purl.obolibrary.org/obo/VTO_0029180
+#> 82    http://purl.obolibrary.org/obo/VTO_0031838
+#> 83    http://purl.obolibrary.org/obo/VTO_0059371
+#> 84    http://purl.obolibrary.org/obo/VTO_0059142
+#> 85    http://purl.obolibrary.org/obo/VTO_0063879
+#> 86    http://purl.obolibrary.org/obo/VTO_0062623
+#> 87    http://purl.obolibrary.org/obo/VTO_0073037
+#> 88    http://purl.obolibrary.org/obo/VTO_0066755
+#> 89    http://purl.obolibrary.org/obo/VTO_0069689
+#> 90    http://purl.obolibrary.org/obo/VTO_0068161
+#> 91    http://purl.obolibrary.org/obo/VTO_0073687
+#>                                      label
+#> 1                                      fin
+#> 2                             manual digit
+#> 3                     nail of manual digit
+#> 4           distal segment of manual digit
+#> 5                          fin (zebrafish)
+#> 6                fin fold pectoral fin bud
+#> 7                          fin development
+#> 8                        fin morphogenesis
+#> 9                         fin regeneration
+#> 10          Abnormal fingernail morphology
+#> 11                        Hand polydactyly
+#> 12 Hyperextensibility of the finger joints
+#> 13                          Slender finger
+#> 14                          Arachnodactyly
+#> 15                          Tapered finger
+#> 16                       Absent fingernail
+#> 17                            Broad finger
+#> 18                              Broad nail
+#> 19                          Curved fingers
+#> 20                     Deviation of finger
+#> 21                               Fine hair
+#> 22                            Macrodactyly
+#> 23                       Finger syndactyly
+#> 24                Fingerpad telangiectases
+#> 25                 Hyperconvex fingernails
+#> 26                  Hypoplastic fingernail
+#> 27               4-5 metacarpal synostosis
+#> 28                Abnormal dermatoglyphics
+#> 29                  Aplasia of the fingers
+#> 30                  Dystrophic fingernails
+#> 31                          Finger agnosia
+#> 32                    Finger symphalangism
+#> 33                            Short finger
+#> 34                     Overlapping fingers
+#> 35                       Ridged fingernail
+#> 36             Cutaneous finger syndactyly
+#> 37                         Finger swelling
+#> 38                            Stiff finger
+#> 39                         Broad fingertip
+#> 40                       Finger dactylitis
+#> 41                    Finger hyperphalangy
+#> 42                             Finger pain
+#> 43                           Mallet finger
+#> 44                            Small finger
+#> 45                         Splayed fingers
+#> 46                         Thin fingernail
+#> 47            Digital flexor tenosynovitis
+#> 48                     Clubbing of fingers
+#> 49            Pseudo-chilblains on fingers
+#> 50                     Distinctive finding
+#> 51                    Fingernail dysplasia
+#> 52                     Finger clinodactyly
+#> 53                            Long fingers
+#> 54                           Minor finding
+#> 55                        Volar fingernail
+#> 56                                adactyly
+#> 57                             polydactyly
+#> 58                           camptodactyly
+#> 59                              syndactyly
+#> 60                           brachydactyly
+#> 61                          arachnodactyly
+#> 62                              fuzzy hair
+#> 63            increased digit pigmentation
+#> 64            decreased digit pigmentation
+#> 65                          lepidotrichium
+#> 66                                 fin ray
+#> 67                  caudal fin (zebrafish)
+#> 68                Callosciurus finlaysonii
+#> 69                      Limnonectes finchi
+#> 70                            Agama finchi
+#> 71                    Plestiodon finitimus
+#> 72                     Uroplatus finiavana
+#> 73                         Varanus finschi
+#> 74                         Amazona finschi
+#> 75                        Aratinga finschi
+#> 76                        Euphonia finschi
+#> 77                    Micropsitta finschii
+#> 78                       Oenanthe finschii
+#> 79                     Psittacula finschii
+#> 80                   Pycnonotus finlaysoni
+#> 81                      Stizorhina finschi
+#> 82                     Francolinus finschi
+#> 83   Bunocephalus sp. (Fink and Fink 1981)
+#> 84              Cnemidocarpa finmarkiensis
+#> 85                       Garra findolabium
+#> 86                         Schistura finis
+#> 87                   Lamprologus finalimus
+#> 88                  Saurenchelys finitimus
+#> 89                        Soleonasus finis
+#> 90                   Theragra finnmarchica
+#> 91                   Benitochromis finleyi
+#>                                  isDefinedBy matchType
+#> 1  http://purl.obolibrary.org/obo/uberon.owl     exact
+#> 2  http://purl.obolibrary.org/obo/uberon.owl     broad
+#> 3  http://purl.obolibrary.org/obo/uberon.owl     broad
+#> 4  http://purl.obolibrary.org/obo/uberon.owl     broad
+#> 5     http://purl.obolibrary.org/obo/zfa.owl   partial
+#> 6  http://purl.obolibrary.org/obo/uberon.owl   partial
+#> 7      http://purl.obolibrary.org/obo/go.owl   partial
+#> 8      http://purl.obolibrary.org/obo/go.owl   partial
+#> 9      http://purl.obolibrary.org/obo/go.owl   partial
+#> 10     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 11     http://purl.obolibrary.org/obo/hp.owl     broad
+#> 12     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 13     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 14     http://purl.obolibrary.org/obo/hp.owl     broad
+#> 15     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 16     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 17     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 18     http://purl.obolibrary.org/obo/hp.owl     broad
+#> 19     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 20     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 21     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 22     http://purl.obolibrary.org/obo/hp.owl     broad
+#> 23     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 24     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 25     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 26     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 27     http://purl.obolibrary.org/obo/hp.owl     broad
+#> 28     http://purl.obolibrary.org/obo/hp.owl     broad
+#> 29     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 30     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 31     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 32     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 33     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 34     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 35     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 36     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 37     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 38     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 39     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 40     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 41     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 42     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 43     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 44     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 45     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 46     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 47     http://purl.obolibrary.org/obo/hp.owl     broad
+#> 48     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 49     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 50     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 51     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 52     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 53     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 54     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 55     http://purl.obolibrary.org/obo/hp.owl   partial
+#> 56     http://purl.obolibrary.org/obo/mp.owl     broad
+#> 57     http://purl.obolibrary.org/obo/mp.owl     broad
+#> 58     http://purl.obolibrary.org/obo/mp.owl     broad
+#> 59     http://purl.obolibrary.org/obo/mp.owl     broad
+#> 60     http://purl.obolibrary.org/obo/mp.owl     broad
+#> 61     http://purl.obolibrary.org/obo/mp.owl     broad
+#> 62     http://purl.obolibrary.org/obo/mp.owl     broad
+#> 63     http://purl.obolibrary.org/obo/mp.owl     broad
+#> 64     http://purl.obolibrary.org/obo/mp.owl     broad
+#> 65 http://purl.obolibrary.org/obo/uberon.owl     broad
+#> 66 http://purl.obolibrary.org/obo/uberon.owl   partial
+#> 67    http://purl.obolibrary.org/obo/zfa.owl   partial
+#> 68    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 69    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 70    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 71    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 72    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 73    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 74    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 75    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 76    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 77    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 78    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 79    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 80    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 81    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 82    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 83    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 84    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 85    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 86    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 87    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 88    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 89    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 90    http://purl.obolibrary.org/obo/vto.owl   partial
+#> 91    http://purl.obolibrary.org/obo/vto.owl   partial
+

Note that because the KB integrates model organism phenotypes, the +results show types of fin specific to model organisms, such as “fin +(zebrafish)”.

+

There are several parameters available to narrow and filter search +results. For example, the parameter matchType allows +restricting to exact matches only:

+
+find_term("fin", matchTypes = c("exact"))
+#>                                              id label
+#> 1 http://purl.obolibrary.org/obo/UBERON_0008897   fin
+#>                                 isDefinedBy matchType
+#> 1 http://purl.obolibrary.org/obo/uberon.owl     exact
+

To retrieve more details about a given term, such as definition, +synonyms and classification, you can pass the term IRI (e.g., ‘http://purl.obolibrary.org/obo/UBERON_0008897’ for fin) +to the function as.terminfo(). +Classification details include the superclass (parent) and subclass +(child) relationships for a given ontology term, along with other +relationships such as part_of.

+

For example, view the relationships and term info for “pectoral +fin”:

+
+pecfin <- find_term('pectoral fin', matchType='exact')
+as.terminfo(pecfin)
+#> terminfo 'pectoral fin' http://purl.obolibrary.org/obo/UBERON_0000151
+#> Definition: Paired fin that is located in the thoracic region of the body.
+#> Synonyms:
+#>     forefin (exact)
+#>     pectoral fins (related)
+#> Relationships:
+#>     has skeleton pectoral fin skeleton
+#>     develops from pectoral appendage bud
+#> Subclass of:
+#>     paired fin
+#>     pectoral appendage
+#> Superclass of:
+#>     archipterygial fin
+#>     pectoral fin (zebrafish)
+#>     pectoral fin and (part_of some larva)
+#>     pectoral fin and (part_of some larva)
+#>     pectoral fin and (part_of some larval stage)
+#>     pectoral fin and (part_of some larval stage)
+

For a specific taxon, such as Siluriformes, you can also view the +taxon rank, whether or not the taxon is extinct, and its common +name:

+
+taxon <- find_term('Siluriformes') 
+as.terminfo(taxon)
+#> terminfo 'Siluriformes' http://purl.obolibrary.org/obo/VTO_0034991
+#> Synonyms:
+#>     catfish (related)
+#>     catfishes (related)
+#> Subclass of:
+#>     Otophysi
+#> Superclass of:
+#>     Ailia
+#>     Akysidae
+#>     Amblycipitidae
+#>     Amphiliidae
+#>     Anchariidae
+#>     Ariidae
+#>     Aspredinidae
+#>     Astroblepidae
+#>     Auchenipteridae
+#>     Auchenoglanididae
+#>     Australoglanididae
+#>     Austroglanididae
+#>     Bagridae
+#>     Callichthyidae
+#>     Cetopsidae
+#>     Chacidae
+#>     Clariidae
+#>     Claroteidae
+#>     Clupisoma
+#>     Conorhynchidae
+#>     Cranoglanididae
+#>     Diplomystidae
+#>     Doradidae
+#>     Eopeyeria
+#>     Erethistidae
+#>     Eutropiichthys
+#>     Heptapteridae
+#>     Heteropneustidae
+#>     Horabagridae
+#>     Hypophthalmidae
+#>     Hypsidoridae
+#>     Ictaluridae
+#>     Lacantuniidae
+#>     Laides
+#>     Liobagrus
+#>     Loricariidae
+#>     Malapteruridae
+#>     Mochokidae
+#>     Nematogenyidae
+#>     Neotropius
+#>     Olyridae
+#>     Pangasiidae
+#>     Pareutropius
+#>     Phreatobius
+#>     Pimelodidae
+#>     Platytropius
+#>     Plotosidae
+#>     Proeutropiichthys
+#>     Pseudopimelodidae
+#>     Rita
+#>     Schilbidae
+#>     Scoloplacidae
+#>     Selenaspis
+#>     Silonia
+#>     Siluridae
+#>     Siluroidei
+#>     Sisoridae
+#>     Trichomycteridae
+#>     Xiurenbagrus
+#> Extinct: FALSE
+#> Rank: order
+#> Common Name: catfish
-
-

-4. Retrieve study matrices using RPhenoscape

-

Now we will query for ‘Ictaluridae’ and ‘fin’ (including parts) to retrieve the list of studies that contain fin characters for this taxon.

-
slist <- pk_get_study_list(taxon = "Ictaluridae", entity = "fin", relation = "part of")
-

The list is returned as a data.frame containing the study IDs and citations. Navigate to Global Environment and click on ‘slist’ to view the ID and citation (author, year) for each study in the KB that contains any ictalurid species associated with fin data. Note that taxon, entity, and quality are optional arguments in this query, and we have also included fin parts. Here we found nine studies. Click on ‘slist’ in the Global Environment to view these studies and their IDs.

-

Next we want to obtain the character matrix for one of these studies. Using the study IDs from the previous step, we can get a list of the character matrices as NeXML objects. We will choose the Lundberg (1992) publication, the fifth item on the list above.

-
lundberg_nexml <- pk_get_study_xml(slist$id[5])
-#> ....This might take a while....
-#> https://scholar.google.com/scholar?q=The+Phylogeny+of+Ictalurid+Catfishes%3A+A+Synthesis+of+Recent+Work&btnG=&hl=en&as_sdt=0%2C42
-

Now go to Global Environment pane and click on ‘lundberg_nexml’ to view the study ID and associated NeXML object.

-

To view the full Lundberg (1992) matrix within RStudio, we need to first retrieve the matrix as a data.frame from the NeXML object:

-
lundberg_matrix <- pk_get_study(lundberg_nexml)
-#> Map symbols to labels...
-

You can take a look at a small part of the Lundberg (1992) matrix (e.g., the first five taxa and first five characters):

-
lundberg_matrix[[1]][1:5, 1:7]
-#>                 taxa                                      otu
-#> 1  Ameiurus brunneus otu_8985e6a0-7cf3-4019-a964-a7cec83fc9eb
-#> 2     Ameiurus catus otu_c63b2154-2be6-47df-8d27-cd3568287900
-#> 3     Ameiurus melas otu_baf69862-dbe5-4e0f-8012-ba81966c146d
-#> 4   Ameiurus natalis otu_ea5132da-ca01-4b1d-afcb-3370f57e4337
-#> 5 Ameiurus nebulosus otu_dce96f1e-1bbf-4d0f-9084-0c83a7d5c2c9
-#>   Anal-fin rays, species mean count Anterior dentations of pectoral spine
-#> 1                           16.1-20                                 large
-#> 2                         20.1-25.5                              moderate
-#> 3                         20.1-25.5                                 small
-#> 4                           25.6-28                                 small
-#> 5                         20.1-25.5                              moderate
-#>   Anterior distal serrae of pectoral spine
-#> 1               <3 moderately sharp serrae
-#> 2              3-6 moderately sharp serrae
-#> 3             absent or scarcely developed
-#> 4              3-6 moderately sharp serrae
-#> 5               <3 moderately sharp serrae
-#>                                                    Anterior extent of sphenotic
-#> 1 reaches or extends anterior to the level of anterior margin of epiphyseal bar
-#> 2 reaches or extends anterior to the level of anterior margin of epiphyseal bar
-#> 3 reaches or extends anterior to the level of anterior margin of epiphyseal bar
-#> 4 reaches or extends anterior to the level of anterior margin of epiphyseal bar
-#> 5 reaches or extends anterior to the level of anterior margin of epiphyseal bar
-#>                     Anterior limb of fourth transverse process
-#> 1 supracleithral facet shallow, basal recess shallow and broad
-#> 2       supracleithral facet deep, basal recess deep and broad
-#> 3       supracleithral facet deep, basal recess deep and broad
-#> 4      supracleithral facet deep, basal recess deep and narrow
-#> 5      supracleithral facet deep, basal recess deep and narrow
-

Now navigate to Global Environment and click on ‘lundberg_matrix’ to view the matrix, including the total number of taxa and characters (i.e., the dimensions of the data.frame). To view the entire matrix in this panel, click on the first icon that appears to the right when you hover over the second row.

-

Note that all taxa and characters from this study are returned, not just those pertaining to our original search terms. In this example, many anatomical entities other than ‘fin’ and its parts are returned as part of the original study matrix. In a later step, we will learn how to subset a matrix using anatomy or taxonomy terms.

+
+

4. Retrieve study matrices using RPhenoscape +

+

Now we will query for ‘Ictaluridae’ and ‘fin’ (including parts) to +retrieve the list of studies that contain fin characters for this +taxon.

+
+slist <- get_studies(taxon = "Ictaluridae", entity = "fin", includeRels = "part of")
+

The list is returned as a data.frame containing the study IDs and +citations. Navigate to Global Environment and click on ‘slist’ to view +the ID and citation (author, year) for each study in the KB that +contains any ictalurid species associated with fin data. Note that +taxon, entity, and quality are optional arguments in this query, and we +have also included fin parts. Here we found nine studies. Click on +‘slist’ in the Global Environment to view these studies and their +IDs.

+

Next we want to obtain the character matrix for one of these studies. +Using the study IDs from the previous step, we can get a list of the +character matrices as NeXML objects. We will choose the Lundberg (1992) +publication, the fifth item on the list above.

+
+lundberg_nexml <- get_study_data(slist$id[5])
+

Now go to Global Environment pane and click on ‘lundberg_nexml’ to +view the study ID and associated NeXML object.

+

To view the full Lundberg (1992) matrix within RStudio, we need to +first retrieve the matrix as a data.frame from the NeXML object:

+
+lundberg_matrix <- get_char_matrix(lundberg_nexml[[1]], otus_id = FALSE)
+

You can take a look at a small part of the Lundberg (1992) matrix +(e.g., the first five taxa and first five characters):

+
+lundberg_matrix[1:5, 1:7]
+#>                 taxa                                      otu
+#> 1  Ameiurus brunneus otu_331eacec-f62a-489b-aa97-01f88c469d4a
+#> 2     Ameiurus catus otu_f0b4abb4-c4ca-4d99-b6d3-d069176eea82
+#> 3     Ameiurus melas otu_5a3062f1-9803-4120-ae34-d2aa1ce02a75
+#> 4   Ameiurus natalis otu_b92dfa0d-8c16-4228-815f-c418c6e92781
+#> 5 Ameiurus nebulosus otu_31f42c8a-cd70-4bf4-994d-9bc483822ba7
+#>   Anal-fin rays, species mean count Anterior dentations of pectoral spine
+#> 1                                 1                                     3
+#> 2                                 2                                     2
+#> 3                                 2                                     1
+#> 4                                 3                                     1
+#> 5                                 2                                     2
+#>   Anterior distal serrae of pectoral spine Anterior extent of sphenotic
+#> 1                                        1                            0
+#> 2                                        2                            0
+#> 3                                        0                            0
+#> 4                                        2                            0
+#> 5                                        1                            0
+#>   Anterior limb of fourth transverse process
+#> 1                                          2
+#> 2                                          1
+#> 3                                          1
+#> 4                                          0
+#> 5                                          0
+

Now navigate to Global Environment and click on ‘lundberg_matrix’ to +view the matrix, including the total number of taxa and characters +(i.e., the dimensions of the data.frame). To view the entire matrix in +this panel, click on the first icon that appears to the right when you +hover over the second row.

+

We can use the information in the NeXML object to convert character +state symbols to labels:

+
+state_symbols2labels(lundberg_nexml[[1]], charmat = lundberg_matrix)[1:5, 1:7]
+#>                 taxa                                      otu
+#> 1  Ameiurus brunneus otu_331eacec-f62a-489b-aa97-01f88c469d4a
+#> 2     Ameiurus catus otu_f0b4abb4-c4ca-4d99-b6d3-d069176eea82
+#> 3     Ameiurus melas otu_5a3062f1-9803-4120-ae34-d2aa1ce02a75
+#> 4   Ameiurus natalis otu_b92dfa0d-8c16-4228-815f-c418c6e92781
+#> 5 Ameiurus nebulosus otu_31f42c8a-cd70-4bf4-994d-9bc483822ba7
+#>   Anal-fin rays, species mean count Anterior dentations of pectoral spine
+#> 1                           16.1-20                                 large
+#> 2                         20.1-25.5                              moderate
+#> 3                         20.1-25.5                                 small
+#> 4                           25.6-28                                 small
+#> 5                         20.1-25.5                              moderate
+#>   Anterior distal serrae of pectoral spine
+#> 1               <3 moderately sharp serrae
+#> 2              3-6 moderately sharp serrae
+#> 3             absent or scarcely developed
+#> 4              3-6 moderately sharp serrae
+#> 5               <3 moderately sharp serrae
+#>                                                    Anterior extent of sphenotic
+#> 1 reaches or extends anterior to the level of anterior margin of epiphyseal bar
+#> 2 reaches or extends anterior to the level of anterior margin of epiphyseal bar
+#> 3 reaches or extends anterior to the level of anterior margin of epiphyseal bar
+#> 4 reaches or extends anterior to the level of anterior margin of epiphyseal bar
+#> 5 reaches or extends anterior to the level of anterior margin of epiphyseal bar
+#>                     Anterior limb of fourth transverse process
+#> 1 supracleithral facet shallow, basal recess shallow and broad
+#> 2       supracleithral facet deep, basal recess deep and broad
+#> 3       supracleithral facet deep, basal recess deep and broad
+#> 4      supracleithral facet deep, basal recess deep and narrow
+#> 5      supracleithral facet deep, basal recess deep and narrow
+

Note that all taxa and characters from this study are returned, not +just those pertaining to our original search terms. In this example, +many anatomical entities other than ‘fin’ and its parts are returned as +part of the original study matrix. In a later step, we will learn how to +subset a matrix using anatomy or taxonomy terms.

-
-

-5. Get a presence/absence character matrix using OntoTrace in RPhenoscape

-

In the previous step, we queried the KB for individual studies that contain characters pertaining to the fins in ictalurid catfish, and we obtained character matrices for source publications that included those characters. Now we want to get a matrix that synthesizes these characters into a single matrix.

-

OntoTrace from the KB combines characters from multiple publications into a single synthetic matrix. It allows a user to specify any number or combination of anatomical entities and taxa. It returns a matrix as a nexml object that includes only presence or absence of anatomical entities. It uses asserted data of presence or absence, i.e., originally described by an author, or inferred data. Data are inferred from asserted characters, e.g., if an author describes a part of a fin such as ‘fin ray’, the fin is inferred present and scored as such in the matrix.

-

The OntoTrace default settings are to include parts of the anatomical entity and to include variable-only characters, but here we will include those that are invariant as well.

-
nex <- pk_get_ontotrace_xml(taxon = "Ictaluridae", entity = "fin", variable_only = FALSE)
-

To view the matrix within RStudio, get the matrix (m) as a data.frame from the NeXML object. Opening this (‘m’) in the Global Environment shows the taxa, character names, and state assignments (0, absent; 1, present) (note: the otu and otus are NeXML-internal IDs):

- -

The character and taxon lists for the matrix can also be returned. Click on ‘meta’ in the Global Environment pane to view the data.frames for taxa and entities:

- -

The above returns 29 species of ictalurid catfishes and 123 anatomical entities for fins and their parts.

-

You will need to go to the Phenoscape KB to view the supporting states, i.e., the source data upon which inferences were made or those that were directly asserted.

-

For example, in the returned OntoTrace matrix (see ‘m’ in Global Environment (row 10)) the pelvic fin is scored as present (‘1’) for Ictalurus australis. Enter these data into the faceted browsing interface: https://kb.phenoscape.org/#/facet

+
+

5. Get a presence/absence character matrix using OntoTrace in +RPhenoscape +

+

In the previous step, we queried the KB for individual studies that +contain characters pertaining to the fins in ictalurid catfish, and we +obtained character matrices for source publications that included those +characters. Now we want to get a matrix that synthesizes these +characters into a single matrix.

+

OntoTrace from the +KB combines characters from multiple publications into a single +synthetic matrix. It allows a user to specify any number or combination +of anatomical entities and taxa. It returns a matrix as a nexml object +that includes only presence or absence of anatomical entities. It uses +asserted data of presence or absence, i.e., originally described by an +author, or inferred data. Data are inferred from asserted characters, +e.g., if an author describes a part of a fin such as ‘fin ray’, the fin +is inferred present and scored as such in the matrix.

+

The OntoTrace default settings are to include parts of the anatomical +entity and to include variable-only characters, but here we will include +those that are invariant as well.

+
+nex <- get_ontotrace_data(taxon = "Ictaluridae", entity = "fin", variable_only = FALSE)
+

To view the matrix within RStudio, get the matrix (m) as a +data.frame from the NeXML object. Opening this (‘m’) in the +Global Environment shows the taxa, character names, and state +assignments (0, absent; 1, present) (note: the otu and otus are +NeXML-internal IDs):

+
+m <- get_char_matrix(nex)
+

The character and taxon lists for the matrix can also be returned. +Click on ‘meta’ in the Global Environment pane to view the data.frames +for taxa and entities:

+
+meta <- get_char_matrix_meta(nex)
+

The above returns 29 species of ictalurid catfishes and 124 +anatomical entities for fins and their parts.

+

You will need to go to the Phenoscape KB to view the +supporting states, i.e., the source data upon which inferences were made +or those that were directly asserted.

+

For example, in the returned OntoTrace matrix (see ‘m’ in Global +Environment (row 10)) the pelvic fin is scored as present (‘1’) for +Ictalurus australis. Enter these data on the faceted browsing page:

  • Anatomical entity = ‘pelvic fin’
  • Quality = ‘present’
  • Taxon = ‘Ictalurus australis’
-

Looking at ‘Taxon annotations’, you will find that there are zero phenotypes, i.e., no asserted character states to ‘pelvic fin present’. Now click the ‘inferred presence’ radio button under Phenotypic quality. You will now see two phenotypes for this taxon in the KB. These phenotypes ‘pelvic fin lepidotrichium amount’ and ‘pelvic splint present’ logically imply the presence of a pelvic fin. Thus, though an author did not directly assert the presence of a pelvic fin in Ictalurus australis, it is inferred and thus reported as present (‘1’) in the OntoTrace matrix.

+

Looking at ‘Taxon annotations’, you will find that there are zero +phenotypes, i.e., no asserted character states to ‘pelvic fin present’. +Now click the ‘inferred presence’ radio button under Phenotypic quality. +You will now see two phenotypes for this taxon in the KB. These +phenotypes ‘pelvic fin lepidotrichium amount’ and ‘pelvic splint +present’ logically imply the presence of a pelvic fin. Thus, though an +author did not directly assert the presence of a pelvic fin in +Ictalurus australis, it is inferred and thus reported as +present (‘1’) in the OntoTrace matrix.

-
-

-6. Subset the matrix taxonomically

-

In the above step you retrieved a synthetic matrix for the Ictaluridae. Now you would like to pare it down in taxonomic and anatomical scope. Let’s begin by trimming the matrix down to the presence and absence characters pertaining only to the genus Ictalurus. We will reduce the matrix to include only descendents of Ictalurus.

-

First, we need to parse the list to determine which taxa in the matrix (‘m’) are descendants of Ictalurus. This returns a list of TRUE or FALSE assignments for each taxon in the matrix:

-
is_desc <- pk_is_descendant('Ictalurus', m$taxa)
-

We then subset the matrix m to the descendants of Ictalurus:

-
ictalurus_m <- m[is_desc, ]
-

View the new matrix by clicking on the ‘ictalurus_m’ data.frame in the Global Environment.

-

We can also subset the matrix by anatomy. In this case, let’s select characters for the pectoral fin and its parts. We will use pk_is_descendant() to first parse the characters (column names; note the first three taxon-related columns are excluded) to determine which are descendents (types or parts) of the term ‘pectoral fin’. Because this function only looks for descendent terms, we also need to specify that any characters pertaining to ‘pectoral fin’ itself are included.

-
is_desc_pecfin <- pk_is_descendant('pectoral fin', colnames(ictalurus_m)[-c(1,2,3)], includeRels = "part_of") | colnames(ictalurus_m)[-c(1,2,3)] == 'pectoral fin' 
-table(is_desc_pecfin)
-#> is_desc_pecfin
-#> FALSE  TRUE 
-#>   109    14
-

Using the ‘colnames’ command below, view the character names to verify that pectoral fin related characters will be selected:

-
colnames(ictalurus_m)[-c(1,2,3)][is_desc_pecfin]
-#>  [1] "anterior dentation of pectoral fin spine"       
-#>  [2] "anterior distal serration of pectoral fin spine"
-#>  [3] "pectoral fin"                                   
-#>  [4] "pectoral fin lepidotrichium"                    
-#>  [5] "pectoral fin proximal radial bone"              
-#>  [6] "pectoral fin proximal radial cartilage"         
-#>  [7] "pectoral fin proximal radial element"           
-#>  [8] "pectoral fin radial bone"                       
-#>  [9] "pectoral fin radial cartilage"                  
-#> [10] "pectoral fin radial element"                    
-#> [11] "pectoral fin radial skeleton"                   
-#> [12] "pectoral fin skeleton"                          
-#> [13] "pectoral fin spine"                             
-#> [14] "posterior dentation of pectoral fin spine"
-

We now subset the matrix m using ‘is_desc_pecfin’ and retain the first three taxon-related columns:

-
to_keep <- c(TRUE, TRUE, TRUE, is_desc_pecfin) 
-pecfin_m <- ictalurus_m[, to_keep]
-

View this matrix of pectoral fin characters for Ictalurus by clicking on ‘pecfin_m’ in the Global Environment.

+
+

6. Subset the matrix taxonomically +

+

In the above step you retrieved a synthetic matrix for the +Ictaluridae. Now you would like to pare it down in taxonomic and +anatomical scope. Let’s begin by trimming the matrix down to the +presence and absence characters pertaining only to the genus +Ictalurus. We will reduce the matrix to include only +descendents of Ictalurus.

+

First, we need to parse the list to determine which taxa in the +matrix (‘m’) are descendants of Ictalurus. This returns a list +of TRUE or FALSE assignments for each taxon in the matrix:

+
+is_desc <- is_descendant('Ictalurus', m$taxa)
+

We then subset the matrix m to the descendants of +Ictalurus:

+
+ictalurus_m <- m[is_desc, ]
+

View the new matrix by clicking on the ‘ictalurus_m’ +data.frame in the Global Environment.

+

We can also subset the matrix by anatomy. In this case, let’s select +characters for the pectoral fin and its parts. We will use is_descendant() +to first parse the characters (column names; note the first three +taxon-related columns are excluded) to determine which are descendents +(types or parts) of the term ‘pectoral fin’. Because this function only +looks for descendent terms, we also need to specify that any characters +pertaining to ‘pectoral fin’ itself are included.

+
+is_desc_pecfin <- is_descendant('pectoral fin', colnames(ictalurus_m)[-c(1,2,3)], includeRels = "part_of") | colnames(ictalurus_m)[-c(1,2,3)] == 'pectoral fin' 
+table(is_desc_pecfin)
+#> is_desc_pecfin
+#> FALSE  TRUE 
+#>   110    14
+

Using the ‘colnames’ command below, view the character names to +verify that pectoral fin related characters will be selected:

+
+colnames(ictalurus_m)[-c(1,2,3)][is_desc_pecfin]
+#>  [1] "anterior dentation of pectoral fin spine"       
+#>  [2] "anterior distal serration of pectoral fin spine"
+#>  [3] "pectoral fin"                                   
+#>  [4] "pectoral fin lepidotrichium"                    
+#>  [5] "pectoral fin proximal radial bone"              
+#>  [6] "pectoral fin proximal radial cartilage"         
+#>  [7] "pectoral fin proximal radial element"           
+#>  [8] "pectoral fin radial bone"                       
+#>  [9] "pectoral fin radial cartilage"                  
+#> [10] "pectoral fin radial element"                    
+#> [11] "pectoral fin radial skeleton"                   
+#> [12] "pectoral fin skeleton"                          
+#> [13] "pectoral fin spine"                             
+#> [14] "posterior dentation of pectoral fin spine"
+

We now subset the matrix m using ‘is_desc_pecfin’ and retain the +first three taxon-related columns:

+
+to_keep <- c(TRUE, TRUE, TRUE, is_desc_pecfin) 
+pecfin_m <- ictalurus_m[, to_keep]
+

View this matrix of pectoral fin characters for Ictalurus by +clicking on ‘pecfin_m’ in the Global Environment.

-
-

-6. Retrieve matrix of anatomical dependencies

-

Knowing how the information about an anatomical structure may rely on other layers of anatomical information is critical, if the goal is to isolate and analyze independent features. We can query the KB for a presence-absence dependency matrix for a specified set of anatomical structures. The dependency matrix is derived from the formalized knowledge of relationships among entities encoded in the ontology. In the example below, the presence of ‘pelvic splint’ is dependent on the presence of ‘pelvic fin’. In other words, the pelvic fin is implied present when the pelvic splint is present because ‘pelvic splint’ is part_of ‘pelvic fin’.

-
tl <- c("pectoral fin", "pelvic fin", "pelvic splint", "antorbital", "preopercle")
-
-dep_mat <- pa_dep_matrix(tl, .names = "label")
-dep_mat
-#>               pectoral fin pelvic fin pelvic splint antorbital preopercle
-#> pectoral fin             1          0             0          0          0
-#> pelvic fin               0          1             0          0          0
-#> pelvic splint            0          1             1          0          0
-#> antorbital               0          0             0          1          0
-#> preopercle               0          0             0          0          1
-

In the PARAMO tutorial, we will learn how to use these dependency matrices to reconstruct individual traits and entire phenotypes.

+
+

6. Retrieve matrix of anatomical dependencies +

+

Knowing how the information about an anatomical structure may rely on +other layers of anatomical information is critical, if the goal is to +isolate and analyze independent features. We can query the KB for a +presence-absence dependency matrix for a specified set of anatomical +structures. The dependency matrix is derived from the formalized +knowledge of relationships among entities encoded in the ontology. In +the example below, the presence of ‘pelvic splint’ is dependent on the +presence of ‘pelvic fin’. In other words, the pelvic fin is implied +present when the pelvic splint is present because ‘pelvic splint’ is +part_of ‘pelvic fin’.

+
+tl <- c("pectoral fin", "pelvic fin", "pelvic splint", "antorbital", "preopercle")
+
+dep_mat <- pa_dep_matrix(tl, .names = "label")
+dep_mat
+#>               pectoral fin pelvic fin pelvic splint antorbital preopercle
+#> pectoral fin             1          0             0          0          0
+#> pelvic fin               0          1             0          0          0
+#> pelvic splint            0          1             1          0          0
+#> antorbital               0          0             0          1          0
+#> preopercle               0          0             0          0          1
+

In the PARAMO tutorial, we will learn how to use these dependency +matrices to reconstruct individual traits and entire phenotypes.

-
-

-7. Retrieve semantic similarity matrix

-

We can also obtain similarity metrics for phenotypes based on ontological distance. Three similarity metrics - Jaccard, Tanimoto, and Cosine - are computed by the KB to measure similarity between terms (see RPhenoscape documentation in the Help panel for how these are measured). For example, here we compute and visualize Jaccard similarity for premaxillary tooth phenotypes in Ictaluridae:

-
phens <- get_phenotypes(entity = "premaxillary tooth", taxon = "Ictaluridae")
-nrow(phens)
-#> [1] 9
-sm <- jaccard_similarity(terms = phens$id, .labels = phens$label, .colnames = "label")
-plot(hclust(as.dist(1-sm)))
+
+

7. Retrieve semantic similarity matrix +

+

We can also obtain similarity metrics for phenotypes based on +ontological distance. Three similarity metrics - Jaccard, Tanimoto, and +Cosine - are computed by the KB to measure similarity between terms (see +RPhenoscape documentation in the Help panel for how these are measured). +For example, here we compute and visualize Jaccard similarity for +premaxillary tooth phenotypes in Ictaluridae:

+
+phens <- get_phenotypes(entity = "premaxillary tooth", taxon = "Ictaluridae")
+nrow(phens)
+#> [1] 9
+sm <- jaccard_similarity(terms = phens$id, .labels = phens$label, .colnames = "label")
+plot(hclust(as.dist(1-sm)))

-

In the PARAMO tutorial, we’ll use a semantic similarity matrix to visualize traits in a heat map. We are also developing methods that use semantic similarity to cluster phenotypes into characters and character states.

+

In the PARAMO tutorial, we’ll use a semantic similarity matrix to +visualize traits in a heat map. We are also developing methods that use +semantic similarity to cluster phenotypes into characters and character +states.

- +
-

Site built with pkgdown 1.3.0.

+

+

Site built with pkgdown 2.0.5.

+
+ + + diff --git a/docs/articles/01_rphenoscape_files/figure-html/unnamed-chunk-20-1.png b/docs/articles/01_rphenoscape_files/figure-html/unnamed-chunk-20-1.png index 9172790..10c0f3c 100644 Binary files a/docs/articles/01_rphenoscape_files/figure-html/unnamed-chunk-20-1.png and b/docs/articles/01_rphenoscape_files/figure-html/unnamed-chunk-20-1.png differ diff --git a/docs/articles/PARAMO_files/figure-html/unnamed-chunk-7-1.png b/docs/articles/PARAMO_files/figure-html/unnamed-chunk-7-1.png index 5645ebb..7ae5419 100644 Binary files a/docs/articles/PARAMO_files/figure-html/unnamed-chunk-7-1.png and b/docs/articles/PARAMO_files/figure-html/unnamed-chunk-7-1.png differ diff --git a/docs/articles/PARAMO_files/figure-html/unnamed-chunk-8-1.png b/docs/articles/PARAMO_files/figure-html/unnamed-chunk-8-1.png index 65edd11..c39eacd 100644 Binary files a/docs/articles/PARAMO_files/figure-html/unnamed-chunk-8-1.png and b/docs/articles/PARAMO_files/figure-html/unnamed-chunk-8-1.png differ diff --git a/docs/articles/PARAMO_files/figure-html/unnamed-chunk-9-1.png b/docs/articles/PARAMO_files/figure-html/unnamed-chunk-9-1.png index a09e85f..c314c5e 100644 Binary files a/docs/articles/PARAMO_files/figure-html/unnamed-chunk-9-1.png and b/docs/articles/PARAMO_files/figure-html/unnamed-chunk-9-1.png differ diff --git a/docs/articles/PARAMO_files/figure-html/unnamed-chunk-9-2.png b/docs/articles/PARAMO_files/figure-html/unnamed-chunk-9-2.png index 6d0d9e6..8bc30e9 100644 Binary files a/docs/articles/PARAMO_files/figure-html/unnamed-chunk-9-2.png and b/docs/articles/PARAMO_files/figure-html/unnamed-chunk-9-2.png differ diff --git a/docs/articles/index.html b/docs/articles/index.html index 5a2701b..bdb0e9f 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -1,55 +1,12 @@ - - - - - - - -Articles • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Articles • SCATE.shortcourse - + + - - -
-
- -
-
+
+
RPhenoscape Tutorial
+
+
PARAMO Tutorial
+
+
Glossary
+
+
-
- + +
+ + + - - + diff --git a/docs/authors.html b/docs/authors.html index 6399293..c873591 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -1,55 +1,12 @@ - - - - - - - -Authors • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Authors and Citation • SCATE.shortcourse + + - - - - -
-
-
-
+
-
-
- + +
+ + + - - + diff --git a/docs/bootstrap-toc.css b/docs/bootstrap-toc.css new file mode 100644 index 0000000..5a85941 --- /dev/null +++ b/docs/bootstrap-toc.css @@ -0,0 +1,60 @@ +/*! + * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) + * Copyright 2015 Aidan Feldman + * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ + +/* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ + +/* All levels of nav */ +nav[data-toggle='toc'] .nav > li > a { + display: block; + padding: 4px 20px; + font-size: 13px; + font-weight: 500; + color: #767676; +} +nav[data-toggle='toc'] .nav > li > a:hover, +nav[data-toggle='toc'] .nav > li > a:focus { + padding-left: 19px; + color: #563d7c; + text-decoration: none; + background-color: transparent; + border-left: 1px solid #563d7c; +} +nav[data-toggle='toc'] .nav > .active > a, +nav[data-toggle='toc'] .nav > .active:hover > a, +nav[data-toggle='toc'] .nav > .active:focus > a { + padding-left: 18px; + font-weight: bold; + color: #563d7c; + background-color: transparent; + border-left: 2px solid #563d7c; +} + +/* Nav: second level (shown on .active) */ +nav[data-toggle='toc'] .nav .nav { + display: none; /* Hide by default, but at >768px, show it */ + padding-bottom: 10px; +} +nav[data-toggle='toc'] .nav .nav > li > a { + padding-top: 1px; + padding-bottom: 1px; + padding-left: 30px; + font-size: 12px; + font-weight: normal; +} +nav[data-toggle='toc'] .nav .nav > li > a:hover, +nav[data-toggle='toc'] .nav .nav > li > a:focus { + padding-left: 29px; +} +nav[data-toggle='toc'] .nav .nav > .active > a, +nav[data-toggle='toc'] .nav .nav > .active:hover > a, +nav[data-toggle='toc'] .nav .nav > .active:focus > a { + padding-left: 28px; + font-weight: 500; +} + +/* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ +nav[data-toggle='toc'] .nav > .active > ul { + display: block; +} diff --git a/docs/bootstrap-toc.js b/docs/bootstrap-toc.js new file mode 100644 index 0000000..1cdd573 --- /dev/null +++ b/docs/bootstrap-toc.js @@ -0,0 +1,159 @@ +/*! + * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) + * Copyright 2015 Aidan Feldman + * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ +(function() { + 'use strict'; + + window.Toc = { + helpers: { + // return all matching elements in the set, or their descendants + findOrFilter: function($el, selector) { + // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/ + // http://stackoverflow.com/a/12731439/358804 + var $descendants = $el.find(selector); + return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])'); + }, + + generateUniqueIdBase: function(el) { + var text = $(el).text(); + var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-'); + return anchor || el.tagName.toLowerCase(); + }, + + generateUniqueId: function(el) { + var anchorBase = this.generateUniqueIdBase(el); + for (var i = 0; ; i++) { + var anchor = anchorBase; + if (i > 0) { + // add suffix + anchor += '-' + i; + } + // check if ID already exists + if (!document.getElementById(anchor)) { + return anchor; + } + } + }, + + generateAnchor: function(el) { + if (el.id) { + return el.id; + } else { + var anchor = this.generateUniqueId(el); + el.id = anchor; + return anchor; + } + }, + + createNavList: function() { + return $(''); + }, + + createChildNavList: function($parent) { + var $childList = this.createNavList(); + $parent.append($childList); + return $childList; + }, + + generateNavEl: function(anchor, text) { + var $a = $(''); + $a.attr('href', '#' + anchor); + $a.text(text); + var $li = $('
  • '); + $li.append($a); + return $li; + }, + + generateNavItem: function(headingEl) { + var anchor = this.generateAnchor(headingEl); + var $heading = $(headingEl); + var text = $heading.data('toc-text') || $heading.text(); + return this.generateNavEl(anchor, text); + }, + + // Find the first heading level (`

    `, then `

    `, etc.) that has more than one element. Defaults to 1 (for `

    `). + getTopLevel: function($scope) { + for (var i = 1; i <= 6; i++) { + var $headings = this.findOrFilter($scope, 'h' + i); + if ($headings.length > 1) { + return i; + } + } + + return 1; + }, + + // returns the elements for the top level, and the next below it + getHeadings: function($scope, topLevel) { + var topSelector = 'h' + topLevel; + + var secondaryLevel = topLevel + 1; + var secondarySelector = 'h' + secondaryLevel; + + return this.findOrFilter($scope, topSelector + ',' + secondarySelector); + }, + + getNavLevel: function(el) { + return parseInt(el.tagName.charAt(1), 10); + }, + + populateNav: function($topContext, topLevel, $headings) { + var $context = $topContext; + var $prevNav; + + var helpers = this; + $headings.each(function(i, el) { + var $newNav = helpers.generateNavItem(el); + var navLevel = helpers.getNavLevel(el); + + // determine the proper $context + if (navLevel === topLevel) { + // use top level + $context = $topContext; + } else if ($prevNav && $context === $topContext) { + // create a new level of the tree and switch to it + $context = helpers.createChildNavList($prevNav); + } // else use the current $context + + $context.append($newNav); + + $prevNav = $newNav; + }); + }, + + parseOps: function(arg) { + var opts; + if (arg.jquery) { + opts = { + $nav: arg + }; + } else { + opts = arg; + } + opts.$scope = opts.$scope || $(document.body); + return opts; + } + }, + + // accepts a jQuery object, or an options object + init: function(opts) { + opts = this.helpers.parseOps(opts); + + // ensure that the data attribute is in place for styling + opts.$nav.attr('data-toggle', 'toc'); + + var $topContext = this.helpers.createChildNavList(opts.$nav); + var topLevel = this.helpers.getTopLevel(opts.$scope); + var $headings = this.helpers.getHeadings(opts.$scope, topLevel); + this.helpers.populateNav($topContext, topLevel, $headings); + } + }; + + $(function() { + $('nav[data-toggle="toc"]').each(function(i, el) { + var $nav = $(el); + Toc.init($nav); + }); + }); +})(); diff --git a/docs/index.html b/docs/index.html index 321f5d4..cb1b36a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,21 +6,24 @@ Short Course on Phylogenetic Comparative Analysis of Integrated Anatomical Traits • SCATE.shortcourse - - - + + + + + - - + + +
    -
    - +
    +

    This R package encapsulates the material for the short course on Phylogenetic Comparative Analysis of Integrated Anatomical Traits.

    The purpose of doing so is to leverage the R package installation mechanism for ensuring that all R dependencies needed for the course are installed and available, simply as a result of installing this package.

    The material itself is in the form of vignettes written in RMarkdown. Users are encouraged to modify the code chunks and re-execute the vignettes as a means of exploring the material.

    -
    -

    -Installation

    -

    You can download the course material to your computer directly from Github as a Zip archive. Click the Download Zip link that appears under the Clone or Download, move the Zip archive to a directory of your choice, then unpack it.

    +
    +

    Installation +

    +

    You can download the course material to your computer directly from Github as a Zip archive. Click the Download Zip link that appears under the Clone or Download, move the Zip archive to a directory of your choice, then unpack it.

    You can then open the folder containing the material as a project in RStudio, and render (“knit”) and modify the vignette(s) (see vignette/ subdirectory).

    -

    The RPhenoscape vignette depends only on the RPhenoscape package, which can be installed directly from Github as per its documentation. (RPhenoscape has itself a number of recursive dependencies; installing the package will install those, too.)

    -

    The PARAMO vignette has a number of dependencies. These can be installed automatically by installing the workshop package, either from the command line (use R CMD build, followed by R CMD INSTALL), or from within RStudio using the install_github() function in the remotes package (which can be installed from CRAN using install.packages()):

    -
    remotes::install_github("phenoscape/scate-shortcourse")
    +

    The RPhenoscape vignette depends only on the RPhenoscape package, which can be installed directly from Github as per its documentation. (RPhenoscape has itself a number of recursive dependencies; installing the package will install those, too.)

    +

    The PARAMO vignette has a number of dependencies. These can be installed automatically by installing the workshop package, either from the command line (use R CMD build, followed by R CMD INSTALL), or from within RStudio using the install_github() function in the remotes package (which can be installed from CRAN using install.packages()):

    +
    +remotes::install_github("phenoscape/scate-shortcourse")

    This command will likely trigger a (possibly long) list of packages that are required to be installed and upgraded, or suggested for upgrade, with a prompt for choosing how to select which packages to upgrade or install. Unless you happen to have installed an earlier version of RPhenoscape that fails to meet the required version, we recommend to use the option for installing and upgrading from CRAN only. (Typically, this will be option 2.)

    Note that the above command will use the default options for build arguments, which will leave out building and installing the vignettes. Since the best use of the vignettes is to go through (and potentially modify) them within RStudio, this shouldn’t be an issue.

    -
    -

    -Installation on Unix / Linux

    +
    +

    Installation on Unix / Linux +

    If your operating system is some flavor of Linux, many of the package dependencies that include compiled code will end up being installed from source. Some of these have dependencies external to R, and thus installing them from source will fail if these external dependencies are not pre-installed.

    -

    Currently, the following packages are required on top of a Ubuntu 18.04 / R 5.3.3 environment:

    -
      -
    • libmagick++-dev
    • -
    • libgmp-dev
    • -
    • libmpfr-dev
    • -
    • pandoc
    • -
    +

    Currently, the following packages are required on top of a Ubuntu 18.04 / R 5.3.3 environment: - libmagick++-dev - libgmp-dev - libmpfr-dev - pandoc

    Other base systems may require additional (or fewer) external packages.

    -
    -

    -When and Where

    +
    +

    When and Where +

    • -SSB 2020 Workshop in Gainesville, FL
    • +SSB 2020 Workshop in Gainesville, FL
    • January 6, 2020 (Monday)
    • Venue: Hotel Indigo
    -
    -

    -Schedule

    +
    +

    Schedule +

    • 8:30am Participants arrive and get settled
    • 9:00 Welcome and intros, goals
    • @@ -136,11 +129,11 @@

    • In parallel: tech check troubleshooting
    -
  • 9:30 Using Phenoscape Knowledgebase +
  • 9:30 Using Phenoscape Knowledgebase
  • 10:00 Break
  • -
  • 10:30 Using RPhenoscape +
  • 10:30 Using RPhenoscape
  • 10:45 Constructing stochastic character maps on a phylogeny
      @@ -161,94 +154,111 @@

  • -
    -

    -Instructors

    +
    +

    Instructors +

    - + + + diff --git a/docs/pkgdown.css b/docs/pkgdown.css index c03fb08..80ea5b8 100644 --- a/docs/pkgdown.css +++ b/docs/pkgdown.css @@ -17,12 +17,14 @@ html, body { height: 100%; } +body { + position: relative; +} + body > .container { display: flex; height: 100%; flex-direction: column; - - padding-top: 60px; } body > .container .row { @@ -54,8 +56,10 @@ img.icon { float: right; } -img { +/* Ensure in-page images don't run outside their container */ +.contents img { max-width: 100%; + height: auto; } /* Fix bug in bootstrap (only seen in firefox) */ @@ -69,14 +73,17 @@ summary { margin-top: calc(-60px + 1em); } +dd { + margin-left: 3em; +} + /* Section anchors ---------------------------------*/ a.anchor { - margin-left: -30px; - display:inline-block; - width: 30px; - height: 30px; - visibility: hidden; + display: none; + margin-left: 5px; + width: 20px; + height: 20px; background-image: url(./link.svg); background-repeat: no-repeat; @@ -84,17 +91,15 @@ a.anchor { background-position: center center; } -.hasAnchor:hover a.anchor { - visibility: visible; -} - -@media (max-width: 767px) { - .hasAnchor:hover a.anchor { - visibility: hidden; - } +h1:hover .anchor, +h2:hover .anchor, +h3:hover .anchor, +h4:hover .anchor, +h5:hover .anchor, +h6:hover .anchor { + display: inline-block; } - /* Fixes for fixed navbar --------------------------*/ .contents h1, .contents h2, .contents h3, .contents h4 { @@ -102,37 +107,135 @@ a.anchor { margin-top: -40px; } -/* Static header placement on mobile devices */ -@media (max-width: 767px) { - .navbar-fixed-top { - position: absolute; - } - .navbar { - padding: 0; - } +/* Navbar submenu --------------------------*/ + +.dropdown-submenu { + position: relative; +} + +.dropdown-submenu>.dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + border-radius: 0 6px 6px 6px; +} + +.dropdown-submenu:hover>.dropdown-menu { + display: block; +} + +.dropdown-submenu>a:after { + display: block; + content: " "; + float: right; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 5px 0 5px 5px; + border-left-color: #cccccc; + margin-top: 5px; + margin-right: -10px; +} + +.dropdown-submenu:hover>a:after { + border-left-color: #ffffff; } +.dropdown-submenu.pull-left { + float: none; +} + +.dropdown-submenu.pull-left>.dropdown-menu { + left: -100%; + margin-left: 10px; + border-radius: 6px 0 6px 6px; +} /* Sidebar --------------------------*/ -#sidebar { +#pkgdown-sidebar { margin-top: 30px; + position: -webkit-sticky; + position: sticky; + top: 70px; } -#sidebar h2 { + +#pkgdown-sidebar h2 { font-size: 1.5em; margin-top: 1em; } -#sidebar h2:first-child { +#pkgdown-sidebar h2:first-child { margin-top: 0; } -#sidebar .list-unstyled li { +#pkgdown-sidebar .list-unstyled li { margin-bottom: 0.5em; } +/* bootstrap-toc tweaks ------------------------------------------------------*/ + +/* All levels of nav */ + +nav[data-toggle='toc'] .nav > li > a { + padding: 4px 20px 4px 6px; + font-size: 1.5rem; + font-weight: 400; + color: inherit; +} + +nav[data-toggle='toc'] .nav > li > a:hover, +nav[data-toggle='toc'] .nav > li > a:focus { + padding-left: 5px; + color: inherit; + border-left: 1px solid #878787; +} + +nav[data-toggle='toc'] .nav > .active > a, +nav[data-toggle='toc'] .nav > .active:hover > a, +nav[data-toggle='toc'] .nav > .active:focus > a { + padding-left: 5px; + font-size: 1.5rem; + font-weight: 400; + color: inherit; + border-left: 2px solid #878787; +} + +/* Nav: second level (shown on .active) */ + +nav[data-toggle='toc'] .nav .nav { + display: none; /* Hide by default, but at >768px, show it */ + padding-bottom: 10px; +} + +nav[data-toggle='toc'] .nav .nav > li > a { + padding-left: 16px; + font-size: 1.35rem; +} + +nav[data-toggle='toc'] .nav .nav > li > a:hover, +nav[data-toggle='toc'] .nav .nav > li > a:focus { + padding-left: 15px; +} + +nav[data-toggle='toc'] .nav .nav > .active > a, +nav[data-toggle='toc'] .nav .nav > .active:hover > a, +nav[data-toggle='toc'] .nav .nav > .active:focus > a { + padding-left: 15px; + font-weight: 500; + font-size: 1.35rem; +} + +/* orcid ------------------------------------------------------------------- */ + .orcid { - height: 16px; + font-size: 16px; + color: #A6CE39; + /* margins are required by official ORCID trademark and display guidelines */ + margin-left:4px; + margin-right:4px; vertical-align: middle; } @@ -140,14 +243,14 @@ a.anchor { .ref-index th {font-weight: normal;} -.ref-index td {vertical-align: top;} +.ref-index td {vertical-align: top; min-width: 100px} .ref-index .icon {width: 40px;} .ref-index .alias {width: 40%;} .ref-index-icons .alias {width: calc(40% - 40px);} .ref-index .title {width: 60%;} .ref-arguments th {text-align: right; padding-right: 10px;} -.ref-arguments th, .ref-arguments td {vertical-align: top;} +.ref-arguments th, .ref-arguments td {vertical-align: top; min-width: 100px} .ref-arguments .name {width: 20%;} .ref-arguments .desc {width: 80%;} @@ -160,31 +263,26 @@ table { /* Syntax highlighting ---------------------------------------------------- */ -pre { - word-wrap: normal; - word-break: normal; - border: 1px solid #eee; -} - -pre, code { +pre, code, pre code { background-color: #f8f8f8; color: #333; } +pre, pre code { + white-space: pre-wrap; + word-break: break-all; + overflow-wrap: break-word; +} -pre code { - overflow: auto; - word-wrap: normal; - white-space: pre; +pre { + border: 1px solid #eee; } -pre .img { +pre .img, pre .r-plt { margin: 5px 0; } -pre .img img { +pre .img img, pre .r-plt img { background-color: #fff; - display: block; - height: auto; } code a, pre a { @@ -201,9 +299,8 @@ a.sourceLine:hover { .kw {color: #264D66;} /* keyword */ .co {color: #888888;} /* comment */ -.message { color: black; font-weight: bolder;} -.error { color: orange; font-weight: bolder;} -.warning { color: #6A0366; font-weight: bolder;} +.error {font-weight: bolder;} +.warning {font-weight: bolder;} /* Clipboard --------------------------*/ @@ -222,6 +319,19 @@ a.sourceLine:hover { visibility: visible; } +/* headroom.js ------------------------ */ + +.headroom { + will-change: transform; + transition: transform 200ms linear; +} +.headroom--pinned { + transform: translateY(0%); +} +.headroom--unpinned { + transform: translateY(-100%); +} + /* mark.js ----------------------------*/ mark { @@ -234,3 +344,41 @@ mark { .html-widget { margin-bottom: 10px; } + +/* fontawesome ------------------------ */ + +.fab { + font-family: "Font Awesome 5 Brands" !important; +} + +/* don't display links in code chunks when printing */ +/* source: https://stackoverflow.com/a/10781533 */ +@media print { + code a:link:after, code a:visited:after { + content: ""; + } +} + +/* Section anchors --------------------------------- + Added in pandoc 2.11: https://github.com/jgm/pandoc-templates/commit/9904bf71 +*/ + +div.csl-bib-body { } +div.csl-entry { + clear: both; +} +.hanging-indent div.csl-entry { + margin-left:2em; + text-indent:-2em; +} +div.csl-left-margin { + min-width:2em; + float:left; +} +div.csl-right-inline { + margin-left:2em; + padding-left:1em; +} +div.csl-indent { + margin-left: 2em; +} diff --git a/docs/pkgdown.js b/docs/pkgdown.js index eb7e83d..6f0eee4 100644 --- a/docs/pkgdown.js +++ b/docs/pkgdown.js @@ -2,18 +2,11 @@ (function($) { $(function() { - $("#sidebar") - .stick_in_parent({offset_top: 40}) - .on('sticky_kit:bottom', function(e) { - $(this).parent().css('position', 'static'); - }) - .on('sticky_kit:unbottom', function(e) { - $(this).parent().css('position', 'relative'); - }); + $('.navbar-fixed-top').headroom(); - $('body').scrollspy({ - target: '#sidebar', - offset: 60 + $('body').css('padding-top', $('.navbar').height() + 10); + $(window).resize(function(){ + $('body').css('padding-top', $('.navbar').height() + 10); }); $('[data-toggle="tooltip"]').tooltip(); @@ -87,7 +80,7 @@ $(document).ready(function() { var copyButton = ""; - $(".examples, div.sourceCode").addClass("hasCopyButton"); + $("div.sourceCode").addClass("hasCopyButton"); // Insert copy buttons: $(copyButton).prependTo(".hasCopyButton"); @@ -98,7 +91,7 @@ // Initialize clipboard: var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { text: function(trigger) { - return trigger.parentNode.textContent; + return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, ""); } }); diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 8213862..8f28ba6 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,8 +1,9 @@ -pandoc: 1.19.2.1 -pkgdown: 1.3.0 +pandoc: 2.19.2 +pkgdown: 2.0.5 pkgdown_sha: ~ articles: 01_rphenoscape: 01_rphenoscape.html PARAMO: PARAMO.html glossary: glossary.html +last_built: 2022-11-07T21:37Z diff --git a/docs/reference/Mk_Rev.html b/docs/reference/Mk_Rev.html index 30459b0..8a2c46a 100644 --- a/docs/reference/Mk_Rev.html +++ b/docs/reference/Mk_Rev.html @@ -1,58 +1,12 @@ - - - - - - - -Make rate matrix for RevBayes — Mk_Rev • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Make rate matrix for RevBayes — Mk_Rev • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Make rate matrix for RevBayes

    -
    -
    Mk_Rev(M, prior = "dnExp(20)")
    - -

    Arguments

    - - - - - - - - - - -
    M

    rate matrix

    prior

    prior to be used

    - -

    Value

    +
    +
    Mk_Rev(M, prior = "dnExp(20)")
    +
    + +
    +

    Arguments

    +
    M
    +

    rate matrix

    + + +
    prior
    +

    prior to be used

    -

    matrix

    +
    +
    +

    Value

    -

    Examples

    -
    cat(Mk_Rev(M))
    #> Error in nrow(M): object 'M' not found
    -
    - +
    +

    Examples

    +
    cat(Mk_Rev(M))
    +#> Error in nrow(M): object 'M' not found
    +
    +
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/RAC_query.html b/docs/reference/RAC_query.html index 50c4d66..da72074 100644 --- a/docs/reference/RAC_query.html +++ b/docs/reference/RAC_query.html @@ -1,58 +1,12 @@ - - - - - - - -Function for aggregating characters under a specified set of terms (for example, body regions) — RAC_query • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Function for aggregating characters under a specified set of terms (for example, body regions) — RAC_query • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Function for aggregating characters under a specified set of terms (for example, body regions)

    -
    -
    RAC_query(char_info, ONT, names)
    - +
    +
    RAC_query(char_info, ONT, names)
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png new file mode 100644 index 0000000..17a3580 Binary files /dev/null and b/docs/reference/Rplot001.png differ diff --git a/docs/reference/amalgamate_deps.html b/docs/reference/amalgamate_deps.html index 6397a11..cc2aca8 100644 --- a/docs/reference/amalgamate_deps.html +++ b/docs/reference/amalgamate_deps.html @@ -1,58 +1,12 @@ - - - - - - - -Generates a graph and model for traits given a dependency matrix — amalgamate_deps • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Generates a graph and model for traits given a dependency matrix — amalgamate_deps • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Generates a graph and model for traits given a dependency matrix

    -
    -
    amalgamate_deps(dep_mat)
    - -

    Arguments

    - - - - - - -
    dep_mat

    A dependency matrix

    +
    +
    amalgamate_deps(dep_mat)
    +
    + +
    +

    Arguments

    +
    dep_mat
    +

    A dependency matrix

    + +
    +
    +

    Value

    -

    Value

    -

    A list of: +

    A list of: $M Transition matrices for the Structured-Hidden State Markov Models that can be run in RevBayes, corHMM or other tools $graph The full graph of all dependencies among traits @@ -149,39 +87,33 @@

    Value

    $traits The old trait names that were amalgamated $new.traits The new names of the amalgamated trait names $depstates A list providing the dependencies of all characters

    - -

    Details

    - +
    +
    +

    Details

    The dependency matrix can come from `rphenoscape::pa_dep_matrix` or be user generated

    - - -
    -
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/amalgamated_fits_corHMM.html b/docs/reference/amalgamated_fits_corHMM.html index 3f053a2..ee7ad95 100644 --- a/docs/reference/amalgamated_fits_corHMM.html +++ b/docs/reference/amalgamated_fits_corHMM.html @@ -1,58 +1,12 @@ - - - - - - - -A wrapper for corHMM that fits Structured Hidden State Models — amalgamated_fits_corHMM • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -A wrapper for corHMM that fits Structured Hidden State Models — amalgamated_fits_corHMM • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    A wrapper for corHMM that fits Structured Hidden State Models

    -
    -
    amalgamated_fits_corHMM(td, amalgamations, ...)
    - -

    Arguments

    - - - - - - - - - - - - - - -
    td

    A treeplyr treedata object

    amalgamations

    A list produced by `amalgamate_deps`

    ...

    Additional arguments passed to `corHMM::rayDISC`

    - -

    Value

    +
    +
    amalgamated_fits_corHMM(td, amalgamations, ...)
    +
    -

    A list of fits for each character in the dataset

    +
    +

    Arguments

    +
    td
    +

    A treeplyr treedata object

    + + +
    amalgamations
    +

    A list produced by `amalgamate_deps`

    + + +
    ...
    +

    Additional arguments passed to `corHMM::rayDISC`

    + +
    +
    +

    Value

    -

    Details

    +

    A list of fits for each character in the dataset

    +
    +
    +

    Details

    This function fits the models contained in `amalgamations$M` to each of the characters in `td` using the function `corHMM::rayDISC`.

    - - -
    -
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/amalgamated_simmaps_phytools.html b/docs/reference/amalgamated_simmaps_phytools.html index 4b46103..b1733eb 100644 --- a/docs/reference/amalgamated_simmaps_phytools.html +++ b/docs/reference/amalgamated_simmaps_phytools.html @@ -1,58 +1,12 @@ - - - - - - - -A wrapper for phytools that draws stochastic character maps given a corHMM fit — amalgamated_simmaps_phytools • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -A wrapper for phytools that draws stochastic character maps given a corHMM fit — amalgamated_simmaps_phytools • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    A wrapper for phytools that draws stochastic character maps given a corHMM fit

    -
    -
    amalgamated_simmaps_phytools(fits, ...)
    - -

    Arguments

    - - - - - - - - - - -
    fits

    A list produced by `amalgamated_fits_corHMM`

    ...

    Additional arguments passed to `phytools::make.simmap`

    - -

    Value

    +
    +
    amalgamated_simmaps_phytools(fits, ...)
    +
    + +
    +

    Arguments

    +
    fits
    +

    A list produced by `amalgamated_fits_corHMM`

    + -

    A list of stochastic character maps for each character in the dataset

    +
    ...
    +

    Additional arguments passed to `phytools::make.simmap`

    + +
    +
    +

    Value

    -

    Details

    +

    A list of stochastic character maps for each character in the dataset

    +
    +
    +

    Details

    This function takes the models produced from `amalgamated_fits_corHMM` and uses them to generate stochastic character maps.

    - - -
    -
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/comb2matrices.html b/docs/reference/comb2matrices.html index 3284117..0f7cbde 100644 --- a/docs/reference/comb2matrices.html +++ b/docs/reference/comb2matrices.html @@ -1,59 +1,13 @@ - - - - - - - -Combining two matrices — comb2matrices • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Combining two matrices — comb2matrices • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Combining two matrices. The parametric schem of matrice is defined by nattural numbers; different numbers = different rate parameters

    -
    -
    comb2matrices(M1, M2, dependent.state = NULL, name.sep = "",
    -  diag.as = "")
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - -
    M1

    matrix; if dependency true thenM1 controls M2

    M2

    matrix; if dependency true then: M2 depends on those states of M1 specified in dependent.state

    dependent.state

    state(s) of M1 that switches on matrix M2

    name.sep

    separator for state names

    diag.as

    hpopulate main diagonal with

    - -

    Value

    +
    +
    comb2matrices(M1, M2, dependent.state = NULL, name.sep = "",
    +  diag.as = "")
    +
    + +
    +

    Arguments

    +
    M1
    +

    matrix; if dependency true thenM1 controls M2

    + + +
    M2
    +

    matrix; if dependency true then: M2 depends on those states of M1 specified in dependent.state

    + + +
    dependent.state
    +

    state(s) of M1 that switches on matrix M2

    + + +
    name.sep
    +

    separator for state names

    -

    Matrix

    + +
    diag.as
    +

    hpopulate main diagonal with

    + +
    +
    +

    Value

    -

    Examples

    -
    M1<-matrix(c(-1,1, 2,-2),2,2,byrow=TRUE) -rownames(M1)<-colnames(M1)<-c("0","1") -M2<-matrix(c(-3,3, 4,-4),2,2,byrow=TRUE) -rownames(M2)<-colnames(M2)<-c("0","1") -comb2matrices(M1, M2, dependent.state=NULL)
    #> 00 01 10 11 -#> 00 -4 3 1 0 -#> 01 4 -5 0 1 -#> 10 2 0 -5 3 -#> 11 0 2 4 -6
    comb2matrices(M1, M2, dependent.state=2)
    #> 00 01 10 11 -#> 00 -1 0 1 0 -#> 01 0 -1 0 1 -#> 10 2 0 -5 3 -#> 11 0 2 4 -6
    -
    - +
    +

    Examples

    +
    M1<-matrix(c(-1,1,  2,-2),2,2,byrow=TRUE)
    +rownames(M1)<-colnames(M1)<-c("0","1")
    +M2<-matrix(c(-3,3,  4,-4),2,2,byrow=TRUE)
    +rownames(M2)<-colnames(M2)<-c("0","1")
    +comb2matrices(M1, M2, dependent.state=NULL)
    +#>    00 01 10 11
    +#> 00 -4  3  1  0
    +#> 01  4 -5  0  1
    +#> 10  2  0 -5  3
    +#> 11  0  2  4 -6
    +comb2matrices(M1, M2, dependent.state=2)
    +#>    00 01 10 11
    +#> 00 -1  0  1  0
    +#> 01  0 -1  0  1
    +#> 10  2  0 -5  3
    +#> 11  0  2  4 -6
    +
    +
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/combNmatrices.html b/docs/reference/combNmatrices.html index 289eee8..e0cbe4e 100644 --- a/docs/reference/combNmatrices.html +++ b/docs/reference/combNmatrices.html @@ -1,58 +1,12 @@ - - - - - - - -Combining multiple matrices — combNmatrices • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Combining multiple matrices — combNmatrices • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Liely as independently evolving

    -
    -
    combNmatrices(list.matrices, ...)
    - -

    Arguments

    - - - - - - -
    list.matrices

    Lsit of matrices

    - -

    Value

    +
    +
    combNmatrices(list.matrices, ...)
    +
    -

    Matrix

    +
    +

    Arguments

    +
    list.matrices
    +

    Lsit of matrices

    + +
    +
    +

    Value

    -
    -
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/discr_Simmap.html b/docs/reference/discr_Simmap.html index 7932c24..fc90a02 100644 --- a/docs/reference/discr_Simmap.html +++ b/docs/reference/discr_Simmap.html @@ -1,58 +1,12 @@ - - - - - - - -Reading unsummarized Stoch Map files from ReVBayes for one tree — discr_Simmap • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Reading unsummarized Stoch Map files from ReVBayes for one tree — discr_Simmap • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Reading unsummarized Stoch Map files from ReVBayes for one tree

    -
    -
    discr_Simmap(tree, res)
    - +
    +
    discr_Simmap(tree, res)
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/discr_Simmap_all.html b/docs/reference/discr_Simmap_all.html index 4c01faa..7fd2cc0 100644 --- a/docs/reference/discr_Simmap_all.html +++ b/docs/reference/discr_Simmap_all.html @@ -1,58 +1,12 @@ - - - - - - - -Reading unsummarized Stoch Map files from ReVBayes — discr_Simmap_all • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Reading unsummarized Stoch Map files from ReVBayes — discr_Simmap_all • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Reading unsummarized Stoch Map files from ReVBayes

    -
    -
    discr_Simmap_all(tree, res)
    - +
    +
    discr_Simmap_all(tree, res)
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/dropDependentTraits.html b/docs/reference/dropDependentTraits.html index 8751ce7..6bf64a5 100644 --- a/docs/reference/dropDependentTraits.html +++ b/docs/reference/dropDependentTraits.html @@ -1,58 +1,12 @@ - - - - - - - -Utility function for cleaning up character data table after amalgamating characters — dropDependentTraits • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Utility function for cleaning up character data table after amalgamating characters — dropDependentTraits • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Utility function for cleaning up character data table after amalgamating characters

    -
    -
    dropDependentTraits(char_info, dep.mat, td)
    - +
    +
    dropDependentTraits(char_info, dep.mat, td)
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/filter_coverage.html b/docs/reference/filter_coverage.html index 953a5a7..a64b9b6 100644 --- a/docs/reference/filter_coverage.html +++ b/docs/reference/filter_coverage.html @@ -1,58 +1,12 @@ - - - - - - - -Utility function for filtering based on missing traits and taxa — filter_coverage • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Utility function for filtering based on missing traits and taxa — filter_coverage • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Utility function for filtering based on missing traits and taxa

    -
    -
    filter_coverage(td, traits = 0, taxa = 0)
    - +
    +
    filter_coverage(td, traits = 0, taxa = 0)
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/get_descendants_chars.html b/docs/reference/get_descendants_chars.html index a57e1ec..1238062 100644 --- a/docs/reference/get_descendants_chars.html +++ b/docs/reference/get_descendants_chars.html @@ -1,58 +1,12 @@ - - - - - - - -Get characters that descendants of selected ontology term — get_descendants_chars • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Get characters that descendants of selected ontology term — get_descendants_chars • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Returns all characters located (associated) with a given ontology terms

    -
    -
    get_descendants_chars(ontology, annotations = "auto", terms, ...)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - -
    ontology

    ontology_index object.

    annotations

    which annotations to use: "auto" means automatic annotations, "manual" means manual ones. -Alternatively, any othe list element containing annotations can be specified.

    terms

    IDs of ontology terms for which descendants are queried.

    ...

    other parameters for ontologyIndex::get_descendants() function

    - -

    Value

    +
    +
    get_descendants_chars(ontology, annotations = "auto", terms, ...)
    +
    + +
    +

    Arguments

    +
    ontology
    +

    ontology_index object.

    + + +
    annotations
    +

    which annotations to use: "auto" means automatic annotations, "manual" means manual ones. +Alternatively, any othe list element containing annotations can be specified.

    + + +
    terms
    +

    IDs of ontology terms for which descendants are queried.

    + -

    The vector of character IDs.

    +
    ...
    +

    other parameters for ontologyIndex::get_descendants() function

    + +
    +
    +

    Value

    -

    Examples

    -
    ontology<-HAO
    #> Error in eval(expr, envir, enclos): object 'HAO' not found
    ontology$terms_selected_id<-list(`CHAR:1`=c("HAO:0000653"), `CHAR:2`=c("HAO:0000653"))
    #> Error in ontology$terms_selected_id <- list(`CHAR:1` = c("HAO:0000653"), `CHAR:2` = c("HAO:0000653")): object 'ontology' not found
    get_descendants_chars(ontology, annotations="manual", "HAO:0000653")
    #> Error in get_descendants_chars(ontology, annotations = "manual", "HAO:0000653"): object 'ontology' not found
    -
    - +
    +

    Examples

    +
    ontology<-HAO
    +#> Error in eval(expr, envir, enclos): object 'HAO' not found
    +ontology$terms_selected_id<-list(`CHAR:1`=c("HAO:0000653"), `CHAR:2`=c("HAO:0000653"))
    +#> Error in ontology$terms_selected_id <- list(`CHAR:1` = c("HAO:0000653"),     `CHAR:2` = c("HAO:0000653")): object 'ontology' not found
    +get_descendants_chars(ontology, annotations="manual", "HAO:0000653")
    +#> Error in get_descendants_chars(ontology, annotations = "manual", "HAO:0000653"): object 'ontology' not found
    +
    +
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/get_graph_matrix.html b/docs/reference/get_graph_matrix.html index 60ded75..e152569 100644 --- a/docs/reference/get_graph_matrix.html +++ b/docs/reference/get_graph_matrix.html @@ -1,58 +1,12 @@ - - - - - - - -Get all dependency matrices given a dependecy graph — get_graph_matrix • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Get all dependency matrices given a dependecy graph — get_graph_matrix • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Construct dependency matrices and their correponding attributes

    -
    -
    get_graph_matrix(graph)
    - -

    Arguments

    - - - - - - -
    graph

    igraph object of ontology terms

    - -

    Value

    +
    +
    get_graph_matrix(graph)
    +
    + +
    +

    Arguments

    +
    graph
    +

    igraph object of ontology terms

    -

    List of matrices and their attributes

    +
    +
    +

    Value

    -

    Details

    +

    List of matrices and their attributes

    +
    +
    +

    Details

    $binary.matrices # intial binary matrices assigned to each node of graph $comb.matrices$matrix # combined matrix for each node $comb.matrices$state.string # vector of states [1] "00" "01" "10" "11" @@ -154,39 +92,35 @@

    Details and "red absent" $nodes.sorted # topologically sorted nodes $vertex.hier # hierrachy of the nodes

    - - -

    Examples

    -
    get_graph_matrix(g)
    #> Error in get_graph_matrix(g): object 'g' not found
    -
    - +
    +

    Examples

    +
    get_graph_matrix(g)
    +#> Error in get_graph_matrix(g): object 'g' not found
    +
    +
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/get_onto_id.html b/docs/reference/get_onto_id.html index 845fa81..1759182 100644 --- a/docs/reference/get_onto_id.html +++ b/docs/reference/get_onto_id.html @@ -1,58 +1,12 @@ - - - - - - - -Get IDs for ontology names — get_onto_id • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Get IDs for ontology names — get_onto_id • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Returns IDs of ontology terms given terms' names

    -
    -
    get_onto_id(vec_name, ontology, names = F)
    - -

    Arguments

    - - - - - - - - - - - - - - -
    vec_name

    names od terms

    ontology

    ontology

    names

    use element name

    - -

    Value

    +
    +
    get_onto_id(vec_name, ontology, names = F)
    +
    + +
    +

    Arguments

    +
    vec_name
    +

    names od terms

    + + +
    ontology
    +

    ontology

    + -

    vector of IDs.

    +
    names
    +

    use element name

    + +
    +
    +

    Value

    -

    Examples

    -
    vec_name=c("ventral mesofurco-profurcal muscle", "anatomical entity") -get_onto_id(vec_name, HAO)
    #> Error in match(unlist(vec_name, use.names = FALSE), ontology$name): object 'HAO' not found
    -
    - +
    +

    Examples

    +
    vec_name=c("ventral mesofurco-profurcal muscle", "anatomical entity")
    +get_onto_id(vec_name, HAO)
    +#> Error in get_onto_id(vec_name, HAO): object 'HAO' not found
    +
    +
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/index.html b/docs/reference/index.html index 0d3a075..70641cb 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -1,55 +1,12 @@ - - - - - - - -Function reference • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Function reference • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    - - - - - - - - - - -
    -

    All functions

    + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    +

    All functions

    +

    Mk_Rev()

    Make rate matrix for RevBayes

    +

    RAC_query()

    Function for aggregating characters under a specified set of terms (for example, body regions)

    +

    amalgamate_deps()

    Generates a graph and model for traits given a dependency matrix

    +

    amalgamated_fits_corHMM()

    A wrapper for corHMM that fits Structured Hidden State Models

    +

    amalgamated_simmaps_phytools()

    A wrapper for phytools that draws stochastic character maps given a corHMM fit

    +

    comb2matrices()

    Combining two matrices

    +

    combNmatrices()

    Combining multiple matrices

    +

    discr_Simmap()

    Reading unsummarized Stoch Map files from ReVBayes for one tree

    +

    discr_Simmap_all()

    Reading unsummarized Stoch Map files from ReVBayes

    +

    dropDependentTraits()

    Utility function for cleaning up character data table after amalgamating characters

    +

    filter_coverage()

    Utility function for filtering based on missing traits and taxa

    +

    get_descendants_chars()

    Get characters that descendants of selected ontology term

    +

    get_graph_matrix()

    Get all dependency matrices given a dependecy graph

    +

    get_onto_id()

    Get IDs for ontology names

    +

    init_binary_matrix()

    Initialize binary matrices given graph

    +

    init_char_matrix()

    Initialize binary matrices

    +

    list2edges()

    Convert list to edge matrix

    +

    makeTraitTree()

    Makes a trait tree using semantic similarity

    +

    make_tree_eq()

    make branch length and maps equal, use tree.tmp with rounded (3) edge.length

    +

    ontologyHeatMap()

    Plots a heatmap along with a phylogeny and trait tree

    +

    paramo()

    Final stack of maps for a set of stochastic maps stored in a directory cc chars id to stack ntrees number of trees to stack dirW directory for zip file

    +

    paramo.list()

    Final stack of maps for a set of stochastic maps stored in a list

    +

    prepareMapsRayDISC()

    Function for processing revbayes stochastic maps

    +

    prepareMapsRev()

    Function for processing revbayes stochastic maps

    +

    print_coverage()

    Function to display the number of matching species and average value across them from an Ontotrace matrix

    +

    ratemat1()

    Data object for Rev scripts

    +

    read_Simmap_Rev()

    Reading unsummarized Stoch Map files from ReVBayes

    +

    recode_td()

    recodes a treedata object based on amalgamated characters

    +

    recode_traits()

    Automatically recode amalgamated traits in PARAMO Amalgamates traits using the matrices returned by amalgamate_deps

    +

    remove_indirect()

    Remove indirect links in a dependency graph

    +

    strip_IRI()

    Utility function for stripping off url from IRI

    +

    table2list()

    Convert table to list

    +

    writeRevOntologyModels()

    Function to write Ontology CTMC models as a .Rev file for execution in Revbayes

    - +
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/init_binary_matrix.html b/docs/reference/init_binary_matrix.html index 8f3dba9..1830806 100644 --- a/docs/reference/init_binary_matrix.html +++ b/docs/reference/init_binary_matrix.html @@ -1,58 +1,12 @@ - - - - - - - -Initialize binary matrices given graph — init_binary_matrix • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Initialize binary matrices given graph — init_binary_matrix • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Call matrices are populated with different parameters

    -
    -
    init_binary_matrix(graph)
    - -

    Arguments

    - - - - - - -
    graph

    igraph object

    - -

    Value

    +
    +
    init_binary_matrix(graph)
    +
    + +
    +

    Arguments

    +
    graph
    +

    igraph object

    -

    List of matrices

    +
    +
    +

    Value

    -

    Examples

    -
    init_binary_matrix(g)
    #> Error in "igraph" %in% class(graph): object 'g' not found
    -
    - +
    +

    Examples

    +
    init_binary_matrix(g)
    +#> Error in "igraph" %in% class(graph): object 'g' not found
    +
    +
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/init_char_matrix.html b/docs/reference/init_char_matrix.html index b4be2e8..eeef9d4 100644 --- a/docs/reference/init_char_matrix.html +++ b/docs/reference/init_char_matrix.html @@ -1,58 +1,12 @@ - - - - - - - -Initialize binary matrices — init_char_matrix • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Initialize binary matrices — init_char_matrix • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Initialize binary matrices

    -
    -
    init_char_matrix(char.state, rate.param, diag.as = NA)
    - -

    Arguments

    - - - - - - - - - - - - - - -
    char.state

    names for character states

    rate.param

    names for the rate parameters

    diag.as

    values to pas to the main diagonal elements

    - -

    Value

    +
    +
    init_char_matrix(char.state, rate.param, diag.as = NA)
    +
    + +
    +

    Arguments

    +
    char.state
    +

    names for character states

    + + +
    rate.param
    +

    names for the rate parameters

    -

    matrix

    + +
    diag.as
    +

    values to pas to the main diagonal elements

    + +
    +
    +

    Value

    -
    -
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/list2edges.html b/docs/reference/list2edges.html index ccd4719..04c3d2c 100644 --- a/docs/reference/list2edges.html +++ b/docs/reference/list2edges.html @@ -1,59 +1,13 @@ - - - - - - - -Convert list to edge matrix — list2edges • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Convert list to edge matrix — list2edges • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Takes list of charater annotations amd creates an edge matrix comprising two columns: from and to. The list to table conversion can be done using ldply function from plyr package: plyr::ldply(list, rbind).

    -
    -
    list2edges(annotated.char.list, col_order_inverse = F)
    - -

    Arguments

    - - - - - - - - - - -
    annotated.char.list

    Character list with ontology annotations.

    col_order_inverse

    The default creates the first columns consisting if character IDs and the second columns consisting of ontology annatotaions. -The inverse order changes the columns order.

    - -

    Value

    +
    +
    list2edges(annotated.char.list, col_order_inverse = F)
    +
    + +
    +

    Arguments

    +
    annotated.char.list
    +

    Character list with ontology annotations.

    + + +
    col_order_inverse
    +

    The default creates the first columns consisting if character IDs and the second columns consisting of ontology annatotaions. +The inverse order changes the columns order.

    -

    Two-column matrix.

    +
    +
    +

    Value

    -

    Examples

    -
    annot_list<-list(`CHAR:1`=c("HAO:0000933", "HAO:0000958"), `CHAR:2`=c("HAO:0000833", "HAO:0000258")) -list2edges(annot_list)
    #> [,1] [,2] -#> [1,] "CHAR:1" "HAO:0000933" -#> [2,] "CHAR:1" "HAO:0000958" -#> [3,] "CHAR:2" "HAO:0000833" -#> [4,] "CHAR:2" "HAO:0000258"
    # attache plyr package and run -# ldply(annot_list, rbind) -
    -
    - +
    +

    Examples

    +
    annot_list<-list(`CHAR:1`=c("HAO:0000933", "HAO:0000958"), `CHAR:2`=c("HAO:0000833", "HAO:0000258"))
    +list2edges(annot_list)
    +#>      [,1]     [,2]         
    +#> [1,] "CHAR:1" "HAO:0000933"
    +#> [2,] "CHAR:1" "HAO:0000958"
    +#> [3,] "CHAR:2" "HAO:0000833"
    +#> [4,] "CHAR:2" "HAO:0000258"
    +# attache plyr package and run
    +# ldply(annot_list, rbind)
    +
    +
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/makeTraitTree.html b/docs/reference/makeTraitTree.html index 682af61..7365bc9 100644 --- a/docs/reference/makeTraitTree.html +++ b/docs/reference/makeTraitTree.html @@ -1,58 +1,12 @@ - - - - - - - -Makes a trait tree using semantic similarity — makeTraitTree • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Makes a trait tree using semantic similarity — makeTraitTree • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Makes a trait tree using semantic similarity

    -
    -
    makeTraitTree(td, skip = 1:2)
    - +
    +
    makeTraitTree(td, skip = 1:2)
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/make_tree_eq.html b/docs/reference/make_tree_eq.html index 0494add..cd4c710 100644 --- a/docs/reference/make_tree_eq.html +++ b/docs/reference/make_tree_eq.html @@ -1,58 +1,12 @@ - - - - - - - -make branch length and maps equal, use tree.tmp with rounded (3) edge.length — make_tree_eq • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -make branch length and maps equal, use tree.tmp with rounded (3) edge.length — make_tree_eq • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    make branch length and maps equal, use tree.tmp with rounded (3) edge.length

    -
    -
    make_tree_eq(tree.tmp, target.tr, round = 3)
    - +
    +
    make_tree_eq(tree.tmp, target.tr, round = 3)
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/ontologyHeatMap.html b/docs/reference/ontologyHeatMap.html index b79e1f1..d8e0bef 100644 --- a/docs/reference/ontologyHeatMap.html +++ b/docs/reference/ontologyHeatMap.html @@ -1,58 +1,12 @@ - - - - - - - -Plots a heatmap along with a phylogeny and trait tree — ontologyHeatMap • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Plots a heatmap along with a phylogeny and trait tree — ontologyHeatMap • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Plots a heatmap along with a phylogeny and trait tree

    -
    -
    ontologyHeatMap(td, njt, start = 3, margs = c(0.2, 0.25), ...)
    - +
    +
    ontologyHeatMap(td, njt, start = 3, margs = c(0.2, 0.25), ...)
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/paramo.html b/docs/reference/paramo.html index ace4a2c..dce8088 100644 --- a/docs/reference/paramo.html +++ b/docs/reference/paramo.html @@ -1,67 +1,21 @@ - - - - - - - -Final stack of maps for a set of stochastic maps stored in a directory +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Final stack of maps for a set of stochastic maps stored in a directory cc chars id to stack ntrees number of trees to stack -dirW directory for zip file — paramo • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + -
    -
    - -
    -
    +
    -

    Final stack of maps for a set of stochastic maps stored in a directory cc chars id to stack ntrees number of trees to stack dirW directory for zip file

    -
    -
    paramo(cc, ntrees = 10, dirW = c(""))
    - -

    Value

    +
    +
    paramo(cc, ntrees = 10, dirW = c(""))
    +
    -

    A list of stacked stochastic character maps

    +
    +

    Value

    -
    -
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/paramo.list.html b/docs/reference/paramo.list.html index 9e29eb1..3451276 100644 --- a/docs/reference/paramo.list.html +++ b/docs/reference/paramo.list.html @@ -1,58 +1,12 @@ - - - - - - - -Final stack of maps for a set of stochastic maps stored in a list — paramo.list • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Final stack of maps for a set of stochastic maps stored in a list — paramo.list • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Final stack of maps for a set of stochastic maps stored in a list

    -
    -
    paramo.list(cc, tree.list, ntrees = 1)
    - -

    Arguments

    - - - - - - - - - - - - - - -
    cc

    chars id to stack

    tree.list

    Named list with stochastic character maps

    ntrees

    number of trees to stack

    - -

    Value

    +
    +
    paramo.list(cc, tree.list, ntrees = 1)
    +
    + +
    +

    Arguments

    +
    cc
    +

    chars id to stack

    + + +
    tree.list
    +

    Named list with stochastic character maps

    -

    A list of stacked stochastic character maps

    + +
    ntrees
    +

    number of trees to stack

    + +
    +
    +

    Value

    -
    -
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/prepareMapsRayDISC.html b/docs/reference/prepareMapsRayDISC.html index f1a61b7..1439cd0 100644 --- a/docs/reference/prepareMapsRayDISC.html +++ b/docs/reference/prepareMapsRayDISC.html @@ -1,58 +1,12 @@ - - - - - - - -Function for processing revbayes stochastic maps — prepareMapsRayDISC • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Function for processing revbayes stochastic maps — prepareMapsRayDISC • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Function for processing revbayes stochastic maps

    -
    -
    prepareMapsRayDISC(td, simmaps, discretization_level = 100)
    - +
    +
    prepareMapsRayDISC(td, simmaps, discretization_level = 100)
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/prepareMapsRev.html b/docs/reference/prepareMapsRev.html index 4960d5d..49701a3 100644 --- a/docs/reference/prepareMapsRev.html +++ b/docs/reference/prepareMapsRev.html @@ -1,58 +1,12 @@ - - - - - - - -Function for processing revbayes stochastic maps — prepareMapsRev • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Function for processing revbayes stochastic maps — prepareMapsRev • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Function for processing revbayes stochastic maps

    -
    -
    prepareMapsRev(td, discretization_level = 100, start_tree = 1,
    -  end_tree = 2)
    - +
    +
    prepareMapsRev(td, discretization_level = 100, start_tree = 1,
    +  end_tree = 2)
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/print_coverage.html b/docs/reference/print_coverage.html index 8b586d6..3df3ba5 100644 --- a/docs/reference/print_coverage.html +++ b/docs/reference/print_coverage.html @@ -1,58 +1,12 @@ - - - - - - - -Function to display the number of matching species and average value across them from an Ontotrace matrix — print_coverage • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Function to display the number of matching species and average value across them from an Ontotrace matrix — print_coverage • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Function to display the number of matching species and average value across them from an Ontotrace matrix

    -
    -
    print_coverage(x)
    - +
    +
    print_coverage(x)
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/ratemat1.html b/docs/reference/ratemat1.html index 95c71e6..b6ac472 100644 --- a/docs/reference/ratemat1.html +++ b/docs/reference/ratemat1.html @@ -1,58 +1,12 @@ - - - - - - - -Data object for Rev scripts — ratemat1 • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Data object for Rev scripts — ratemat1 • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Data object for Rev scripts

    -
    -
    ratemat1()
    - +
    +
    ratemat1()
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/read_Simmap_Rev.html b/docs/reference/read_Simmap_Rev.html index aaac23a..cad3e07 100644 --- a/docs/reference/read_Simmap_Rev.html +++ b/docs/reference/read_Simmap_Rev.html @@ -1,58 +1,12 @@ - - - - - - - -Reading unsummarized Stoch Map files from ReVBayes — read_Simmap_Rev • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Reading unsummarized Stoch Map files from ReVBayes — read_Simmap_Rev • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Reading unsummarized Stoch Map files from ReVBayes

    -
    -
    read_Simmap_Rev(file, start = 1, end = 1, save = NULL)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - -
    file

    file

    start

    start from tree

    end

    end with tree

    save

    save to file. if NULL reads in R

    - +
    +
    read_Simmap_Rev(file, start = 1, end = 1, save = NULL)
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/recode_td.html b/docs/reference/recode_td.html index b16bcfa..f907624 100644 --- a/docs/reference/recode_td.html +++ b/docs/reference/recode_td.html @@ -1,58 +1,12 @@ - - - - - - - -recodes a treedata object based on amalgamated characters — recode_td • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -recodes a treedata object based on amalgamated characters — recode_td • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    recodes a treedata object based on amalgamated characters

    -
    -
    recode_td(td, traits, states, depstates = numeric(0))
    - +
    +
    recode_td(td, traits, states, depstates = numeric(0))
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/recode_traits.html b/docs/reference/recode_traits.html index 3521532..e445e36 100644 --- a/docs/reference/recode_traits.html +++ b/docs/reference/recode_traits.html @@ -1,61 +1,15 @@ - - - - - - - -Automatically recode amalgamated traits in PARAMO -Amalgamates traits using the matrices returned by amalgamate_deps — recode_traits • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Automatically recode amalgamated traits in PARAMO +Amalgamates traits using the matrices returned by amalgamate_deps — recode_traits • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Automatically recode amalgamated traits in PARAMO Amalgamates traits using the matrices returned by amalgamate_deps

    -
    -
    recode_traits(td, M)
    - -

    Arguments

    - - - - - - - - - - -
    td

    A treeplyr treedata object with characters to recode

    M

    A list produced by the function `amalgamate_deps`

    - +
    +
    recode_traits(td, M)
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/remove_indirect.html b/docs/reference/remove_indirect.html index 6ff78bf..54b9f3c 100644 --- a/docs/reference/remove_indirect.html +++ b/docs/reference/remove_indirect.html @@ -1,58 +1,12 @@ - - - - - - - -Remove indirect links in a dependency graph — remove_indirect • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Remove indirect links in a dependency graph — remove_indirect • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Function for removing redundant dependency edges from our graph

    -
    -
    remove_indirect(dependency_matrix)
    - -

    Arguments

    - - - - - - -
    dependency_matrix

    A dependency matrix

    - +
    +
    remove_indirect(dependency_matrix)
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/strip_IRI.html b/docs/reference/strip_IRI.html index c469cde..e6cefab 100644 --- a/docs/reference/strip_IRI.html +++ b/docs/reference/strip_IRI.html @@ -1,58 +1,12 @@ - - - - - - - -Utility function for stripping off url from IRI — strip_IRI • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Utility function for stripping off url from IRI — strip_IRI • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Utility function for stripping off url from IRI

    -
    -
    strip_IRI(x)
    - +
    +
    strip_IRI(x)
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/table2list.html b/docs/reference/table2list.html index 3034a04..4e6d1c2 100644 --- a/docs/reference/table2list.html +++ b/docs/reference/table2list.html @@ -1,59 +1,13 @@ - - - - - - - -Convert table to list — table2list • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Convert table to list — table2list • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Takes table where each row consists of charcter number and ontology annotations and returns a list. Each character is assigned its own ID CHAR:XXXX

    -
    -
    table2list(table, id_col = c(1), descendants_cols = c(2:ncol(table)))
    - -

    Arguments

    - - - - - - - - - - - - - - -
    table

    A character table with annotations.

    id_col

    A column ID corresponding to character

    descendants_cols

    IDs of columns corresponding to character annotations

    - -

    Value

    +
    +
    table2list(table, id_col = c(1), descendants_cols = c(2:ncol(table)))
    +
    + +
    +

    Arguments

    +
    table
    +

    A character table with annotations.

    + + +
    id_col
    +

    A column ID corresponding to character

    + -

    The list.

    +
    descendants_cols
    +

    IDs of columns corresponding to character annotations

    + +
    +
    +

    Value

    -

    Examples

    -
    # converting Sharkey_2011 data set to list of characater states -list_data<-table2list(Sharkey_2011)
    #> Error in nrow(table): object 'Sharkey_2011' not found
    -
    - +
    +

    Examples

    +
    # converting Sharkey_2011 data set to list of characater states
    +list_data<-table2list(Sharkey_2011)
    +#> Error in nrow(table): object 'Sharkey_2011' not found
    +
    +
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/writeRevOntologyModels.html b/docs/reference/writeRevOntologyModels.html index 971e60b..6c52080 100644 --- a/docs/reference/writeRevOntologyModels.html +++ b/docs/reference/writeRevOntologyModels.html @@ -1,58 +1,12 @@ - - - - - - - -Function to write Ontology CTMC models as a .Rev file for execution in Revbayes — writeRevOntologyModels • SCATE.shortcourse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Function to write Ontology CTMC models as a .Rev file for execution in Revbayes — writeRevOntologyModels • SCATE.shortcourse - - - + + -
    -
    - -
    -
    +
    -

    Function to write Ontology CTMC models as a .Rev file for execution in Revbayes

    -
    -
    writeRevOntologyModels(td, M, dir, dirW, dirR, dirD)
    - +
    +
    writeRevOntologyModels(td, M, dir, dirW, dirR, dirD)
    +
    -
    - +
    -
    + + + - - +