Skip to content

Step 3 Transform

Prefix:

Prefixes will be automatically defined as follows.

1
2
train_prefix="${prefix}.${solo_feature}.nf${nfactor}.d_${train_width}.s_${train_n_epoch}"
tranform_prefix="${train_prefix}.prj_${fit_width}.r_${anchor_dist}"

Step 3.1 Transform

Convert to a factor space using the provided model, which includes gene names and potentially Dirichlet parameters. The pixel-level data will be organized into hexagonal groups.

Input & Output

1
2
3
4
5
6
7
# Input:
$input_transcripts                                                      ## user-defined input SGE in FICTURE-compatible TSV format
${output_dir}/${train_model}/${train_prefix}.model_matrix.tsv.gz        ## a model matrix from LDA (step2a) or from Seurat (step2b)

# Output:
${output_dir}/${train_model}/${tranform_prefix}.fit_result.tsv.gz
${output_dir}/${train_model}/${tranform_prefix}.posterior.count.tsv.gz

Commands:

1
$neda_dir/steps/step3.1-transform.sh $input_configfile

Step 3.2 Transform Visualization

This step visualize the tranformed data using a coarse image that depict the distribution of each factor in hexagonally binned data, allowing for the inspection of spatial factor distribution patterns before conducting pixel-level analysis.

For LDA, this step simply creates a symbolic link from the color table created at step 2a.3 and uses it to visualize the transformed data.

For Seurat, this step creates a color table to visualize the transformed data.

Input & Output

1
2
3
4
5
6
7
8
9
# Input:
${output_dir}/${train_model}/${train_prefix}.color.tsv                  ## (LDA-only) use the existing color table if available
${output_dir}/${train_model}/${tranform_prefix}.fit_result.tsv.gz
$input_xyrange                                                          ## user-defined input min max coordinates for SGE

# Output:
${output_dir}/${train_model}/${tranform_prefix}.rgb.tsv
${output_dir}/${train_model}/${tranform_prefix}.top.png
${output_dir}/${train_model}/${tranform_prefix}.png

Commands:

1
$neda_dir/steps/step3.2-transform-visualization.sh $input_configfile