Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 2.94 KB

buildingmodels.md

File metadata and controls

39 lines (29 loc) · 2.94 KB

Building the cell type models using TCGA datasets

Guide on how to build cell type models using TCGA datasets with FF slides. Here, all spotlight modules are used (see spotlight modules).

Set up containers

  1. Create apptainer/singularity containers from Docker images:
# 1. save docker as tar or tar.gz (compressed)
docker save joank23/spotlight -o spotlight.tar.gz
# 2. build apptainer (.sif) from docker (.tar)
apptainer build spotlight.sif docker-archive:spotlight.tar.gz

# 1. save docker as tar or tar.gz (compressed)
docker save joank23/immunedeconvr -o immunedeconvr.tar.gz
# 2. build apptainer (.sif) from docker (.tar)
apptainer build immunedeconvr.sif docker-archive:immunedeconvr.tar.gz
  1. Download retrained models to extract the histopathological features, available from Fu et al., Nat Cancer, 2020 (Retrained_Inception_v4). Once you unzip the folder, extract the files to the data/checkpoint/Retrained_Inception_v4/ folder.

Guide

  1. Download metadata/clinical data, i.e. "biospecimen -> TSV", unzip and keep slide.tsv, then rename slide.tsv to clinical_file_TCGA_{cancer_type_abbrev} such as clinical_file_TCGA_SKCM.tsv and copy to /data. Example dataset TCGA-SKCM can be downloaded here.
  2. Download TCGA bulkRNAseq data via the Firehose Tool from the BROAD Institute, the files required are: "illuminahiseq_rnaseqv2-RSEM_genes" and unzip the downloaded file (.tar.gz)
  3. Download tissue slides from the GDC Data Portal and store in a folder.
  4. Download retrained models to extract the histopathological features, available from Fu et al., Nat Cancer, 2020 (Retrained_Inception_v4). Once you unzip the folder, extract the files to the data/checkpoint/Retrained_Inception_v4/ folder.
  5. Download the signatures/published scores in the table provided here.
  6. Adapt the parameters file nf-params-buildmodel.yml.
  7. Adapt Nexflow configuration file accordingly, example see nf-custom.config
# Assuming you're in the cloned/forked GitHub repo
nextflow run ${PWD} -profile apptainer -c "nf-custom.config" -params-file assets/examples/nf-params-buildmodel.yml -outdir "output-tcga-model"

Please rename your images file names, so they only include "-", to follow the same sample coding used by the TCGA.

NOTE: there are additional parameters that can be changed, nf-params-buildmodel.yml includes the minimal parameters that need to be set. For the other parameters please check spotlightmodules.