Giotto Viewer: Usage Manual

giotto_copy_js_css

~/.local/bin/giotto_copy_js_css 
usage: giotto_copy_js_css [-h] --output OUTPUT_DIR
Required parameters:
--output Output directory where the js, css files are copied to. This will create a js folder and a css folder in the output. It will copy the required js files of the website, such as jquery.js, bootstrap.js, and other files into the output folder.

giotto_setup_image

This tool will generate a template json file that defines the image processing and other viewer preparation steps.
~/.local/bin/giotto_setup_image 
usage: giotto_setup_image [-h] --require-stitch {y,n} --image {y,n}
                          --image-multi-channel {y,n} --segmentation {y,n}
                          --multi-fov {y,n} --output-json OUTPUT
Required parameters:
--require-stitch Will there be stitching step required for the images, coordinates, and segmentation ROIs? (y/n)
--image Will there be images involved? (y/n) If no images are involved, and --require-stitch=y, then stitching will be performed on coordinates and segmentations (if available).
--image-multi-channel Are images multi-channel? (y/n) TIF images are supported
--segmentation Will there be segmentation files? (y/n) Need to be ROI format
--multi-fov Will there be multiple fields of view? (y/n) Sometimes also called positions.
--output-json Output json file

giotto_step1_modify_json

Usually runs after the giotto_setup_image step where a template json has been created. This tool fills in the information in the json template.
~/.local/bin/giotto_step1_modify_json 
usage: giotto_step1_modify_json [-h] --input INPUT_JSON
                                [--add-image ADD_IMAGE]
                                [--change-positions POSITIONS [POSITIONS ...]]
                                [--change-stain-ids STAINIDS [STAINIDS ...]]
                                [--change-offset OFFSET]
                                [--change-segmentation SEGMENTATION]
                                [--rotate-clockwise-image {90,180,270}]
                                [--scale-image SCALE [SCALE ...]]
                                [--flip-image {horizontal,vertical}] --output
                                OUTPUT_JSON
Required parameters:
--input Input json file, or output file of giotto_setup_image.
--add-image TIF image(s). Can be a single image or a set of images (following a naming rule). Need to be TIF format. For a set of images, specify as "pos[POSITION].tif" where [POSITION] (spelled as it is) is a universal field for position ID in the file name. This will fill in the decouple_tiff section of the input json file
--change-positions Integers. The set of position IDs for the [POSITION] field in the filename. Anywhere [POSITION] appears in the file name (for example "pos[POSITION].tif") will be replaced with the actual position IDs. For example "--change-positions 0 1 2 3" will represent the files "pos0.tif", "pos1.tif", "pos2.tif", "pos3.tif".
--change-stain-ids Integers. The set of channel IDs of the multi-channel TIF image(s) to be processed. For example, channel 0 may be Nissl channel; channel 1 may be the DAPI; channel 2 may be polyA. Then --change-stain-ids 0 1 2.
--change-offset Offset file. Required of stitching. Will change the "offset" key in "stitch_image" section, "stitch_coord", "stitch_segmentation_roi" sections of the input json file. Example offset file (tab-separated).
--change-segmentation Segmentation roi zip file(s). One zip file for one position (or fov). For multiple files, can use the [POSITION] tag. For example, "RoiSet_Pos[POSITION]_real.zip". Inside each zip are a set of roi files (one roi per cell).
--rotate-clockwise-image Rotation (degrees). One of 90, 180, 270. Will change the "rotate_image" section of the input json file. Note, it will change the "rotate_coord", "rotate_segmentation" sections of the input json file as well.
--scale-image Scale factor. For example, 2 means that image(s) will be up-scaled 200%. Note, it will change the "scale_coord", "scale_segmentation" sections of the input json file as well.
--output Json file to which changes are saved.

giotto_setup_viewer

~/.local/bin/giotto_setup_viewer 
usage: giotto_setup_viewer [-h] --num-panel {2,4,6,8} --input-preprocess-json
                           FILE_PREPROCESS
                           [--input-annotation-list ANNOT_LIST] --output-json
                           OUTPUT --panel-1
                           {PanelPhysical,PanelTsne,PanelPhysicalSimple,PanelPhysical10X}
                           --panel-2
                           {PanelPhysical,PanelTsne,PanelPhysicalSimple,PanelPhysical10X}
                           [--panel-3 {PanelPhysical,PanelTsne,PanelPhysicalSimple,PanelPhysical10X}]
                           [--panel-4 {PanelPhysical,PanelTsne,PanelPhysicalSimple,PanelPhysical10X}]
                           [otherpanels [otherpanels ...]]
Required parameters:
--num_panel Integer. 2, 4, 6, or 8.
--input-preprocess-json Json file. Output of giotto_step1_modify_json.
--input-annotation-list File. A list of annotation files. File format: two column. First column: annotation file (without .txt). Second column: name of annotation. Example
--panel-1 PanelPhysical / PanelTsne / PanelPhysicalSimple / PanelPhysical10X.
--panel-2 PanelPhysical / PanelTsne / PanelPhysicalSimple / PanelPhysical10X.
--panel-3 PanelPhysical / PanelTsne / PanelPhysicalSimple / PanelPhysical10X.
--panel-4 PanelPhysical / PanelTsne / PanelPhysicalSimple / PanelPhysical10X.
--output-json Output file
Details of the panel:
  • PanelPhysical: Cells in the physical space. Requires cell coordinates, cell segmentations, staining images, gene expression, cell annotations.
  • PanelTsne: Cells in the expression space. Can be TSNE or UMAP. Requires cell coordinates in TSNE/UMAP space, gene expression, cell annotations.
  • PanelPhysicalSimple: Variation of PanelPhysical except cell segmentations, staining images are not required. Cells represented as circles.
  • PanelPhysical10X: Variation of PanelPhysical that is designed for 10X Visium platform. Requires the raw H&E staining image.

smfish_step1_setup

This tool will execute the set of actions specified in the step1 json file (generated by giotto_setup_image and modified by giotto_step1_modify_json).
~/.local/bin/smfish_step1_setup 
usage: smfish_step1_setup [-h] -c CONFIG
Required parameters:
-c Json file. Final finished json file from giotto_step1_modify_json.

smfish_read_config

This tool will execute the set of actions specified in the step2 json file (from giotto_setup_viewer). Then it will create the website files (css, js, html) for the created viewer instance.
~/.local/bin/smfish_read_config 
usage: smfish_read_config [-h] -c CONFIG -o OUTPUT_JS -p OUTPUT_HTML -q
                          OUTPUT_CSS
Required parameters:
-c Json file. Final finished step2 json file from giotto_setup_viewer.
-o Output js file.
-p Output html file.
-q Output css file.