marcnol / pyHiM

Multiplexed DNA-FISH data analysis pipeline
GNU Lesser General Public License v3.0
4 stars 2 forks source link

plot_bootstrapping.py error #205

Open MarionBardou opened 8 months ago

MarionBardou commented 8 months ago

When I run plot_bootstrapping.py, I get the following error :

(pyHiM_refact) bardou@darwin:/mnt/grey/DATA/AnalyzedData_2023/Experiment_16_Sandrine_Marion_pupa_WT_Mutant/Pooled_WT_Mutant_Exp16_2023_Exp58_2022/Mutant/Merged_3bc_min/All_labeled$ plot_bootstrapping.py --input Trace_combined_3D_method:mask1_label:M_action:all_3bc_Matrix_PWDscMatrix.npy -U Trace_combined_3D_method:mask1_label:M_action:all_3bc_Matrix_uniqueBarcodes.ecsv --N_bootstrap 1000

Producing HiM matrix $ Loaded: Trace_combined_3D_method:mask1_label:M_action:all_3bc_Matrix_PWDscMatrix.npy $ N traces to plot: 69749/69749 $ unique barcodes loaded: [11, 12, 13, 27, 28, 29, 30, 31, 33, 34, 35, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51] $ averaging method: median $ loaded cScale: 1 | used cScale: 15.791596412658691 $ n bins: 25 0%| | 0/25 [00:00<?, ?it/s] Traceback (most recent call last): File "/home/bardou/Repositories/pyHiM/src/plots/plot_bootstrapping.py", line 251, in main() File "/home/bardou/Repositories/pyHiM/src/plots/plot_bootstrapping.py", line 225, in main mean_bs, mean_error = bootstraps_matrix(sc_matrix,N_bootstrap=run_parameters["N_bootstrap"]) File "/home/bardou/Repositories/pyHiM/src/plots/plotting_functions.py", line 51, in bootstraps_matrix bs = bootstrapping(x,N_bootstrap=N_bootstrap) File "/home/bardou/Repositories/pyHiM/src/plots/plotting_functions.py", line 35, in bootstrapping return res.bootstrap_distribution AttributeError: 'BootstrapResult' object has no attribute 'bootstrap_distribution'

Just out of information : pyHiM is up to date

marcnol commented 8 months ago

do $ pip install scipy==1.11.3 then $ pip install astropy[recommended] --upgrade

marcnol commented 8 months ago

in principle this is solved

MarionBardou commented 8 months ago

Thanks a lot

marcnol commented 8 months ago

in fact the easiest is to not run this within the pyHiM39 environment as this is constraining in terms of what package versions need to be present..