SunPengChuan / wgdi

WGDI: A user-friendly toolkit for evolutionary analyses of whole-genome duplications and ancestral karyotypes
https://wgdi.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
114 stars 22 forks source link

We prepared three input files according to the example, but an error occurred after the last step "wgdi -d total.cof" was entered #31

Closed Alalakikun closed 1 year ago

Alalakikun commented 1 year ago

We prepared three input files according to the example, but an error occurred after the last step "wgdi -d total.cof" was enteredTraceback (most recent call last): File "/home/bycl0009/miniconda3/envs/wgdi/bin/wgdi", line 10, in sys.exit(main()) ^^^^^^ File "/home/bycl0009/miniconda3/envs/wgdi/lib/python3.11/site-packages/wgdi/run.py", line 163, in main module_to_run(arg, value) File "/home/bycl0009/miniconda3/envs/wgdi/lib/python3.11/site-packages/wgdi/run.py", line 122, in module_to_run run_subprogram(program, conf, name) File "/home/bycl0009/miniconda3/envs/wgdi/lib/python3.11/site-packages/wgdi/run.py", line 87, in run_subprogram r.run() File "/home/bycl0009/miniconda3/envs/wgdi/lib/python3.11/site-packages/wgdi/dotplot.py", line 98, in run gff1 = base.gene_location(gff1, lens1, step1, self.position) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/bycl0009/miniconda3/envs/wgdi/lib/python3.11/site-packages/wgdi/base.py", line 214, in gene_location gff.loc[group.index, 'loc'] = (dict_chr[name]+group[position])*step


KeyError: ('LG1',)
-------------------------------------------------------------
How should I solve this problem. I would be grateful if I could receive a reply from you
SunPengChuan commented 1 year ago

You need to check that: the first column of the GFF file and the LENS file are consistent. The two columns of IDs in the BLAST file should be consistent with the second column of GFF1 and GFF2.

Alalakikun commented 1 year ago

pro I'm not sure what's wrong with my content, and I have confirmed it many times

SunPengChuan commented 1 year ago

They look good. Could you upload your files for me to test? You can send them to my email: sunpengchuan@gmail.com.

Alalakikun commented 1 year ago

Yes, I have sent it to you

SunPengChuan commented 1 year ago

I have not received it yet.

Alalakikun commented 1 year ago

and now?

SunPengChuan commented 1 year ago

[dotplot] blast = Cg.blastp gff1 = Cg_out.gff gff2 = Cg_out.gff lens1 = Cg.len lens2 = Cg.len genome1_name = Genome1 name genome2_name = Genome2 name multiple = 1 score = 100 evalue = 1e-5 repeat_number = 10 position = end blast_reverse = false markersize = 0.5 figsize = 10,10 savefig = cg.png

I tested it in Python 3.11 and it produced results without any errors.

Alalakikun commented 1 year ago

I am using wgdi from the conda package and the python version is 3.11. I will try again with python alone,thank you very much for your help

kashiff007 commented 9 months ago

Hey @SunPengChuan could you specify what is the third coulm of lens input file? I couldnt find anywhere. maybe I missed in documents.

SunPengChuan commented 9 months ago

You can refer to the test files from a previous project available at this https://github.com/SunPengChuan/wgdi-example. Additionally, detailed instructions on the format of the lens files can be found in the https://wgdi.readthedocs.io/en/latest/usage.html. Moreover, I have provided a method on this https://github.com/SunPengChuan/wgdi-example/tree/main/code, which is not universal and may require some adjustments.