Skip to content

Commit

Permalink
Merge pull request #20 from Tobi1kenobi/main
Browse files Browse the repository at this point in the history
Small celltypist changes
  • Loading branch information
maxozo authored Apr 25, 2024
2 parents 7b20a93 + 3d1a981 commit f79d40d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

## Introduction

**nf-core/yascp** is a bioinformatics best-practice analysis pipeline for deconvolution, qc, clustering, integration of a single cell datasets.
This is a large scale single-cell pipeline developed initially for processing Cardinal project samples, however it is applicable to any other scRNA analysis. The pipeline has been inspired by [deconvolution](https://github.com/wtsi-hgi/nf_scrna_deconvolution.git ), [cellbender](https://github.com/wtsi-hgi/nf_cellbender ) and [qc](https://github.com/wtsi-hgi/nf_qc_cluster/tree/main ) pipelines initially developed in Anderson lab.
**nf-core/yascp** is a bioinformatics best-practice analysis pipeline tailored for deconvolution, quality control, clustering, and integration of single-cell datasets. Developed under the leadership of N.Soranzo and Human Genetics Informatics (HGI), this large-scale single-cell pipeline was originally crafted for the Cardinal project (profiling UKBB and ELGH participants) but is versatile enough for broader scRNA analysis applications. The foundational ideas were inspired by earlier pipelines from Anderson lab but has been expanded, specifically those for [deconvolution](https://github.com/wtsi-hgi/nf_scrna_deconvolution.git), [cellbender](https://github.com/wtsi-hgi/nf_cellbender), and [quality control and clustering](https://github.com/wtsi-hgi/nf_qc_cluster/tree/main). This ensures a robust integration of proven methodologies tailored to meet the demands of expansive single-cell data analysis.

Input requires a tsv seperated file [(please read detailed documentation here)](https://github.com/wtsi-hgi/yascp/tree/yascp_docs) with paths and if running in an genotype additional input is required to be provided in an input.nf file pointing to the vcf location. This pipeline is designed to be used any large scale single cell experiments.

Expand Down
3 changes: 1 addition & 2 deletions bin/run_celltypist.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def run_celltypist(samplename, filtered_matrix_h5, celltypist_model,

# Indeed, the `model` argument defaults to `Immune_All_Low.pkl`.
logging.info("celltypist_model: " + celltypist_model)
celltypist_model1 = celltypist_model.split('.')[0]
celltypist_model1 = os.path.splitext(os.path.basename(celltypist_model))[0]
# print(os.listdir('/tmp/.celltypist/data/models'))
model = models.Model.load(model = celltypist_model ) # model = 'Immune_All_Low.pkl')
model.description
Expand All @@ -172,7 +172,6 @@ def run_celltypist(samplename, filtered_matrix_h5, celltypist_model,

adata = predictions.to_adata()


predictions.to_table(folder = output_dir, prefix = samplename + '___'+celltypist_model1+'___')
Data = adata.obs
Data= Data.drop('cell_barcode',axis=1)
Expand Down
4 changes: 2 additions & 2 deletions modules/nf-core/modules/celltypist/main.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

process CELLTYPIST {
tag "${samplename}"
tag "${model}_${sample}"
label 'process_medium_memory'
publishDir "${params.outdir}/celltype/celltypist/${model}/${sample}/", mode: "${params.celltypist.copy_mode}", overwrite: true,
saveAs: {filename -> filename.replaceFirst("outputs/","").replaceFirst("figures/","") }
Expand All @@ -27,7 +27,7 @@ process CELLTYPIST {
tuple val(sample), path("outputs/plot_prob/*_*.pdf"), emit: sample_plots_prob_pdf

script:
model="${celltypist_model}".replaceFirst(".pkl","")
model="${celltypist_model}".replaceAll(/^.*[\\/]/, "").replaceFirst(".pkl","")

filtered_matrix_h5_path = file("${filtered_matrix_h5}/../filtered_feature_bc_matrix.h5")
if (filtered_matrix_h5_path.exists()){
Expand Down

0 comments on commit f79d40d

Please sign in to comment.