Overview

In this vignette, we provide a walkthrough analysis of a lentiviral barcoding study of dendritic cells as described in: \href{https://github.com/TeamPerie/HadjAbed-et-al._2022}{HadjAbed et al. 2022}. Specifically, we wish to assess if a single MPP4 can produce both the cDC1 and the cDC2 subsets in the lung or whether a single MPP4 is fate-restricted to only produce cDC1 or cDCs.

To address this research question, we used a lentiviral barcoding approach focusing on the differentiation of (Lin-, Sca-1+, cKit+, Flt3+) MPP4s towards lung-resident cDCs. Murine MPP4s were purified from the bone marrow of donor mice by fluorescence activated cell sorting and infected with the LG2.2 lentiviral barcoding library. Labelled cells where then injected I.V into 3 irradiated recipient mice. 14 days later, lungs were isolated from the mice, and barcoded cDC1s, and cDC2s were purified by FACS. Samples were then processed for barcode detection in genomic DNA by deep sequencing.

In this script we visualise key QC steps of the data before proceeding to make comparisons between cDC1 and cDC2 dendritic cells subtypes in three mice.


Install the package and load libraries

library(devtools)
devtools::install_github("TeamPerie/CellDestiny", quiet = TRUE)
library(CellDestiny)
library(ggplot2)

Load data and give duplicat variable name

Like for the application format, the first step of the QC part of the package format is to load count and metadata matrcies and give the name of the variable describing your duplicates. It corresponds to one of your metadata column name.
# set working directory
setwd(getwd())
# import files
count_matrix <- read.csv("../../testData/LentiviralBarcodingData/QC_data/QC_duplicate_matrix_Mouse_Lung_cDCs.csv.gz")
metadata <- read.csv("../../testData/LentiviralBarcodingData/QC_data/QC_duplicate_matrix_Mouse_Lung_cDCs_metadata.csv.gz")

metadata
Here, it is "duplicates".
# Common parameters
dup_var="duplicates"
dup_val=metadata$duplicates

Reformat matrix for QC

The first function to call is ReformatQCmatrix() that calcul correlations and transforms your count matrix in a way that fits MakeDuplicatesMatrix() or MakeRepeatUseMatrix() input matrix format.

qc_mat<-ReformatQCmatrix(count_matrix, metadata, dup_var, dup_val, 
                         sampleNameFieldsep = "_", transformation = "arcsin")

# Here, sampleNameFieldsep and transformation parameters are set to default 
# ones. 
# The transformation is applied to duplicat columns and saved in trans_dup1 and 
# trans_dup2 column names as follow. 

head(qc_mat)

Assess the frequency of repeat-use barcodes


The integration of the same barcode into multiple cells, called repeat usage, is also an important QC metric that should be considered in a lineage tracing analysis pipeline, as a high incidence of repeat usage may lead to false lineage relationship assignments. The transfer of progenitors from the same transduction batch into at least two separate mice, followed by subsequent comparison of the barcodes recovered from those mice, can be used to estimate the frequency of repeat barcode use within one mouse.

We want to plot duplciates of all samples, not specific ones. To do so, we select all values from a variable (here variable "type" and its values : "cDC1" and "cDC2").
# parameter describing our cell types 
list_var = c("type")
list_val = metadata$type

dup_mat<-MakeDuplicatesMatrix(matrix = qc_mat, 
                              listVar = list_var, listVal = list_val, 
                              metadata = metadata)
PlotDuplicates(dup_mat, dup_val, transformation = "arcsin")

Repeat Use checking

Here we assess the frequency of repeat use barcodes in the data. Repeat used barcodes are compared between individuals. Hence, fill out the variable name describing your individuals and all its values.

# parameter describing our cell types 
list_var = c("type")
list_val = metadata$type
#parameters
indiv_var="mouse"
indiv_val=metadata$mouse

ru_mat<-MakeRepeatUseMatrix(qc_mat, indiv_var, indiv_val)
PlotRepeatUse(ru_mat, indiv_var,textSize = 12)
Both duplicates and repeat use checking are ok. We can now go further in the biological analysis. Open 2.User_manual_for_analysis.html file.


TeamPerie/CellDestiny documentation built on July 4, 2022, 8:40 a.m.