Skip to content

Commit

Permalink
Merge branch 'v1.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
Matiss Ozols committed Oct 23, 2024
2 parents bf69c4d + 172a480 commit f5832d1
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 25 deletions.
2 changes: 1 addition & 1 deletion bin/totalVI.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
model = scvi.model.TOTALVI(SLEmap,latent_distribution="normal",n_layers_decoder=2)

model.train()
model.save("./scvi_model_300samples",adata=SLEmap, overwrite=True)
model.save("./scvi_model",adata=SLEmap, overwrite=True)


# Get latent expression from model: used for UMAP calculations
Expand Down
4 changes: 4 additions & 0 deletions conf/qc.conf
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ params{
run_process=false
}

seurat_integration{
run_process=false
}

bbknn{
run_process = true
description = 'Parameters for BBKNN'
Expand Down
16 changes: 11 additions & 5 deletions modules/nf-core/modules/totalVi/main.nf
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
process TOTAL_VI_INTEGRATION{

if (params.utilise_gpu){
label 'gpu'
label 'process_low'
}else{
label 'process_medium'
label 'process_low'
}

publishDir path: "${outdir_prev}/totalVi",
mode: "${params.copy_mode}",
overwrite: "true"

if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "/lustre/scratch123/hgi/teams/hgi/mo11/tmp_projects/sle_project/5.sle_noCB_fullRun_MAD_perPool/yascp_totalvi_v1.sif"
container "https://yascp.cog.sanger.ac.uk/public/singularity_images/yascp_totalvi_v1.sif"
} else {
container "wtsihgi/nf_scrna_qc:6bb6af5"
}

input:
path(adata)
path(citedata)
val(outdir_prev)

// output:
// val(outdir, emit: outdir)
output:
path("./figures"), emit: figs, optional: true
path("./scvi_model"), emit: scvi_model, optional: true
path("./totalVI_integrated.h5ad"), emit: totalVI_integrated, optional: true

script:

Expand Down
8 changes: 6 additions & 2 deletions subworkflows/main_deconvolution.nf
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,12 @@ workflow main_deconvolution {
// vir_inp.subscribe { println "vir_inp: $it" }
vir_inp2 = vir_inp.collect()
vir_inp3 = vireo_paths.collect()
vireo_paths2 = gt_matcher_inp = vir_inp3.combine(vir_inp2)

vireo_paths2 = gt_matcher_inp = vir_inp3.mix(vir_inp2)

vireo_paths2.subscribe { println "1:: vireo_paths2 $it" }
vir_inp2.subscribe { println "1:: vir_inp2 $it" }
vir_inp3.subscribe { println "1:: vir_inp3 $it" }

GENOTYPE_MATCHER(gt_matcher_inp)

matched_donors = GENOTYPE_MATCHER.out.matched_donors
Expand Down
36 changes: 19 additions & 17 deletions subworkflows/qc.nf
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ workflow qc {


if(params.totalVi.run_process){
TOTAL_VI_INTEGRATION(NORMALISE_AND_PCA.out.anndata,DSB_PROCESS.out.citeseq_rsd.collect())
TOTAL_VI_INTEGRATION(NORMALISE_AND_PCA.out.anndata,DSB_PROCESS.out.citeseq_rsd.collect(),NORMALISE_AND_PCA.out.outdir)
}


Expand All @@ -110,24 +110,26 @@ workflow qc {
matched_donors.subscribe { println "1:: matched_donors $it" }
PREPROCESS_PROCESS(inp4,params.reduced_dims.vars_to_regress.value)

DSB_INTEGRATE(
PREPROCESS_PROCESS.out.tmp_rsd.collect(),
params.reduced_dims.vars_to_regress.value,
params.reduced_dims.seurat_integration.k_anchor,
params.reduced_dims.seurat_integration.dims,
params.reduced_dims.seurat_integration.ndim_sct,
params.reduced_dims.seurat_integration.ndim_citeBgRemoved,
params.reduced_dims.seurat_integration.ndim_cite_integrated
if(params.seurat_integration.run_process){
DSB_INTEGRATE(
PREPROCESS_PROCESS.out.tmp_rsd.collect(),
params.reduced_dims.vars_to_regress.value,
params.reduced_dims.seurat_integration.k_anchor,
params.reduced_dims.seurat_integration.dims,
params.reduced_dims.seurat_integration.ndim_sct,
params.reduced_dims.seurat_integration.ndim_citeBgRemoved,
params.reduced_dims.seurat_integration.ndim_cite_integrated
)

MULTIMODAL_INTEGRATION(
DSB_INTEGRATE.out.tmp_rds_file,
)

MULTIMODAL_INTEGRATION(
DSB_INTEGRATE.out.tmp_rds_file,
)

VDJ_INTEGRATION(
chanel_cr_outs.collect(),
MULTIMODAL_INTEGRATION.out.wnn_integrated_file
)
VDJ_INTEGRATION(
chanel_cr_outs.collect(),
MULTIMODAL_INTEGRATION.out.wnn_integrated_file
)
}
}


Expand Down

0 comments on commit f5832d1

Please sign in to comment.