This repository contains scripts necessary for replication of analyses presented in paper of Andreyeva et al.:
IFNG-producing self-reactive CD4+ T cells drive autoimmune adrenalitis in a mouse model of Addison’s disease
Link: COMING SOON!
Data Accession: https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE303645
The repository also provides an R script to perform a re-analysis of data from Nishijima et al. paper (https://pubmed.ncbi.nlm.nih.gov/34930780/). The related data that were used here are located on this page.
The GitHub repository contains following files:
- Adrenals_Hashtag-Filter.Rmd: Used for demultiplexing of samples in data. It generateds Hashtags directory, where lists (spearate CSV files) of cells for each hashtag are stored.
- Adrenals_Creation_of_Data_Set_without_Rps_Mt.Rmd: Performs analysis of data. It generates Datasets directory, where data sets will be stored, and DEA directory, where Differential Expression Analyses will be stored.
- Adrenals_figures_finalized.Rmd: generates final figures. These are stored in created Figures directory and its subdirectories. It also generated Extended tables; these are stored in Extended_Tables directory.
- VDJ_utilities.R: Utilities for handling VDJ data as meta data.
- VDJ_Mixcr_import.R: Utility script; mainly transforms MiXCR - generated data and turns them into 10X-like format to be ready for import.
- Adrenals_Library.csv: A file needed to run mapping by 10X Cell ranger. **The /path/to/GitHub/directory needs to be replaced by absolute path to where this repository was cloned (ending with Project_Adrenalitis).
- Reanalysis_Nishijima_2022_final.R: Script used to re-analyze of data from Nishijima et al. paper.
It also contains following directories:
- GEX_VDJ: Contains MiXCR generated tables to provide supplemental VDJ information obtained from GEX data.
Before running analysis, you need to make sure you have:
- Cell ranger 5.0.1 installed that can be run with cellranger command;
- All required packages for R (see scripts);
- GRCm38 reference/transcriptome, which was made according to the instructions for Cell ranger v5.0.1 from Ensembl primary assembly MM file, version 102);
- IMGT VDJ reference for mouse, which was also made according to the instructions on site for Cell ranger v5.0.1, but includes genes TRBV26*01, TRBV26*02, TRBV21*01, TRAV13N-4*01 and TRBV30*1, which were missing in originally created data. You'll need to find these filesat IMGT and inssert them manually before creating reference due to licence reasons.
COMING SOON: Repository to create these files more easily.
- Clone this project. You'll end up with Project_Adrenalitis directory.
git clone https://github.com/Lab-of-Adaptive-Immunity/Project_Adrenalitis.git
cd Project_Adrenalitis
- Create Fastq directory and go into it.
mkdir Fastqs
cd Fastqs
- Download Fastq files. These files must be stored in Fastqs directory! Once done, return into root of the project. DETAILS COMING SOON!
cd .. # Return to root of project
- Perform mapping. Before starting with mapping itself, you need to have your GRCm38 v102 reference ready (see above) and you need to modify Adrenals_Library.csv by replacing /path/to/GitHub/directory/ with your current path (ie. if you cloned directory to path /home/johndoe/, then the /path/to/GitHub/directory/ would be replaced by /home/johndoe/Project_Adrenalitis/). Once done, you run the nalaysis with command:
cellranger count --id=E06_W3_All --transcriptome=/path/to/transcriptome/GRCm38_v102 --libraries=Library_E06_W3.csv --feature-ref=FeatureReference.csv --localcores=8
where /path/to/transcriptome/GRCm38_v102 is path to your reference/transcriptome (see above) and FeatureReference.csv can be downloaded from GEO NCBI (where FASTQ files are). --localcores specifies the number of cores and number should be lower or equal to the number of cores your PC has.
- Perform VDJ analysis. This is done with command:
cellranger vdj --id=E06_W3_VDJ_All --reference=/path/to/IMGT_Mouse_VDJ --fastqs=Fastqs/ --sample=E06_W3_VDJ --localcores=8
where /path/to/IMGT_Mouse_VDJ is path to your murine IMGT reference.
- Consecutively run, ideally in RStudio:
- Adrenals_Hashtag-Filter.Rmd;
- Adrenals_Creation_of_Data_Set_without_Rps_Mt.Rmd;
- Adrenals_figures_finalized.Rmd.
The order of running these files is important, as the following files depend on results of those preceding it.
Now you should have files with complete analyses. Notably, there should be directories Hashtags, Datasets, Figures with various subdirectories, and Extended_Tables.
- While in root of cloned directory (Project_Adrenalitis), create directory Nishijima and subdirectories Ctrl1, Ctrl2, KO1 and KO2.
mkdir Nishijima
cd Nishijima
mkdir Ctrl1 Ctrl2 KO1 KO2
-
Download data from on this page. Specifically, you need to download data from samples TECs control batch1, TECs AireKO batch1, TECs control batch2 and TECs AireKO batch2 to subdirectories Ctrl1, KO1 Ctrl2 and KO2 respectively. You need to download all Supplementary files (barcodes, features and matrix itself), then rename them to barcodes.tsv.gz, features.tsv.gz and matrix.tsv.gz respectively. Then return to root of the project.
-
When in root of project, run Reanalysis_Nishijima_2022_final.R script.
Rscript Reanalysis_Nishijima_2022_final.R
Note that figures here are not saved.
In case of questions, feel free to send e-mail to juraj.michalik@img.cas.cz.