FlyPhone is a tool for analyzing cell-cell communications in Drosophila Melanogaster (fruit fly) single-cell RNA-sequencing datasets.
- 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 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)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
)There are two methods for uploading your scRNA-seq data:
-
Upload a counts matrix and metadata file
- If there are multiple samples, there should be a column labeled
Condition. - Metadata should always be a
.CSVfile. Counts can either be a.CSVfile or a.TXTfile; if it is a.TXTfile, thedelimitorargument should be specified.
- If there are multiple samples, there should be a column labeled
-
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.
-
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:
Gene- Gene nameavg_log2FC- Log 2 Fold Change valuecell_type- The cell type associated with a given gene
- 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:
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")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:Version 1- Utilizes FlyPhone v1's versionVersion 2 All- Utilizes FlyPhone v2's versionVersion 2 High- Filters the L-R pairs to include those with a "High" rankVersion 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 theConditioncolumn in your metadata.mutant_name- The mutant condition name; value should match that in theConditioncolumn in your metadata.
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 toFALSEto keep the file (which can be found in the.tempfolder); otherwise, it will be deleted upon completion. Default value isTRUE.base_output_dir- The output directory path for ofRunFlyPhone()'s. Default value is"", or the current working directory.
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)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/
If you use FlyPhoneDB/FlyPhoneDB2 please cite the respective papers:
FlyPhoneDB: FlyPhoneDB: an integrated web-based resource for cell–cell communication prediction in Drosophila
