-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
module 'networkx' has no attribute 'write_gpickle' #7
Comments
Hi Xuan Zhang, I wrote syngraph using networkx=2.4, so I would recommend installing that version via conda. I have included a yaml file in this repo that can be used to generate the conda env I used for development. Please let me know whether this fixes the problem, and if so I will edit the docs to include networkx=2.4. If I understand your second question correctly, you should just use chromosome coordinate system, no need to convert to a 'whole genome' coordinate system. Cheers, Alex |
Hi Alex, This is indeed the problem, I used networkx=2.4 to solve the error, but syngraph still can not run properly, then I used the yaml file you gave, using the command “conda env create -f syngraph.yaml” to create the same environment as yours,and I made sure I replaced the conda environment path in the yaml file with my own. But there are many conflicts between packages: Found conflicts! Looking for incompatible packages. UnsatisfiableError: The following specifications were found to be incompatible with each other: Output in format: Requested package -> Available versions Package pypy3.7 conflicts for: Package libnsl conflicts for: Package _openmp_mutex conflicts for: Best wishes! Sincerely, |
Hi Xuan Zhang,
What was the error message? Perhaps it can solved without the need for a new yaml file. Best, Alex |
Hi Alex, I reinstalled numpy=1.20.3=py38h9894fe3_0 and was able to successfully run syngraph in my own conda env. But the test.rearrangements.tsv file that I generated after running it was empty and I don't know what went wrong. My busco_full_table.tsv was generated by using BUSCO v5.6.1 to evaluate the pep.fa files of each genome in prot mode, and then I named them as A_a.full_table.tsv.... I put 9 *.full_table.tsv files in the folder full_table/ , and then run "syngraph build -d full_table/ -m -o test" successfully to produce the test.pickle file; In the second step, I ran "syngraph infer -g test.pickle -t newick.txt -r 2 -s A_a -o test" to generate an empty test.rearrangements.tsv file. My tree file is generated by iqtree2 with the protein sequences of 9 species, A_a is also a leaf in the newick tree. And the number of chromosomes in my nine species is different, and some species have revealed chromosomal fusion events in other studies (using syngraph). Best, Xuan Zhang |
Hi Xuan Zhang, To prepare input for syngraph with BUSCO you should run the tool on your genome, not the proteins. Note that -m INT adds a minimum threshold to syngraph infer, but has a different meaning when running syngraph build (it allows missingness). Cheers, Alex |
Hi Alex, 1-) create a conda env with python=3.8 But! All that installed, I still met another dependency, more_itertools. So I did: 4-) pip install more_itertools With the instructions to create the conda env as they are now, people are going to have a higher version of numpy which doesn't work with the code. I also tried to use the yml file and couldn't create a conda from it because of many inconsistencies as Zhang mentioned. Thank you so much! |
Hi Marcela, Thanks for the feedback about installation. Putting those steps into a single conda / mamba command gives an env that supports both
The More generally, please do let me know how you get on with syngraph. I have tested the tool with lepidoptera, nematodes, and simulations, and think that it will work well in certain cases but not others (see the preprint for more details). |
Hi Alex,
I confirmed that my networkx version is 3.1 and installed all the dependencies using conda. But when I run the following command syngraph build -d full_table/ -m -o test, I get an error: Traceback (most recent call last):
File "/home/data/t240413/software/syngraph-master/syngraph", line 7, in < module>
main()
File "/home/data/t240413/software/syngraph-master/cli/interface.py", line 39, in main
build.main(run_params)
File "/home/data/t240413/software/syngraph-master/cli/build.py", line 61, in main
graph_file = syngraph.save(parameterObj, check_consistency=True, with_ancestors=False)
File "/home/data/t240413/software/syngraph-master/source/syngraph.py", line 861, in save
nx.write_gpickle(self, graph_file)
AttributeError: module 'networkx' has no attribute 'write_gpickle'
I don't know how to run it successfully.
Another question, about the *.full_table.tsv file, I would like to know whether the start and end position of each gene should be the continuous start and end position on the whole genome or the start and end position on each chromosome?
Looking forward to your reply!
Best wishes!
Sincerely,
Xuan Zhang
The text was updated successfully, but these errors were encountered: