phyloseq

repository·master·Indexed 20 days ago

https://github.com/joey711/phyloseq

An R package designed for reproducible interactive analysis and graphics of microbiome census data. It provides a framework for managing microbiome datasets and performing statistical analyses, available via Bioconductor.

Tokens
1.3K
Snippets
4
Records
7
Agent score
21%

What's inside phyloseq

  1. Access phyloseq resources and support

    master

    Before reporting bugs or requesting features, it is recommended to consult the following resources:

    • phyloseq FAQ: Detailed answers to common questions.
    • Issue Tracker: The recommended location for feature requests, bug reports, theoretical considerations, and help requests.

    Always search previous posts in the issue tracker and check the FAQ before posting a new issue.

  2. Install phyloseq via Bioconductor

    master

    The phyloseq package is a Bioconductor package. To install it, you should use the Bioconductor installation tools (like BiocManager) within an R environment.

    For the most up-to-date and stable version, refer to the Bioconductor stable release.

    # Standard Bioconductor installation pattern
    if (!require("BiocManager", quietly = TRUE))
        install.packages("BiocManager")
    
    BiocManager::install("phyloseq")
  3. Install phyloseq via BiocManager

    master

    To install phyloseq in an R terminal, use the BiocManager package. This ensures that the correct version of the package is installed from Bioconductor.

    For more detailed information and examples, visit the phyloseq installation page.

    if(!requireNamespace("BiocManager")){ 
      install.packages("BiocManager") 
    }
    BiocManager::install("phyloseq")
  4. Access phyloseq resources and troubleshooting

    master

    Before reporting issues or seeking help, consult the following resources:

    • phyloseq FAQ: Highly recommended for troubleshooting and common questions. View FAQ
    • Issue Tracker: Use the GitHub Issue Tracker for feature requests, bug reports, theoretical considerations, and feedback.
    • Bioconductor Stable Release: For the official stable version of the package. View on Bioconductor
    • phyloseq Home Page: Visit Home Page
  5. Use rmarkdownStickyTabs to persist tab state in the URL

    master

    The rmarkdownStickyTabs jQuery plugin allows tabbed interfaces to persist their state via the URL hash. When a user clicks a tab, the URL is updated using history.pushState. On page load or when the browser's back/forward buttons are used (hashchange event), the plugin automatically activates the tab corresponding to the current URL hash. This ensures that shared links to a specific tab will open that tab directly.

    // Usage within a jQuery context
    $('.your-tab-container').rmarkdownStickyTabs();
  6. Build tabsets from section divs using buildTabsets

    master

    The buildTabsets function converts standard HTML section elements with the .tabset class into interactive Bootstrap-style tabbed interfaces.

    How it works:

    1. It identifies a container with the class .tabset.
    2. It determines the hierarchy by looking for a levelX class on the container (e.g., level1).
    3. It treats immediate sub-sections with the next level (e.g., level2) as individual tabs.
    4. It extracts the heading text from the sub-sections to create the tab navigation links.
    5. It sanitizes IDs (removing characters like . ? / & ! # < > and replacing spaces with _) to ensure compatibility with Bootstrap tab triggers.
    6. It moves the sub-sections into a .tab-content container and applies necessary Bootstrap classes (tab-pane, tabbed-pane).

    Available Options via CSS Classes:

    • .tabset-fade: Adds a fade transition effect to the tabs.
    • .tabset-pills: Uses Bootstrap pill-style navigation instead of standard tabs (nav-pills vs nav-tabs).
    • .tabset-sticky: Enables the rmarkdownStickyTabs functionality for URL-based state persistence.

    Required Parameters:

    • tocID: The ID of the Table of Contents element. The function uses this to remove any existing TOC entries associated with the IDs of the sections being converted into tabs, preventing duplicate entries.
    // Initialize tabsets on the page, providing the ID of the TOC element
    window.buildTabsets('toc-id');