vaquerizaslab/chess

error of the chess extract

ZQY19960810 opened this issue · 3 comments

Hi, I always got this error recently when run the chess_extarct command:
do you have any idea about this error
when i input tsv format file ,it shouls:
Traceback (most recent call last):
File "/miniconda3/envs/hicex3.6/bin/chess", line 585, in
Chess()
File "/miniconda3/envs/hicex3.6/bin/chess", line 75, in init
getattr(self, args.command)([sys.argv[0]] + sys.argv[option_ix:])
File "/miniconda3/envs/hicex3.6/bin/chess", line 555, in extract
pairs = list(load_pairs_iter(pairs_file))
File "/miniconda3/envs/hicex3.6/lib/python3.7/site-packages/chess/helpers.py", line 469, in load_pairs_iter
).format(len(fields)))
ValueError: 10 columns expected but 4 found in bedpe input
but when i put bedpe format fie, it shows
Traceback (most recent call last):
File "/miniconda3/envs/hicex3.6/bin/chess", line 585, in
Chess()
File "/miniconda3/envs/hicex3.6/bin/chess", line 75, in init
getattr(self, args.command)([sys.argv[0]] + sys.argv[option_ix:])
File "/miniconda3/envs/hicex3.6/bin/chess", line 549, in extract
query_matrix_file, query_regions_file)
File "/miniconda3/envs/hicex3.6/lib/python3.7/site-packages/chess/helpers.py", line 581, in load_oe_contacts
edges = edges_dict_from_fanc(reference_loaded)
File "/miniconda3/envs/hicex3.6/lib/python3.7/site-packages/chess/helpers.py", line 371, in edges_dict_from_fanc
for e in hic.edges(lazy=True):
AttributeError: 'Bed' object has no attribute 'edges'

by the way , in the example , it shows i when i run command 'chess extract ' should use a file named filtered_regions_chr2_3mb_100kb.tsv , but i didn't seeing it before , so could you give me some help for this?

Can you please show the command you are using that generates this error and an example of a few lines from the input file so I can see how it's formatted? The required input for the pairs file for chess extract is described here.

This is the same format as is generated by chess pairs and used as input for chess sim, but you should filter the results of chess sim to select the regions of interest for further downstream analysis. Because selecting regions of interest is very dependent on the research question, we don't provide a tool for this. You can find some guidance here on selecting regions for further analysis. You can load the chess sim output in Python, R, or your tool of choice for this analysis. We have some example code in python here or using R here.

Thank you very much ,I have found the solution

Great, glad you got it sorted! I'll close this then.