BnpC icon indicating copy to clipboard operation
BnpC copied to clipboard

how can I generate tree file

Open jeffchen2000 opened this issue 2 years ago • 3 comments

according to the readme, BnpC can generate a output tree file (did I misunderstand?) but when I run this: run_BnpC.py snp.input.txt -tr test.gv

I got error like below, it seems that BnpC is trying to read "test.gv": Traceback (most recent call last): File "BnpC/run_BnpC.py", line 296, in main(args) File "BnpC/run_BnpC.py", line 291, in main generate_output(args, results, data, data_names) File "BnpC/run_BnpC.py", line 232, in generate_output io.save_tree_plots( File "BnpC/libs/dpmmIO.py", line 226, in save_tree_plots pl.color_tree_nodes( File "BnpC/libs/plotting.py", line 324, in color_tree_nodes with open(tree_file, 'r') as f_in: FileNotFoundError: [Errno 2] No such file or directory: 'test.gv'

jeffchen2000 avatar Oct 07 '22 00:10 jeffchen2000

BnpC does not infer the tree structure (see also (this issue)[https://github.com/cbg-ethz/BnpC/issues/18]). The option --tr takes the (simulated) tree used for data generation and colors the tree nodes according to the inferred clusters.

Putting it as an output argument might be misleading: I moved it to the input arguments.

NBMueller avatar Oct 10 '22 10:10 NBMueller

Hi NBMueller Thanks for your quick response! Yea, moving it to the input arguments will be better. and also, thanks for providing me the information about generating a tree file from third part (which is actually what I wanted). now, can I use a tree file generated from third part (say CellPhy as you mentioned) for the argument --tr ?

jeffchen2000 avatar Oct 10 '22 17:10 jeffchen2000

the -tr argument takes an existing mutation tree (nodes are mutations) in graphviz format and colors the nodes according to the identified clusters.

Cellphy infers a cell lineage tree (nodes are cells), due to the different tree representation it cannot be colored with BnpC. infScite infers the mutation tree, it should work with its output tree therefore.

NBMueller avatar Oct 12 '22 14:10 NBMueller