Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rerun immune-deconv with v15 #605

Merged
merged 5 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/run_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ jobs:
entrypoint: mutational-signatures/run_mutational_signatures.sh
openpbta_testing: 1

#- name: Immune Deconvolution
# entrypoint: immune-deconv/run-immune-deconv.sh
- name: Immune Deconvolution
entrypoint: immune-deconv/run-immune-deconv.sh

#- name: EFO/MONDO annotation
# entrypoint: efo-mondo-mapping/run_search_and_qc.sh
Expand Down
3 changes: 3 additions & 0 deletions analyses/immune-deconv/01-immune-deconv.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ full_output <- plyr::dlply(.data = n_groups, .variables = "group", .fun = functi
expr_mat_sub <- expr_mat %>%
dplyr::select(kf_ids)

# remove features with all 0 values
expr_mat_sub <- expr_mat_sub[rowSums(expr_mat_sub) > 0,]

# deconvolute using specified method
print("Starting deconvolution...")
deconv_output <- deconvolute(gene_expression = as.matrix(expr_mat_sub),
Expand Down
43 changes: 0 additions & 43 deletions analyses/immune-deconv/02-summary-plots.R

This file was deleted.

16 changes: 0 additions & 16 deletions analyses/immune-deconv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,6 @@ results/{deconv_method}_output.rds

For `xCell`, the results in the rds file are predicted immune scores per cell type per input sample. These scores are not actual cell fractions but arbitrary scores representing enrichment of the cell types which can be compared across various cancer/gtex groups. The `quanTIseq` results, in contrast, provide an absolute score that can be interpreted as a cell fraction and the results in the rds file are the absolute scores per cell type per input sample. Depending on the user requirements, the output can also be used to create various visualizations.

#### 02-summary-plots.R

1. Input

```
results/{deconv_method}_output.rds
```

2. Function:

This script creates heatmaps from predicted immune scores.

3. Output

* `plots/{deconv_method}_heatmap_by_group.pdf`: heatmap of average immune scores per cell type per cancer group or GTEx group.

### Running the analysis

The following script will run the full analysis using either of the two methods of choice: `xCell` or `quanTIseq`. `xCell` is run by default, so to select `quanTIseq`, see code option in chunk below.
Expand Down
Binary file not shown.
Binary file not shown.
Binary file modified analyses/immune-deconv/results/quantiseq_output.rds
Binary file not shown.
Binary file modified analyses/immune-deconv/results/xcell_output.rds
Binary file not shown.
26 changes: 6 additions & 20 deletions analyses/immune-deconv/run-immune-deconv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,11 @@ Rscript --vanilla 01-immune-deconv.R \
--deconv_method 'xcell' \
--output_dir 'results'

# generate heatmaps of average normalized immune scores per cancer or gtex group
echo "Create summary plots xCell"
Rscript --vanilla 02-summary-plots.R \
--deconv_output 'results/xcell_output.rds' \
--output_dir 'plots'

### quanTIseq
# generate deconvolution output
echo "Deconvolution quanTIseq..."
Rscript --vanilla 01-immune-deconv.R \
--expr_mat '../../data/gene-expression-rsem-tpm-collapsed.rds' \
--clin_file '../../data/histologies.tsv' \
--deconv_method 'quantiseq' \
--output_dir 'results'

# generate heatmaps of average normalized immune scores per cancer or gtex group
echo "Create summary plots quanTIseq"
Rscript --vanilla 02-summary-plots.R \
--deconv_output 'results/quantiseq_output.rds' \
--output_dir 'plots'


#echo "Deconvolution quanTIseq..."
#Rscript --vanilla 01-immune-deconv.R \
#--expr_mat '../../data/gene-expression-rsem-tpm-collapsed.rds' \
#--clin_file '../../data/histologies.tsv' \
#--deconv_method 'quantiseq' \
#--output_dir 'results'
5 changes: 4 additions & 1 deletion analyses/immune-deconv/util/colors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ cohort:
'GTEx': '#7CAE00'
'PBTA': '#C77CFF'
'TARGET': '#00BFC4'

'DGD': '#FF61CC'
'Maris': '#619CFF'
'PPTC': '#CD9600'

sample_type:
'Normal' : '#7CAE00'
'Tumor' : 'brown1'
Loading