GithubHelp home page GithubHelp logo

fitclone's People

Contributors

sohrabsa avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fitclone's Issues

Error occurred when I run the demo

The command and error is below:

./fitclone.py
<string>:582: SyntaxWarning: "is not" with a literal. Did you mean "!="?
Traceback (most recent call last):
  File "/data/xieduo/fitclone/fitclone/./fitclone.py", line 8, in <module>
    CondExp().run_with_config_file('../data/SA501/sa501_config.yaml')
  File "<string>", line 34, in run_with_config_file
TypeError: load() missing 1 required positional argument: 'Loader'

Could you please help me to spot where went wrong?

sa501_config.yaml config parameters

Hi Sohrab,

In sa501_config.yaml file, you have true_x0 parameter, can you explain it? I don't see any comment from readme file.
true_x0: [0.42112125868690475, 0.10256939082931406, 0.029992607701921473, 0.19326294873370334]

Thanks,
Hoa

The question of futher using

Hi Thank you for your help! I have slove the previoius problem and i now have a new question of futher using this model. The Fitclone used single-cell sequencing data in your paper. Can the results of whole exon sequencing be analyzed using Fitclone?

Running fitclone with Clone IDs / K that are not consecutive numbers

Hi @sohrabsa

I am using fitclone for a project where my clones have particular IDs I'd like to track. Unfortunately these IDs are not respected by fitclone. From reading the code and testing, it seems like the python part of fitclone rename the K's internally as 0..n-1 in the order they are provided.

Most R scripts make a similar assumption, although the CloneIDs are named from 1 to n (instead of 0 to n-1). The only exception is for generating the "full_original_data_trace_.pdf" figure, where the K are taken directly from the input file. "violin_hist.pdf", "theta_hist.pdf" and "theta_hist_single.pdf" show numbers from 1 to n, disregarding the IDs used in the input file. "predict_trace.pdf" and "infer_trace.pdf" fail as they read the IDs from the input file and fails to match the re-assigned IDs from the python output (note also that the plots are wrong if the K in the input file are not ordered properly, i.e. if the input file contains the entries for say clone 3 before clone 0).

I am not sure I can contribute much to the python code, but I am happy to modify the R scripts to support non-consecutive numbers by simply reading the K identifiers in the input file and matching them in order to the output of fitclone). However, there are some options/parameters (like M_data for instance) that are not documented but can be relevant to the plots. Let me know if you'd be interested in this or if you think it would be best to modify the python code first (if relevant).

Regards

Javier

Error when running the demo dataset SA501

Hi Sohrab,

When I test your fitclone package with your provided demo dataset, there are some small issues, so I noted it here first.

Error:
[1] "Error - Error in if (!is.null(mcmc_options$observation_model) | mcmc_options$multinomial_error) {: argument is of length zero\n"

Log:
[1] "Compuing RMSE"
[1] "Compuing MAE"
[1] "JUS PLotting"
[1] "../results/_ERFNY_202007-28-193055.435388"
No id variables; using all as measure variables
[1] "../results/_ERFNY_202007-28-193055.435388"
No id variables; using all as measure variables
[1] -6.641435 NA

Thanks,
Hoa

Single time point?

Dear Developers,

It seems a cool method and I would like to give it a try!
However I do not have a time-course data,
I wonder does it work on estimating subclone fitness given only one time point?

Thank you very much and have a good weekend!

Cheers,
Siao-Han

Installation issue (gcc error)

Hello! I'm running into some issues with installation, and I'm hoping you can help. I've narrowed it down to a problem in the cyconvert.sh script, where I get the same error on every line:

(fitclone) [vleblanc@marrahost02 fitclone]$ python3 setup_cython/setup.py build_ext --inplace
Compiling wf_sample_parallel.pyx because it changed.
[1/1] Cythonizing wf_sample_parallel.pyx
/projects/vleblanc_prj/tools/anaconda3/envs/fitclone/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /projects/vleblanc_prj/tools/fitclone/fitclone/wf_sample_parallel.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)
running build_ext
building 'wf_sample_parallel' extension
creating build
creating build/temp.linux-x86_64-3.7
gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/projects/vleblanc_prj/tools/anaconda3/envs/fitclone/lib/python3.7/site-packages/numpy/core/include -I/projects/vleblanc_prj/tools/anaconda3/envs/fitclone/include/python3.7m -c wf_sample_parallel.c -o build/temp.linux-x86_64-3.7/wf_sample_parallel.o -fopenmp
In file included from /projects/vleblanc_prj/tools/anaconda3/envs/fitclone/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
                 from /projects/vleblanc_prj/tools/anaconda3/envs/fitclone/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /projects/vleblanc_prj/tools/anaconda3/envs/fitclone/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from wf_sample_parallel.c:629:
