Skip to content

Commit c57746e

Browse files
committed
Update AD SEA analysis
1 parent 4a69dd6 commit c57746e

2 files changed

Lines changed: 7 additions & 13 deletions

File tree

paper/SEA-AD/2-DE.R

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,6 @@ df.deseq$ensembl_gene_id <- mapped_gene_names_to_ensembls(df.deseq$gene_names, m
145145
write.csv(df.deseq, paste0(path_rs, 'res.', celltype_filestr, '.deseq.csv'))
146146

147147

148-
149-
150-
151148
# RUV+DESeq ----
152149
ruv_r <- ruv::getK(as.matrix(t(pb)), as.matrix(as.numeric(covs$trt)-1), Z=covs.mx)
153150
r <- min(ruv_r$k, 10)
@@ -162,16 +159,16 @@ write.csv(df.ruv, paste0(path_rs, 'res.', celltype_filestr, '.ruv.csv'))
162159

163160

164161
# causarray ----
165-
166-
# Select the number of unmeasured confounders
167-
# res.causarray.r <- estimate_r_causarray(t(pb), covs.mx, as.matrix(as.numeric(covs$trt)-1), seq(5,80,5))
162+
# # Select the number of unmeasured confounders
163+
# res.causarray.r <- estimate_r_causarray(t(pb), covs.mx, as.matrix(as.numeric(covs$trt)-1), seq(5,50,5))
168164
# write.csv(res.causarray.r, paste0(path_rs, 'res.causarray.', celltype_filestr, '.r.csv'))
169-
# fig <- causarray$plot_r(res.causarray.r[res.causarray.r$r<=100,])
170-
# fig$savefig(paste0('res.causarray.', celltype_filestr, '.r.pdf'), dpi=300)
165+
# fig <- causarray$plot_r(res.causarray.r)
166+
# fig$savefig(paste0(dataset, '-res.causarray.', celltype_filestr, '.r.pdf'), dpi=300)
167+
171168

172169
r <- 10
173170
res.causarray <- run_causarray(t(pb), covs.mx, as.matrix(as.numeric(covs$trt)-1), r=r, verbose=TRUE,
174-
# glm_alpha=.1, shrinkage=T,
171+
kwargs_regr = list(ccp_alpha=ifelse(dataset=='PFC', 0.07, 0.06)),
175172
ps_model=ps_model, fdx=TRUE,
176173
)
177174

paper/SEA-AD/run.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
python 1-prepare_data.py > out.txt 2>&1
2-
mv out.txt data/out-py.txt
3-
41
for dataset in "PFC" "MTG"
52
do
63
## Preprocessing
74
Rscript --no-save --no-restore --verbose 1-preprocess.R ${dataset} > out-${dataset}.txt 2>&1
85
mv out-${dataset}.txt data/out-${dataset}.txt
96

10-
for ps_model in "logistic" "random_forest_cv"
7+
for ps_model in "random_forest_cv"
118
do
129
## DE test
1310
Rscript --no-save --no-restore --verbose 2-DE.R ${ps_model} ${dataset} > out-${dataset}.txt 2>&1

0 commit comments

Comments
 (0)