Skip to content

It read and process loom files from FlyCellAtlas to be compatible with Seurat

License

Unknown, MIT licenses found

Licenses found

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

ipatop/FlyCellAtlas.download.with.annotations

Repository files navigation

FlyCellAtlas.download.with.annotations

The goal of FlyCellAtlas.download.with.annotations is to put the data from the FlyCellAtlas into a Seurat object. This proved to be complicated using functions from Seurat and impossible only using the loom files.

The functions of the package will requiere both 10X loom AND h5ad files from FlyCellAtlas

The function loom_too_Seurat will only read the objects from FlyCellAtlas and transform it in a Seurat object. This object only has the most variable gene expression. The function loom_too_Seurat_brandNew will read the objects from FlyCellAtlas and transform it in a NEW Seurat object and perform new dimensional reduction. This is useful to get all the genes in a propper format. It is also useful to just have a fresh start but with the celltype annotation from the FlyCellAtlas paper. The function read_loom_and_analyze will perform multiple analyses. It will load and save the Seurat object from the paper, reanalyze it into a new object and also calculate marker genes for both analyzes. This will be saved in an RData object. All functions have the option to generate and save general plots.

Installation

You can install the development version of FlyCellAtlas.download.with.annotations from GitHub with:

# install.packages("devtools")
devtools::install_github("ipatop/FlyCellAtlas.download.with.annotations")

Example

Load library

library(FlyCellAtlas.download.with.annotations)

Analyze bodywall example

#Files are in https://flycellatlas.org
# Here we download the body wall 10X loom and h5ad
download.file(url = "https://cloud.flycellatlas.org/index.php/s/egxzns8NgtCjonB/download",destfile = "./bodywall.loom")
download.file(url = "https://cloud.flycellatlas.org/index.php/s/sZZMSbcNk4SWtHE/download",destfile = "./bodywall.h5ad")

loom_file<-"./bodywall.loom"
h5ad_file<-"./bodywall.h5ad"
## basic example code to create a new Seurat object with annotations from FlyCellAtlas
bodywall_new<-loom_too_Seurat_brandNew(loom_file =loom_file,h5ad_file=h5ad_file)

Now bodywall_new is a Seurat object we can not plot etc

DimPlot(bodywall_new,repel = T,label = T,reduction = "umap", group.by = "annotation")+ NoLegend()

This is the general structure of the flyCellAtlas data:

head(bodywall_new@meta.data)

You see that you can then color by sex or batch

DimPlot(bodywall_new,repel = T,label = T,reduction = "umap", group.by = "sex")+ NoLegend()

About

It read and process loom files from FlyCellAtlas to be compatible with Seurat

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages