Skip to content

Load a dataset

jfnavarro edited this page Jun 12, 2020 · 11 revisions

A ST (Spatial Transcriptomics) dataset consists of:

  • A matrix of counts in TSV (tab) format (genes as columns and spots as rows)
  • A HE image of the tissue in JPG/PNG format
  • A spot coordinates file (generated with the ST Spot detector or similar)

You can load/remove/open datasets in the ST Viewer trough the "Datasets" view. To show the "Datasets" view:

  1. Click on the tab "Views"
  2. Click on the tab "Datasets"

You should see a window like this:

In order to load a dataset click on the icon with the arrow pointing down ()

The following window will show:

Here you need to type a name for the dataset and load the required HE image (Main Image) and TSV matrix of counts (Data File). You can optionally type in information in the "Comments". You also need to load a file with the spot coordinates in one of the following formats:

    SPOT_X SPOT_Y chip_x chip_y pixel_x pixel_Y

or

    SPOT chip_x chip_y pixel_x pixel_y

or

    SPOT pixel_x pixel_y

In order to facilitate the loading of datasets, you can use two options:

  • Open Folder
  • Load Meta File

Open Folder will let you choose a folder (the dataset files should be inside the folder) and then the ST Viewer will try to automatically load all the files. You may also include a file in the folder called "info.json" that can contain certain information. The file should look like this:

{
	"name": "test",
	"comments": ""
}

Load Meta File will let you choose a JSON file containing all the necessary information to load a dataset. The file should look like this:

{
        "name": "test",
        "comments": "",
        "data": "/Users/user/test_dataset/stdata.tsv",
        "image": "/Users/user/test_dataset/image.jpg",
        "coordinates": "/Users/user/test_dataset/spots.txt"",
}

We recommend the creation of a meta-file for each dataset for easy loading.

Once the necessary files of the dataset are loaded you can click "Ok" and if all the files are correct and nothing is missing the dataset will now be visible in the "Dataset" view.