We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
hello all,
I've written the following code reference your youtube video:
However I get the following error when I try to load it into R using using Read10X from seurat:
Read10X
Error in readMM(file = matrix.loc) : 'readMM()' is not yet implemented for representation 'array'
Any help is greatly appreciated!
Here's the code I wrote based on the youtube video (note I've tried different formats for the sparse matrix - int, int64, etc.)
@staticmethod def create_10x_files(adata, dir, raw_layer): RhapsodyReader.create_barcodes_table(adata=adata, save_path=f"{dir}/barcodes.tsv") RhapsodyReader.create_features_table(adata, f"{dir}/features.tsv") RhapsodyReader.create_matrix(adata, f"{dir}/matrix.mtx", layer=raw_layer) # RhapsodyReader.gzip_files_in_directory(dir) @staticmethod def create_matrix(adata, save_path, layer=None): if layer: matrix = adata.layers[layer].T else: matrix = adata.X.T io.mmwrite(save_path, matrix.astype(np.int64)) @staticmethod def create_barcodes_table(adata, save_path): with open(save_path, "w") as file: for item in adata.obs_names: file.write(item + "\n") @staticmethod def create_features_table(adata, save_path): tab_var_names = ["\t".join([x, x, "Gene Expression"]) for x in adata.var_names] with open(save_path, "w") as file: for var_name in tab_var_names: file.write(var_name + "\n")
matrix.mtx.gz
The text was updated successfully, but these errors were encountered:
No branches or pull requests
hello all,
I've written the following code reference your youtube video:
However I get the following error when I try to load it into R using using
Read10X
from seurat:Any help is greatly appreciated!
Here's the code I wrote based on the youtube video (note I've tried different formats for the sparse matrix - int, int64, etc.)
matrix.mtx.gz
The text was updated successfully, but these errors were encountered: