- numpy
- scipy
- pandas
- rpy2 (for the notebooks)
- limix (local version in this repository)
- ggplot2
- reshape2
- gplots
- plyr
- pheatmap
- gcc / g++
SVCA relies on a specific version of limix found in svca_limix. You should first install this package using the setup file in svca_limix.
NB: If you are already a limix user, we recommend you install svca_limix and svca in a dedicated conda environment so there is no interference between your limix versions
cd svca_limix
python setup.py develop
Then install svca
cd ..
cd SVCA
python setup.py develop
Running SVCA on single image and single protein can be done as illustrated in the bash script
SVCA/svca/run/call_run_indiv.sh
. The script calls the run_indiv.py
script with the following inputs:
data_dir='../../examples/data/IMC_example/Cy1x7/'
directory with IMC input dataoutput_dir='./test_svca'
the output of the analysis is saved hereprotein_index=23
select the protein to be modellednormalisation='quantile'
select the normalisation method.
For the analysis of all the images and proteins we recommend to use a cluster, this is explained in the next section.
NB: For data format, look at the example in the data/IMC_example directory, which should correspond to your analysis_dir folder
We recommend using a cluster for this.
- Adapt the file
SVCA/svca/run_cluster/run_all_cluster.py
, to the queuing system used by your cluster. - Your analysis directory
analysis_dir
should contain one directory per image on which you are fitting svca - Each image folder should contain a
positions.txt
and anexpressions.txt
. Rows are cells and columns are (x,y) coordinates for the positions and genes for the expressions, with the gene names as the header for the expression file. No header for the positions. - Run
python run_all_cluster.py
in therun_cluster
directory. - Results are in a
results
directory in each image directory
- Adapt the file
SVCA/svca/plot_scripts/call_plot_signatures.sh
.in_dir
should be your analysis directory andplot_dir
the directory in which you want to save your plots. - run the file
We recommend using a cluster for this. The procedure is the exact same procedure as the one for computing variance signatures, but the file used is SVCA/svca/run_cluster/run_cross_validation_cluster.py
.
- Adapt the file
SVCA/svca/plot_scripts/plot_r2_cross_validation.R
(bottom).working_dir
should be your analysis directory andplot_dir
the directory in which you want to save your plots. - run the file
plot_r2_cross_validation.R