/projects/vleblanc_prj/tools/anaconda3/envs/fitclone/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^~~~~~~
gcc -pthread -shared -B /projects/vleblanc_prj/tools/anaconda3/envs/fitclone/compiler_compat -L/projects/vleblanc_prj/tools/anaconda3/envs/fitclone/lib -Wl,-rpath=/projects/vleblanc_prj/tools/anaconda3/envs/fitclone/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/wf_sample_parallel.o -o /projects/vleblanc_prj/tools/fitclone/fitclone/wf_sample_parallel.cpython-37m-x86_64-linux-gnu.so -fopenmp
/projects/vleblanc_prj/tools/anaconda3/envs/fitclone/compiler_compat/ld: warning: /projects/vleblanc_prj/tools/anaconda3/envs/fitclone/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/crtbeginS.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010002
/projects/vleblanc_prj/tools/anaconda3/envs/fitclone/compiler_compat/ld: warning: /projects/vleblanc_prj/tools/anaconda3/envs/fitclone/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/crtbeginS.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001
/projects/vleblanc_prj/tools/anaconda3/envs/fitclone/compiler_compat/ld: build/temp.linux-x86_64-3.7/wf_sample_parallel.o: unable to initialize decompress status for section .debug_info
/projects/vleblanc_prj/tools/anaconda3/envs/fitclone/compiler_compat/ld: build/temp.linux-x86_64-3.7/wf_sample_parallel.o: unable to initialize decompress status for section .debug_info
/projects/vleblanc_prj/tools/anaconda3/envs/fitclone/compiler_compat/ld: build/temp.linux-x86_64-3.7/wf_sample_parallel.o: unable to initialize decompress status for section .debug_info
/projects/vleblanc_prj/tools/anaconda3/envs/fitclone/compiler_compat/ld: build/temp.linux-x86_64-3.7/wf_sample_parallel.o: unable to initialize decompress status for section .debug_info
build/temp.linux-x86_64-3.7/wf_sample_parallel.o: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

I've tried to hunt down these errors on various forums and it seems that it may be an issue of using a different version of the compiler that was used to compile the files originally. I don't think the cython language level or the deprecated NumPy API are the issue, but perhaps I'm wrong (and please let me know if I should also address these). Could I please get your help in solving this? I'd love to try out this tool :)

In case it's helpful, here's everything installed in my fitclone conda environment:

