ma-compbio / Phylo-HMRF

MIT License
15 stars 3 forks source link

Error on the example input "AttributeError: 'bool' object has no attribute 'keys'" #12

Open zy041225 opened 2 years ago

zy041225 commented 2 years ago

Hi,

When I'm trying to test the code with the example data in the "Phylo-HMRF/example_input" directory with the command: python ../phylo_hmrf.py -n 20 -r 1 --reload 0 --chromvec 21,22 --miter 100 ./

I got the following error messages:

estimate type 0
edge list loaded
[[0, 1], [1, 2], [1, 3], [3, 4], [4, 5], [4, 6], [3, 7]]
branch list loaded
[0.0, 32.0, 20.0, 6.0, 6.0, 6.0, 12.0]
species names loaded
gorGor4
path list loaded
['example_input/test_data/hic_gorGor4', 'example_input/test_data/hic_panTro5', 'example_input/test_data/hic_panPan2', 'example_input/test_data/hic_hg38']
21
/jdfssz1/ST_EARTH/P18Z10200N0122/zhouyang/software/Phylo-HMRF/utility.py:2575: FutureWarning: read_table is deprecated, use read_csv instead.
  data1 = pd.read_table(filename1,header=None,sep='\t')
934.0
File example_input/test_data/hic_gorGor4/chr21.50K.txt does not exist. Please check.
Traceback (most recent call last):
  File "../phylo_hmrf.py", line 1761, in <module>
    opts.simu_version, opts.annotation, opts.reload, opts.dtype, opts.miter, opts.resolution, opts.quantile, opts.ref_species, opts.output)
  File "../phylo_hmrf.py", line 1661, in run
    m_vec_list = utility.quantile_contact_vec(chrom_vec,resolution,ref_filename,filename_list,species)
  File "/jdfssz1/ST_EARTH/P18Z10200N0122/zhouyang/software/Phylo-HMRF/utility.py", line 2468, in quantile_contact_vec
    m_vec = quantile_contact(chrom,resolution,ref_filename,filename_list, species)
  File "/jdfssz1/ST_EARTH/P18Z10200N0122/zhouyang/software/Phylo-HMRF/utility.py", line 2482, in quantile_contact
    keys_vec = list(vec1.keys())
AttributeError: 'bool' object has no attribute 'keys'

Could you help look into it?

Besides, I'm planning to use the software to investigate the Hi-C change in a larger range of species. However, by mapping the Hi-C reads to human (as the reference), species closed to human have a higher mapping rate and more Hi-C contact reads, while some species distant to human have lower number of them. I'm wondering whether that matters, and what's the maximum phylogenetic distance (e.g. 30 million years) do you recommend to include when using the software?

Many thanks

Best, Yang