Coder Social home page Coder Social logo

tare / splotch Goto Github PK

View Code? Open in Web Editor NEW
17.0 17.0 6.0 196.97 MB

Splotch is a hierarchical generative probabilistic model for analyzing Spatial Transcriptomics (ST) data

License: BSD 3-Clause "New" or "Revised" License

Stan 0.18% R 82.53% Jupyter Notebook 16.84% Shell 0.03% Python 0.42%
bioinformatics generative-model probabilistic-graphical-models spatial-transcriptomics

splotch's People

Contributors

tare avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

splotch's Issues

Not able to reproduce the workflow

Hi,

I noticed your software and I'd like to apply it to a spatial dataset in order to find the spatially variable genes, but to better understand how to use it, I'm trying to execute your instructions for the installation and the analysis.

While doing this process I found a few inconsistencies that are not allowing me to proceed with the analysis steps.

I'm reporting them here so hopefully, you can help me to solve them.

  • I tried the first installation method and at the end of the process, I don't have the splotch_stan_model binary available anywhere. Do you have any suggestions to fix this?
  • I noticed that the downstream analysis tutorial in python has as requisites the generate_splotch_input_files -c Count_Tables_mouse/* -m metadata.tsv -s 2389.0 -l 3 -d 100 -o data_three. I think the right command is splotch_generate_input_files and also the input counts folder should be just Count_Tables. May I suggest adding the examples folder on top of these command paths?
  • While looking at the second required command for the tutorial it says: splotch -g 3661 -n 200 -c 4 -b splotch_three_level -d data_three -o output_three. Where do I find the splotch_three_level command? Also, is this different from the previously mentioned stan model?

Thanks a lot,
Dario

CRITICAL:root:Mismatch with AAR names! Order of the AARs must match!

Hello,

I am using SPLOTCH to analyse a set of ST data and I got this error when I tried to generate input files, could you please help to advise how I can get it correct? Appreciations!

metadata.txt
Brain1_ctrl_dt_tissue.tsv_splotch.unified.txt
Brain1_ctrl_dt_tissue.tsv_splotch_annot.txt

$ splotch_generate_input_files -c *.unified.tsv -m metadata.tsv -s 2389.0 -l 3 -o data_three
INFO:root:Reading metadata
INFO:root:Initializing
INFO:root:beta_level_1[1] := Brain1
INFO:root:beta_level_2[1] := Brain1 ctrl
INFO:root:beta_level_3[1] := Brain1 ctrl dt
INFO:root:beta_level_3[2] := Brain1 ctrl hp
INFO:root:beta_level_2[2] := Brain1 treated
INFO:root:beta_level_3[3] := Brain1 treated dt
INFO:root:beta_level_3[4] := Brain1 treated hp
INFO:root:beta_level_1[2] := Brain2
INFO:root:beta_level_2[3] := Brain2 ctrl
INFO:root:beta_level_3[5] := Brain2 ctrl dt
INFO:root:beta_level_3[6] := Brain2 ctrl hp
INFO:root:beta_level_2[4] := Brain2 treated
INFO:root:beta_level_3[7] := Brain2 treated dt
INFO:root:beta_level_3[8] := Brain2 treated hp
INFO:root:beta_level_1[3] := Brain3
INFO:root:beta_level_2[5] := Brain3 ctrl
INFO:root:beta_level_3[9] := Brain3 ctrl dt
INFO:root:beta_level_3[10] := Brain3 ctrl hp
INFO:root:beta_level_2[6] := Brain3 treated
INFO:root:beta_level_3[11] := Brain3 treated dt
INFO:root:beta_level_3[12] := Brain3 treated hp
INFO:root:beta_level_1[4] := Brain4
INFO:root:beta_level_2[7] := Brain4 ctrl
INFO:root:beta_level_3[13] := Brain4 ctrl dt
INFO:root:beta_level_3[14] := Brain4 ctrl hp
INFO:root:beta_level_2[8] := Brain4 treated
INFO:root:beta_level_3[15] := Brain4 treated dt
INFO:root:beta_level_3[16] := Brain4 treated hp
INFO:root:beta_level_1[5] := Brain5
INFO:root:beta_level_2[9] := Brain5 ctrl
INFO:root:beta_level_3[17] := Brain5 ctrl dt
INFO:root:beta_level_3[18] := Brain5 ctrl hp
INFO:root:beta_level_2[10] := Brain5 treated
INFO:root:beta_level_3[19] := Brain5 treated dt
INFO:root:beta_level_3[20] := Brain5 treated hp
INFO:root:beta_level_1[6] := Brain6
INFO:root:beta_level_2[11] := Brain6 ctrl
INFO:root:beta_level_3[21] := Brain6 ctrl dt
INFO:root:beta_level_3[22] := Brain6 ctrl hp
INFO:root:beta_level_2[12] := Brain6 treated
INFO:root:beta_level_3[23] := Brain6 treated dt
INFO:root:beta_level_3[24] := Brain6 treated hp
INFO:root:Processing Brain1_ctrl_dt_tissue.tsv_splotch.unified.tsv
INFO:root:Reading data
INFO:root:Detecting tissue sections on the array
INFO:root:Found 2 candidate tissue sections
INFO:root:Keeping 1 tissue sections
INFO:root:Processing Brain1_ctrl_hp_tissue.tsv_splotch.unified.tsv
INFO:root:Reading data
CRITICAL:root:Mismatch with AAR names! Order of the AARs must match!

Installation errors

Hello Splotch developers,

I found Splotch while exploring a couple publications centering around spatial transcriptomics and think it could be very useful in analyzing a spatial dataset I'm working on. However, I'm running into issues during the installation process, which I'll go into below.

After running 'pip install git+https://[email protected]/tare/Splotch.git' I tested out the commands detailed in the installation tutorial and found no issues with the commands 'splotch' and 'splotch_prepare_count_files', however when running the command 'splotch_generate_input_files', I get an error. See 'ERROR 1' below for the full error message.

That is the first of the issues I encountered. The next issue I encountered was with the second installation command 'pip install --no-deps --force-reinstall --upgrade --install-option="--stan" git+https://[email protected]/tare/Splotch.git'

Installation does not finish, and I get another error. See 'ERROR 2' below for the full error message.

Do you have any advice for how I can avoid these errors and start using Splotch? I would be very grateful for a timely response.


ERROR 1:

Traceback (most recent call last):
File "/home/users/browneld/miniconda3/bin/splotch_generate_input_files", line 18, in
from splotch.utils import get_variable_mappings, watershed_tissue_sections,
File "/home/users/browneld/miniconda3/lib/python3.9/site-packages/splotch/utils.py", line 15, in
from skimage.morphology import watershed
ImportError: cannot import name 'watershed' from 'skimage.morphology' (unknown location)


ERROR 2:

WARNING: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option.
Collecting git+https://@github.com/tare/Splotch.git
Cloning https://
@github.com/tare/Splotch.git to /tmp/pip-req-build-01clj5se
Running command git clone --quiet 'https://@github.com/tare/Splotch.git' /tmp/pip-req-build-01clj5se
Resolved https://
@github.com/tare/Splotch.git to commit 1c95a24
Preparing metadata (setup.py) ... done
Skipping wheel build for Splotch, due to binaries being disabled for it.
Installing collected packages: Splotch
Running setup.py install for Splotch ... error
error: subprocess-exited-with-error

× Running setup.py install for Splotch did not run successfully.
│ exit code: 3
╰─> [26 lines of output]
running install
/home/users/browneld/miniconda3/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib
creating build/lib/splotch
copying splotch/init.py -> build/lib/splotch
copying splotch/utils.py -> build/lib/splotch
running build_scripts
creating build/scripts-3.9
copying and adjusting bin/splotch_prepare_count_files -> build/scripts-3.9
copying and adjusting bin/splotch_generate_input_files -> build/scripts-3.9
copying bin/splotch -> build/scripts-3.9
changing mode of build/scripts-3.9/splotch_prepare_count_files from 644 to 755
changing mode of build/scripts-3.9/splotch_generate_input_files from 644 to 755
changing mode of build/scripts-3.9/splotch from 644 to 755
running install_lib
creating /home/users/browneld/miniconda3/lib/python3.9/site-packages/splotch
copying build/lib/splotch/init.py -> /home/users/browneld/miniconda3/lib/python3.9/site-packages/splotch
copying build/lib/splotch/utils.py -> /home/users/browneld/miniconda3/lib/python3.9/site-packages/splotch
byte-compiling /home/users/browneld/miniconda3/lib/python3.9/site-packages/splotch/init.py to init.cpython-39.pyc
byte-compiling /home/users/browneld/miniconda3/lib/python3.9/site-packages/splotch/utils.py to utils.cpython-39.pyc
running install_data
stan/lib/stan_math/make/libraries:117: *** "Need to set TBB_CXX_TYPE for non-standard compiler other than gcc or clang.". Stop.
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> Splotch

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.