workflows/annotation/scgpt_annotation

Description

Cell type annotation workflow using scGPT.
The workflow takes a pre-processed h5mu file as query input, and performs

  • subsetting for HVG

  • cross-checking of genes with the model vocabulary

  • binning of gene counts

  • padding and tokenizing of genes

  • transformer-based cell type prediction
    Note that cell-type prediction using scGPT is only possible using a fine-tuned scGPT model.

Type

nextflow_script

Contributors

Run this component

Run the following command to execute this component with Nextflow:

cat > params.yaml <<'EOM'  
id: "run"  
modality: [ "rna" ]  
finetuned_checkpoints_key: [ "model_state_dict" ]  
label_mapper_key: [ "id_to_class" ]  
output: "$id.$key.output.h5mu"  
output_obs_predictions: [ "scgpt_pred" ]  
output_obs_probability: [ "scgpt_probability" ]  
pad_token: [ "<pad>" ]  
pad_value: [ -2 ]  
n_hvg: [ 1200 ]  
dsbn: [ true ]  
batch_size: [ 64 ]  
n_input_bins: [ 51 ]  
publish_dir: "output/"  
EOM

nextflow run https://packages.viash-hub.com/vsh/openpipeline.git \  
  -revision 2.0.0 \  
  -main-script target/nextflow/workflows/annotation/scgpt_annotation/main.nf \  
  -params-file params.yaml  

Query input

Name
Type & Properties
--id
string
required
--input
file
required
--modality
string
--input_layer
string
--input_var_gene_names
string
--input_obs_batch_label
string
required

Model input

Name
Type & Properties
--model
file
required
--model_config
file
required
--model_vocab
file
required
--finetuned_checkpoints_key
string
--label_mapper_key
string

Outputs

Name
Type & Properties
--output
file
required
output
--output_compression
string
--output_obs_predictions
string
--output_obs_probability
string

Padding arguments

Name
Type & Properties
--pad_token
string
--pad_value
integer

HVG subset arguments

Name
Type & Properties
--n_hvg
integer

Tokenization arguments

Name
Type & Properties
--max_seq_len
integer

Embedding arguments

Name
Type & Properties
--dsbn
boolean
--batch_size
integer

Binning arguments

Name
Type & Properties
--n_input_bins
integer
--seed
integer

Collaborate Accelerate Succeed

Empower your organization with secure, scalable workflow solutions that simplify development, ensure compliance, and drive innovation.

Viash Hub is a platform developed by Data Intuitive, a Belgian-based bioinformatics company specializing in data workflow development and deployment.