Skip to content

FlyPhone is a tool for analyzing cell-cell communications in Drosophila Melanogaster (fruit fly) single-cell RNA-sequencing datasets.

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

FullStackGoogler/FlyPhoneDB2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlyPhoneDB2

Overview

FlyPhone is a tool for analyzing cell-cell communications in Drosophila Melanogaster (fruit fly) single-cell RNA-sequencing datasets.

Changes in V2

  • Previous standalone R program is now a R package!
  • New functionality to investigate the differences of cell-cell communication events for multi-samples.
  • Core algorithm has been improved, resulting in significantly faster compute times.
  • Ligand-Receptor (L-R) database has been greatly expanded to include 1804 L-R pairs with varying degrees of confidence, ranging between "low", "moderate", and "high".
  • Added more cell-cell communication visualizations, as well as improving on previous visualization types.
  • Added visualizations to analyze pathway activity by taking into consideration downstream reporter genes.

Installation

Installation is simple with the use of the devtools package.

# devtools package should be installed and loaded prior to running this command
install_github('FullStackGoogler/FlyPhoneDB2', force = TRUE)

Usage

The entire FlyPhone pipeline can be ran with RunFlyPhone(). See below for detailed documentation on each of its parameters.

RunFlyPhone(
    knowledgebase_version,
    counts_fn,
    metadata_fn,
    delimitor,
    seuratObject,
    DEG,
    control_name,
    mutant_name,
    pct_filter,
    perm_times,
    deletePE,
    base_output_dir
)

Input Data

There are two methods for uploading your scRNA-seq data:

  1. Upload a counts matrix and metadata file

    • If there are multiple samples, there should be a column labeled Condition.
    • Metadata should always be a .CSV file. Counts can either be a .CSV file or a .TXT file; if it is a .TXT file, the delimitor argument should be specified.
  2. Upload a Seurat Object (Recommended)

    • Recommended data format, as large Counts data files can take a long time to be read in and processed.
    • The meta.data in the Seurat Object should still have a column labeled Condition.
  3. Differentially Expressed Genes (DEG) file

    • This file is required for the multi-sample DEG analysis. If there are multiple samples but a DEG file is not provided, FlyPhone will run the equivalent of single-sample analysis on each sample. The required columns are listed below:
      1. Gene - Gene name
      2. avg_log2FC - Log 2 Fold Change value
      3. cell_type - The cell type associated with a given gene

A test data set generated from a down-sampled Seurat object (Yki Day 5 snRNA-sequencing) can be accessed using the function data(example_seurat_obj). You may use this data set to ensure your metadata matches the format expected by FlyPhone and to see an example of the visualizations/output generated by the tool. A non down-sampled test data set is also available for download in the web-version of the tool. To run FlyPhone using the example dataset, the following commands can be run:

library(FlyPhone)
data("example_seurat_obj")
saveRDS(example_seurat_obj, "example_seurat_object.rds")
RunFlyPhone(knowledgebase_version = "Version 2 High", seuratObject = "example_seurat_object.rds")

Required Parameters

These variables are required, regardless of the data uploaded:

  • knowledgebase_version - Specifies which version of FlyPhone's knowledge base (Ligand-Receptor pairs & Core components information) to use when running the pipeline. Valid options are:

    1. Version 1 - Utilizes FlyPhone v1's version
    2. Version 2 All - Utilizes FlyPhone v2's version
    3. Version 2 High - Filters the L-R pairs to include those with a "High" rank
    4. Version 2 High/Moderate - Filters the L-R pairs to include those with either a "High" or "Moderate" rank

These variables are required if there are multiple samples present

  • control_name - The control condition name; value should match that in the Condition column in your metadata.
  • mutant_name - The mutant condition name; value should match that in the Condition column in your metadata.

Optional Parameters

The remaining arguments are optional and have default values:

  • pct_filter - Any genes with a percent expression across all cells below this threshold will be ignored in the analysis. Default value is 10% (0.1).
  • perm_times - The number of times to run the permutation test for generating the p-value scores that determine the significance of a Ligand-Receptor signaling pair for any given celltypes. Larger values may result in more accurate results, but will take longer to run. Default value is 1,000.
  • deletePE - RunFlyPhone() generates a percentage expression file for later analysis. If desired, set this argument to FALSE to keep the file (which can be found in the .temp folder); otherwise, it will be deleted upon completion. Default value is TRUE.
  • base_output_dir - The output directory path for of RunFlyPhone()'s. Default value is "", or the current working directory.

Optional Usage

If you don't want to run the entire pipeline of FlyPhone in one go, you can run either of the following functions (depending on your dataset type) to only generate the interaction data:

RunSingleAnalysis(
    knowledgebase_version,
    counts_fn,
    metadata_fn,
    delimitor,
    seuratObject,
    pct_filter,
    perm_times,
    deletePE,
    base_output_dir
)
RunMultiAnalysis(
    knowledgebase_version,
    counts_fn,
    metadata_fn,
    delimitor,
    seuratObject,
    DEG,
    control_name,
    mutant_name,
    pct_filter,
    perm_times,
    deletePE,
    base_output_dir
)

Afterwards, using the files generated by those functions, you can run the visualization functions separately:

# Multi Analysis Visualizations
ChordDiagramMulti(output_dir = NULL, results, cellTypes = NULL)
CirclePlotMulti(output_dir = NULL, results, pathwayObj, pathways = NULL, cellTypes = NULL)
HeatmapMulti(output_dir = NULL, DEG, pathwayObj, pathways = NULL)
InteractionStrengthMulti(output_dir = NULL, results)
# Single Analysis Visualizations
ChordDiagramSingle(output_dir = NULL, results, cellTypes = NULL)
CirclePlotSingle(output_dir = NULL, results, pathwayObj, pathways = NULL, cellTypes = NULL)
DotPlotSingle(output_dir = NULL, seuratObj, pathwayObj, pathways = NULL)
HeatmapSingle(output_dir = NULL, seuratObj, pathwayObj, pathways = NULL)
InteractionStrengthSingle(output_dir = NULL, resultFileList)

Web-based version

In addition to the R package, we've also built a website with the following functionality:

  • Analysis Pipeline - GUI for the FlyPhone pipeline. Users can upload their data, where it will then be ran on the cloud. Once finished, you'll have a link containing your results.
  • Annotation Explorer - Explore the latest version of our knowledge base (currently v2.5).
  • Community Annotation - A form that allows you to submit your own Ligand-Receptor annotation, where it will then be reviewed before being added to the knowledge base.
  • Example Analysis - To provide users with a better idea of what our tool returns, we've analyzed a fullbody scRNA-seq dataset from Yorkie tumor flies and have provided explanations.

Link: https://www.flyrnai.org/tools/fly_phone_v2/web/

image

Citing FlyPhoneDB2

If you use FlyPhoneDB/FlyPhoneDB2 please cite the respective papers:

FlyPhoneDB: FlyPhoneDB: an integrated web-based resource for cell–cell communication prediction in Drosophila

FlyPhoneDB2: FlyPhoneDB2: A computational framework for analyzing cell-cell communication in Drosophila scRNA-seq data integrating AlphaFold-multimer predictions

About

FlyPhone is a tool for analyzing cell-cell communications in Drosophila Melanogaster (fruit fly) single-cell RNA-sequencing datasets.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages