metadata (.json file) specification
MAPs are tsne, umap, pca embeddings in 2D or 3D, or spatial maps for spatical data.
map is a list in the .json metadata file
For each map
"label" free text. Display label of the map, should be easily readable by users
"dataSubType" a string. Describe the nature of the map, must be embedding, spatial . Note this is the dataSubType attribute for the map, not the dataSubType attribute for the file
"dimension" a list of strings. They are the column headers of the dimension columns in the data file. They are used to retrieve data from db.
If it is a spatial map, there might be microscopy image(s) associated with each map.
"unit" (optional, only relevant to spatial map) a string. The unit of map values, e.g. pixel, micrometer
"micrometer_per_unit" (optional, only relevant to spatial map) a floating point number. The physical size in micrometer (µm) of value =1 in spatial map. The parameter will be used in rendering scale bar is the spatial map. If not specified, scale will not be shown.
"spot_diameter" (optional, relevant to spatial map) a floating point number of the size of spot in map unit (not image unit). The parameter will be used to determine sphere size shown in spatial map. If not specified, the size of the sphere will be determined by the browser.
For each image
"label" free text. Display label of the image, should be easily readable
"path" file path to the image file
"offset" an array of integers. Image offset in pixel in x and y dimension. See below for conversion from spatial coordinate values in map to pixel position in this image.
"image_scalef": floating point number. A scaling factor that converts spatial coordinate values in the spatial map (e.g. pixel or micrometer) to the pixel unit in this image. It works together with the "offset" parameter to convert spatial coordinate values in the spatial map to the actual pixel positions in this image.
pixel_in_image_x = image_scalef * spatial_coordinate_x + offset_x
pixel_in_image_y = image_scalef * spatial_coordinate_y + offset_y
Note. The transcript coordinate must be in the same unit and scale as the map. Therefore no scaling or offset are needed to convert transcript coordinate and map coordinate.
"label" free text. Display label of the transcript data, should be easily readable
"path" file path to the transcript datafile
"dimension" a list of strings. Must have the same number of dimensions as the map. They are the column headers of the dimension columns in the transcript file. They are used to retrieve data from db.
Example, map without image
Example, spatial map with matching microscopy image
Example, spatial map with matching microscopy image and transcript data
Surival time unit is displayed on the x-axis of the KM plot. You specify it in metadata file under the "units" attribute.
"units" free text , KM plot x-axis unit, e.g. years, months, days
example
You customize the display of features in a phenotype file ("type": "clinicalMatrix") by adding a "clinicalFeature" file and accompanying .json file. To do this there are two steps
Add a "clinicalFeature" reference to the .json file that accompanies the phenotype file. Note the colon notation in example below.
Compose the clinicalFeaure file (tab delimitated) and its .json file.
Below is an example for adding "clinicalFeature" reference in the phenotype file .json metadata
Below is an example for clinical feature file. This file is tab-delimitated, with headers "feature", "attribute", "value". The attributes are "valueType", "state", and "stateOrder". The values for the attribute "valueType" can be "category" or "float".
Below is an example clinicalFeature file .json file (clinicalFeature.txt.json)
Below is an example of how you would do this for a feature called "your_featureName".
For genomic data matrix, the optional metadata parameter colNormalization sets the default display scale. If not specified, the browser automatically determines the scale.
colNormalization: ‘true’ | ‘log2(x)’ | ‘normal2’
true: display centered by column mean, x - column average, example usage is gene expression matrix that already log transformed.
log2(x): display in log2(x+1) scale, example usage is gene expression count matrix
normal2: display value of 2 in the background color (i.e. white), typically used for copy number data where the normal = 2
for segmented copy number data, if you don't specify colNormalization, display defaults to normal=0, display value of 0 in background color (i.e. white)
example
Please see our Viewing your own Data documentation:
How to programmatically specify Xena Browser views
Xena has the ability to draw visualizations based on parameters passed through URL. You will need to URL encode the parameters.
The list of supported parameters below is not exhaustive. If you do not see your functionality supported below please .
Display Column Setup Examples
One data column (with two subcolumns) display
Display in chart mode
Three data column display, one clinical data column, two genomic data columns
Specify column width, top label, and bottom label on Column C
Reverse sort on Column B
Display gene average in Column C
Display introns in Column C; Hide welcome banner
Highlight Samples Examples
highlight TCGA-C8-A131-01 or TCGA-BH-A0DL-01 samples
Sample Filtering (specify what samples to display in the view) Examples
The columns parameter is a JSON-encoded array of objects, specifying the columns to display.
To specify a single column you need to, at a minimum, specify the dataset ID, the hub where the data resides, and the fields that you want to display.
Fields can be a gene, probe, or chromosome position. All fields need to be of the same type (i.e. all genes or all probes). You can only enter one chromosome position per column.
Field should be the field ID as it appears exactly in the dataset
width: <number>
Width in pixels
columnLabel: <string>
Text for top column label
fieldLabel: <string>
Text for bottom column label
geneAverage: <boolean>
Display the gene average instead of the individual probes for a gene. You can use this only when a single gene is specified for a dataset that has probes on a gene
normalize: ‘none’ | ‘mean’ | ‘log2’ | ‘normal2’
How the data should be dynamically normalized on the fly. 'mean' is x-mean (subtract mean), applied per (sub)column. 'log2' is log2(x+1). 'normal2' is (x-2).
showIntrons: <boolean>
Show introns for mutation and segmented copy number columns
sortDirection: 'reverse'
Reverse sort the samples
sortVisible: <boolean>
Sort column on the zoomed region
Same as the columns parameter, but these columns will not be displayed. They are available for sample filtering. See the filter property of the heatmap parameter, below.
The heatmap parameter is a JSON-encoded object specifying global display options
mode: 'chart'
Display in chart mode rather than visual spreadsheet mode.
showWelcome: <boolean>
Show the welcome banner.
searchSampleList: [<string>, ...]
Highlight the specified samples in the view.
search: <string>
filter: <string>
Both search and filter can be specified in the same url, in which case the samples will be filtered, and any remaining samples matching search will be highlighted. Note that the search expression should only reference columns, not filterColumns, since the latter are not available for visualization.
feature | attribute | value |
---|
More information about how to specify missing data as well as how Xena decides if a column is categorical or numerical, see our .
highlight samples matching arbitrary criteria, such as samples in Column B with values > 10
Equivalent to typing this text into the 'Find' feature in Xena. In this example it is highlighting the samples that for column B have a value of 'TARGET'.
Like the search parameter, but filter the view to the matching samples. Equivalent to . Columns that are only needed for filtering (not visualization) can be added to the filterColumns parameter, and appear semantically after columns. For example, if columns has length two they are labeled 'B' and 'C', and the first column in filterColumns will be 'D'.
your_featureName | valueType | category |
your_featureName | state | 0 |
your_featureName | state | 1 |
your_featureName | stateOrder | "0","1" |