Open joe-jhou2 opened 2 years ago
It looks like you need to start from the h5 file, see details section of https://rubd.github.io/Giotto_site/reference/createGiottoVisiumObject.html. Your current command starts from a structured visium directory.
it seems " h5_json_scalefactors_path" also required but not in the variable list. after adding this, it loads data
Hi mimisikai
The createGiottoVisiumObject will automatically read expression matrix and spatial information through the following folder structure:
. visium_dir | -- raw_feature_bc_matrix | -- barcodes.tsv.gz | -- features.tsv.gz | -- matrix.mtx.gz | |||
---|---|---|---|---|---|---|---|
-- spatial | |||||||
--aligned_fiducials.jpg | |||||||
-- detected_tissue_image.jpg | |||||||
--scalefactors_json.json | |||||||
--tissue_hires_image.png | |||||||
--tissue_lowres_image.png | |||||||
--tissue_positions_list.csv |
Or alternatively you can start with the h5 file by providing the following arguments:
h5_visium_path: full path to .h5 file: /your/path/to/visium_file.h5 h5_tissue_positions_path: full path to spatial locations file: /you/path/to/tissue_positions_list.csv h5_image_png_path: full path to png: /your/path/to/images/tissue_lowres_image.png h5_json_scalefactors_path: full path to .json file: /your/path/to/scalefactors_json.json
The first one should be found in the result directory of spaceranger output folder and the rest should be found in the spatial directory under it.
@JunxiangXu thanks for providing additional info. Would it help if we separate the createGiottoVisiumObject
into createGiottoVisiumObjectH5
and createGiottoVisiumObjectDir
? We could still keep the original function as a wrapper around those two, but that might help with potential confusion.
I have h5 file, json, lowers and position list files stored in the same folder: '/Users/xxx/Documents/Jia10X/V11' however, when I load the sample by the code below, says the error File does not exist or is non-readable. Thanks.
dataDir <- '/Users/xxx/Documents/Jia10X'
A1
A1 = createGiottoVisiumObject( visium_dir = paste0(dataDir,'/V11'), expr_data = 'filter', png_name = 'tissue_lowres_image.png', gene_column_index = 2, instructions = instrs )