(fitclone) [vleblanc@marrahost02 fitclone]$ conda list
# packages in environment at /projects/vleblanc_prj/tools/anaconda3/envs/fitclone:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       1_gnu    conda-forge
atk                       2.36.0               ha770c72_4    conda-forge
atk-1.0                   2.36.0               h516909a_2    conda-forge
binutils_impl_linux-64    2.36.1               h193b22a_2    conda-forge
blas                      1.0                    openblas  
bzip2                     1.0.8                h7f98852_4    conda-forge
ca-certificates           2021.10.26           h06a4308_2    intel
cairo                     1.16.0            h18b612c_1001    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
cython                    0.29.21          py37he6710b0_0    anaconda
dbus                      1.13.6               he372182_0    conda-forge
expat                     2.4.7                h27087fc_0    conda-forge
fontconfig                2.13.96              h8e229c2_2    conda-forge
freetype                  2.10.4               h0708190_1    conda-forge
fribidi                   1.0.10               h36c2ea0_0    conda-forge
gcc                       11.2.0               h702ea55_8    conda-forge
gcc_impl_linux-64         11.2.0              h82a94d6_14    conda-forge
gdk-pixbuf                2.32.2                        1    bioconda
gettext                   0.19.8.1          hf34092f_1004    conda-forge
glib                      2.66.1               h680cd38_0    conda-forge
gobject-introspection     1.66.1           py37h619baee_1    conda-forge
graphite2                 1.3.13            h58526e2_1001    conda-forge
gstreamer                 1.14.5               h36ae1b5_2    conda-forge
gtk2                      2.24.32              h90f3771_0    conda-forge
harfbuzz                  2.4.0                h37c48d4_1    conda-forge
hdf5                      1.10.7               hb1b8bf9_0    anaconda
icu                       58.2              hf484d3e_1000    conda-forge
jbig                      2.1               h7f98852_2003    conda-forge
joblib                    1.0.1            py37h3f38642_0    intel
jpeg                      9e                   h7f98852_0    conda-forge
kernel-headers_linux-64   2.6.32              he073ed8_15    conda-forge
kiwisolver                1.4.0            py37h7cecad7_0    conda-forge
ld_impl_linux-64          2.36.1               hea4e1c9_2    conda-forge
lerc                      3.0                  h9c3ff4c_0    conda-forge
libblas                   3.8.0               17_openblas    conda-forge
libcblas                  3.8.0               17_openblas    conda-forge
libdeflate                1.10                 h7f98852_0    conda-forge
libffi                    3.2.1             he1b5a44_1007    conda-forge
libgcc                    7.2.0                h69d50b8_2    conda-forge
libgcc-devel_linux-64     11.2.0              h0952999_14    conda-forge
libgcc-ng                 11.2.0              h1d223b6_14    conda-forge
libgfortran-ng            7.5.0               h14aa051_20    conda-forge
libgfortran4              7.5.0               h14aa051_20    conda-forge
libgomp                   11.2.0              h1d223b6_14    conda-forge
libiconv                  1.16                 h516909a_0    conda-forge
liblapack                 3.8.0               17_openblas    conda-forge
liblapacke                3.8.0               17_openblas    conda-forge
libopenblas               0.3.10          pthreads_hb3c22a3_5    conda-forge
libpng                    1.6.37               h21135ba_2    conda-forge
libsanitizer              11.2.0              he4da1e4_14    conda-forge
libstdcxx-ng              11.2.0              he4da1e4_14    conda-forge
libtiff                   4.3.0                h542a066_3    conda-forge
libuuid                   2.32.1            h7f98852_1000    conda-forge
libwebp-base              1.2.2                h7f98852_1    conda-forge
libxcb                    1.13              h7f98852_1004    conda-forge
libxml2                   2.9.9                h13577e0_2    conda-forge
libzlib                   1.2.11            h36c2ea0_1013    conda-forge
llvm-openmp               8.0.1                hc9558a2_0    conda-forge
lz4-c                     1.9.3                h9c3ff4c_1    conda-forge
matplotlib                2.2.3            py37h8a2030e_1    conda-forge
matplotlib-base           2.2.3            py37h60b886d_1    conda-forge
ncurses                   6.3                  h9c3ff4c_0    conda-forge
numpy                     1.16.2           py37h8b7e671_1    conda-forge
numpy-base                1.17.0           py37h2f8d375_0    r
openmp                    8.0.1                         0    conda-forge
openssl                   1.0.2s                        0    intel
pandas                    0.24.2           py37hb3f55d8_1    conda-forge
pango                     1.42.4               h7062337_4    conda-forge
pcre                      8.45                 h9c3ff4c_0    conda-forge
pip                       22.0.4             pyhd8ed1ab_0    conda-forge
pixman                    0.38.0            h516909a_1003    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
pyparsing                 3.0.7              pyhd8ed1ab_0    conda-forge
pyqt                      5.6.0           py37h13b7fb3_1008    conda-forge
python                    3.7.1             hd21baee_1001    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.7                     2_cp37m    conda-forge
pytz                      2022.1             pyhd8ed1ab_0    conda-forge
pyyaml                    5.3.1            py37h5e8e339_2    conda-forge
qt                        5.6.2             hce4f676_1013    conda-forge
readline                  7.0               hf8c457e_1001    conda-forge
scikit-learn              0.22.2.post1     py37hcdab131_0    conda-forge
scipy                     1.1.0            py37he2b7bc3_2  
setuptools                59.8.0           py37h89c1867_0    conda-forge
sip                       4.18.1          py37hf484d3e_1000    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sqlite                    3.28.0               h8b20d00_0    conda-forge
sysroot_linux-64          2.12                he073ed8_15    conda-forge
tk                        8.6.12               h27826a3_0    conda-forge
tornado                   6.1              py37h5e8e339_2    conda-forge
typing-extensions         4.1.1                hd8ed1ab_0    conda-forge
typing_extensions         4.1.1              pyha770c72_0    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
xarray                    0.11.0                py37_1000    conda-forge
xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
xorg-libice               1.0.10               h7f98852_0    conda-forge
xorg-libsm                1.2.3             hd9c2040_1000    conda-forge
xorg-libx11               1.7.2                h7f98852_0    conda-forge
xorg-libxau               1.0.9                h7f98852_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xorg-libxext              1.3.4                h7f98852_1    conda-forge
xorg-libxrender           0.9.10            h7f98852_1003    conda-forge
xorg-libxt                1.2.1                h7f98852_2    conda-forge
xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
xorg-xextproto            7.3.0             h7f98852_1002    conda-forge
xorg-xproto               7.0.31            h7f98852_1007    conda-forge
xz                        5.2.5                h516909a_1    conda-forge
yaml                      0.2.5                h7f98852_2    conda-forge
zlib                      1.2.11            h36c2ea0_1013    conda-forge
zstd                      1.5.2                ha95c52a_0    conda-forge

About estimate clonal fractions

