Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could you please example the data folder structure? #181

Open
joe-jhou2 opened this issue Feb 18, 2022 · 4 comments
Open

Could you please example the data folder structure? #181

joe-jhou2 opened this issue Feb 18, 2022 · 4 comments

Comments

@joe-jhou2
Copy link

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
)

@RubD
Copy link
Collaborator

RubD commented Feb 19, 2022

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.

@joe-jhou2
Copy link
Author

it seems " h5_json_scalefactors_path" also required but not in the variable list. after adding this, it loads data

@JunxiangXu
Copy link
Contributor

JunxiangXu commented Feb 22, 2022

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.

@RubD
Copy link
Collaborator

RubD commented Feb 23, 2022

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants