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

error running trendSceek #149

Open
rvanguri opened this issue Oct 29, 2021 · 3 comments
Open

error running trendSceek #149

rvanguri opened this issue Oct 29, 2021 · 3 comments

Comments

@rvanguri
Copy link

I am unable to run trendSceek in a fresh conda environment.

using 'trendsceek' for spatial gene/pattern detection. If used in published research, please cite:
  Edsgard, Daniel, Per Johnsson, and Rickard Sandberg. 'Identification of Spatial Expression Trends in Single-Cell Gene Expression Data.'
          Nature Methods 15, no. 5 (May 2018): 339-42. https://doi.org/10.1038/nmeth.4634.
Error: 'ppp' is not an exported object from 'namespace:spatstat'

Here is the script I am using:

library(Giotto)
data_path = '/path/to/visiumdata/'
workdir="/path/to/workdir"
expr_data_path=fs::path(data_path, "raw_feature_bc_matrix")
raw_matrix=get10Xmatrix(path_to_data=expr_data_path, gene_column_index=2)
spatial_locations=data.table::fread(fs::path(data_path, "spatial", "tissue_positions_list.csv"))
spatial_locations = spatial_locations[match(colnames(raw_matrix), V1)]
colnames(spatial_locations) = c('barcode', 'in_tissue', 'array_row', 'array_col', 'col_pxl', 'row_pxl')
myinst=createGiottoInstructions(save_plot=T, show_plot=F, save_dir=workdir, python_path="/workdir/miniconda3/envs/giottoenv/bin/python")


visium <- createGiottoObject(raw_exprs = raw_matrix, spatial_locs = spatial_locations[,.(row_pxl,-col_pxl)], instructions = myinst, cell_metadata = spatial_locations[,.(in_tissue, array_row, array_col)])

visium <- normalizeGiotto(gobject = visium, scalefactor = 6000, verbose = T)
tsres <- trendSceek(visium, expression_values="normalized")

Any advice would be appreciated!

@ndelrossi7
Copy link
Contributor

Hi @rvanguri! Could you please try updating your version of sf? I think this is an error specific to spatstat and this is the info I found for it online: spatstat/spatstat#152. Thanks!

@rvanguri
Copy link
Author

rvanguri commented Nov 3, 2021

Hi @ndelrossi7, thanks for the reply! My sf is at the latest version in CRAN (1.0.3) and I am still getting the same error.

@sistia01
Copy link

sistia01 commented Dec 9, 2021

Hi! Thanks for using Giotto!

The trendSceek() function is a wrapper function for the trendsceek package. Unfortunately, this package has not been updated in several years while its dependencies have. Therefore, users have had trouble using the function. One of the issues that users have run into is the following error code.

Error: 'ppp' is not an exported object from 'namespace:spatstat'
See this link for further information.

We believe that this error likely comes from the updated spatstat function (which trendsecek depends on) which is causing the outdated trendsceek package to be nonfunctional. Due to the high rate of user errors we have decided to deprecate the trendsceek() function within Giotto.

Giotto does provide other options to determine genes with a spatially coherent expression pattern, including binSpect(), SpatialDE() and spark() and all work well on both simulated and real datasets. For more information, please see the documentation section of our website for more information.

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