Hi, in the supplementary of _Clonal fitness inferred from time-series modelling of single-cell cancer genomes ,you mentioned that using βγ = ν to get γ(page 8th), what I want to ask you is: (1)is β a 0-1 matrix? If not, how to identify its value?(2)to figure out γ, β must be a square matrix, but why β is a square matrix(or why the number of mutation-cluster are equal to clones')?
THANK YOU

Consult

Hi
I have some 10x single cell time series design sample data,I wonder that if I can use this tool based InferCNV package results ? Thank you !

Issue with clang during install

Good Afternoon,

I am trying to install fitClone but am running into an error.

After I run the command ./make.sh I get the following error towards the end of the install: clang: error: unsupported option '-fopenmp'.

I am using MAC OS Sonoma 14.4.1, and have tried changing the make.sh file to have ./cyconvert_bigsur.sh as the final line, but this did not seem to change anything during the install. Any advice you can provide would be greatly appreciated.

If it is helpful, here are all the packages installed in my fitness environment:

(fitness) MLC02D47RGMD6M:fitclone 80019141$ conda list
# packages in environment at /Users/80019141/anaconda3/envs/fitness:
#
# Name                    Version                   Build  Channel
blas                      1.0                    openblas  
ca-certificates           2023.08.22           hecd8cb5_0    anaconda
certifi                   2020.6.20          pyhd3eb1b0_3    anaconda
cycler                    0.11.0             pyhd3eb1b0_0  
cython                    0.29             py37h0a44026_0  
flit-core                 3.6.0              pyhd3eb1b0_0  
freetype                  2.12.1               hd8bbffd_0  
hdf5                      1.10.6               hdbbcd12_0    anaconda
intel-openmp              2021.4.0          hecd8cb5_3538  
kiwisolver                1.4.4            py37hcec6c5f_0  
libcxx                    14.0.6               h9765a3e_0  
libffi                    3.4.4                hecd8cb5_1  
libgfortran               3.0.1                h93005f0_2  
libopenblas               0.3.20               h9a5756b_0  
libpng                    1.6.39               h6c40b1e_0  
libxcrypt                 4.4.36               h10d778d_1    conda-forge
matplotlib                2.2.3            py37h54f8f79_0  
mkl                       2021.4.0           hecd8cb5_637  
mkl-service               2.4.0            py37h9ed2024_0  
ncurses                   6.4                  hcec6c5f_0  
numpy                     1.16.2           py37h926163e_0  
numpy-base                1.16.2           py37ha711998_0  
openssl                   1.1.1w               hca72f7f_0    anaconda
pandas                    0.24.2           py37h0a44026_0  
pip                       22.3.1           py37hecd8cb5_0  
pyparsing                 3.0.9            py37hecd8cb5_0  
python                    3.7.16               h218abb5_0  
python-dateutil           2.8.2              pyhd3eb1b0_0  
pytz                      2022.7           py37hecd8cb5_0  
pyyaml                    5.3.1            py37haf1e3a3_1  
readline                  8.2                  hca72f7f_0  
scipy                     1.1.0            py37h1a1e112_2  
setuptools                65.6.3           py37hecd8cb5_0  
six                       1.16.0             pyhd3eb1b0_1  
sqlite                    3.45.3               h6c40b1e_0  
tk                        8.6.12               h5d9f67b_0  
tornado                   6.2              py37hca72f7f_0  
typing_extensions         4.4.0            py37hecd8cb5_0  
wheel                     0.38.4           py37hecd8cb5_0  
xarray                    0.11.0                   py37_0  
xz                        5.4.6                h6c40b1e_1  
yaml                      0.2.5                haf1e3a3_0  
zlib                      1.2.13               h4b97444_1 

Correct data produced by SA501?

I've gotten everything installed correctly, but I'm having trouble determining if the test dataset is being run correctly. Based on the change in allele/clone frequencies in the test data, clone k=3 is undergoing positive selection and should have a selection coefficient (s) that is positive. But when I look at the infer_theta.tsv, which contains the "posterior of the selection coefficients" almost all the values are negative. If these are probability posteriors, shouldn't they be positive, as how can probability be negative? Also, all of the values in llhood_theta.tsv are also negative. When I look at the theta_hists.pdf generated by the R scripts, the estimate s values are also all negative (I also assume k number in these plots is 0=1, 1=2, 2=3, etc.). What is the "ESS = 1.08, 1.01, 1.82, 0.66" in the violin_hist.pdf plot? Is there a way to calculate the probability of positive selection (PPS) using the values generated after running the script, as is displayed in Figure 1D of the publication?

I might be misunderstanding the significance of these values, so I apologize for my ignorance, especially when it comes to these particular statistical genetics terms, many thanks!

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.