scgpt/pad_tokenize
Description
Tokenize and pad a batch of data for scGPT integration zero-shot inference or fine-tuning.
Inputs
Name | Type & Properties | Description |
|---|---|---|
--input | file required | The input h5mu file of pre-processed data. |
--modality | string | Which modality from the input MuData file to process. |
--model_vocab | file required | Path to model vocabulary file. |
--var_gene_names | string | The name of the .var column containing gene names. When no gene_name_layer is provided, the .var index will be used. |
--var_input | string | The name of the adata.var column containing boolean mask for vocabulary-cross checked and/or highly variable genes. |
--input_obsm_binned_counts | string | The name of the .obsm field containing the binned counts to be padded and tokenized. |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output | file required output | The output h5mu file containing obsm arrays for gene tokens, tokenized data and padding mask. |
--obsm_gene_tokens | string | The key of the .obsm array containing the gene token ids |
--obsm_tokenized_values | string | The key of the .obsm array containing the count values of the tokenized genes |
--obsm_padding_mask | string | The key of the .obsm array containing the padding mask. |
--output_compression | string | Compression format to use for the output AnnData and/or Mudata objects. By default no compression is applied. |
Arguments
Name | Type & Properties | Description |
|---|---|---|
--pad_token | string | Token used for padding. |
--pad_value | integer | The value of the padding token. |
--max_seq_len | integer | The maximum sequence length of the tokenized data. Defaults to the number of features if not provided. |
Run this component
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
modality: [ "rna" ]
var_input: [ "id_in_vocab" ]
input_obsm_binned_counts: [ "binned_counts" ]
output: "$id.$key.output.h5mu"
obsm_gene_tokens: [ "gene_id_tokens" ]
obsm_tokenized_values: [ "values_tokenized" ]
obsm_padding_mask: [ "padding_mask" ]
pad_token: [ "<pad>" ]
pad_value: [ -2 ]
id: "run"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/openpipeline.git \
-revision v3.0.1 \
-main-script target/nextflow/scgpt/pad_tokenize/main.nf \
-params-file params.yaml Relationships
Used by
2 relationships
Current component
scgpt/pad_tokenizeopenpipeline v3.0.1
Uses
0 relationships
No component dependencies found.