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

Error in Dotplot stage #25

Closed ardy20 closed 1 year ago

ardy20 commented 1 year ago

Hello SunPeng

I started Wgdi but after running wgdi -d total.conf I get the following error:

wgdi -d total.conf blast = /scratch/project_mnt/S0030/wgdi/male-female/blast_results/male_blast gff1 = /scratch/project_mnt/S0030/wgdi/male-female/male-v1.0.a4.62d0dba6b61fa-publish.genes.gff3 gff2 = /scratch/project_mnt/S0030/wgdi/male-female/male-v1.0.a4.62d0dba6b61fa-publish.genes.gff3 lens1 = /scratch/project_mnt/S0030/wgdi/male-female/jojoba_male.lens lens2 = /scratch/project_mnt/S0030/wgdi/male-female/jojoba_male.lens genome1_name = jojoba male genome2_name = jojoba male multiple = 1 score = 100 evalue = 1e-5 repeat_number = 10 position = order blast_reverse = false ancestor_left = none ancestor_top = none markersize = 0.5 figsize = 10,10 savefig = male_Jojoba(.png, .pdf, .svg) Traceback (most recent call last): File "/scratch/project/qaafi-cnafs/wgdi/bin/wgdi", line 10, in sys.exit(main()) ^^^^^^ File "/scratch/project/qaafi-cnafs/wgdi/lib/python3.11/site-packages/wgdi/run.py", line 158, in main module_to_run(arg, value) File "/scratch/project/qaafi-cnafs/wgdi/lib/python3.11/site-packages/wgdi/run.py", line 118, in module_to_run run_subprogram(program, conf, name) File "/scratch/project/qaafi-cnafs/wgdi/lib/python3.11/site-packages/wgdi/run.py", line 84, in run_subprogram r.run() File "/scratch/project/qaafi-cnafs/wgdi/lib/python3.11/site-packages/wgdi/dotplot.py", line 96, in run gff1 = base.newgff(self.gff1) ^^^^^^^^^^^^^^^^^^^^^^ File "/scratch/project/qaafi-cnafs/wgdi/lib/python3.11/site-packages/wgdi/base.py", line 177, in newgff gff['start'] = gff['start'].astype(np.int64) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/scratch/project/qaafi-cnafs/wgdi/lib/python3.11/site-packages/pandas/core/generic.py", line 6240, in astype new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/scratch/project/qaafi-cnafs/wgdi/lib/python3.11/site-packages/pandas/core/internals/managers.py", line 450, in astype return self.apply("astype", dtype=dtype, copy=copy, errors=errors) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/scratch/project/qaafi-cnafs/wgdi/lib/python3.11/site-packages/pandas/core/internals/managers.py", line 352, in apply applied = getattr(b, f)(**kwargs) ^^^^^^^^^^^^^^^^^^^^^^^ File "/scratch/project/qaafi-cnafs/wgdi/lib/python3.11/site-packages/pandas/core/internals/blocks.py", line 526, in astype new_values = astype_array_safe(values, dtype, copy=copy, errors=errors) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/scratch/project/qaafi-cnafs/wgdi/lib/python3.11/site-packages/pandas/core/dtypes/astype.py", line 299, in astype_array_safe new_values = astype_array(values, dtype, copy=copy) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/scratch/project/qaafi-cnafs/wgdi/lib/python3.11/site-packages/pandas/core/dtypes/astype.py", line 230, in astype_array values = astype_nansafe(values, dtype, copy=copy) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/scratch/project/qaafi-cnafs/wgdi/lib/python3.11/site-packages/pandas/core/dtypes/astype.py", line 170, in astype_nansafe return arr.astype(dtype, copy=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: 'gene'

SunPengChuan commented 1 year ago

Can you upload screenshots of gff and blast?

ardy20 commented 1 year ago

Hello Yes BLAST FILE blast file

Original GFF# FILE gff3 file

GFF from deal_gff.py

gff3 from deal_gff

I noticed that I wrongly used the original gff3 file. Should I use the gff file generated from deal_gff.py?

SunPengChuan commented 1 year ago

gff file is not right. you should use the mark.gff not gff3. https://github.com/SunPengChuan/wgdi/issues/24

ardy20 commented 1 year ago

OK Thanks! Problem solved. I used the correct .gff also in "savefile =" section of conf file I added a name such as savefile = jojoba.png

However, although the synteny dotplot is nice but the X and Y axis legends are so mixed up and also chromosomes are not ordered ascendingly and they looked very messy. They should be ordered as chr1, chr2, chr3......chr26 but they start from chr1, then chr10....... Please seed the attached figure:

synteny plot

SunPengChuan commented 1 year ago

You can directly change the order of the lens file (jojoba_male.lens).

ardy20 commented 1 year ago

OK, Do you mean manually?

SunPengChuan commented 1 year ago

yes

SunPengChuan commented 1 year ago

Do you want to change the font size?

ardy20 commented 1 year ago

Yes. For Chr, Is it possible?

SunPengChuan commented 1 year ago

It's simple, remove the ‘Chr’ in the first column in the gff and lens files

ardy20 commented 1 year ago

Does it change the font size? I need to reduce the font size not the word "chr".

SunPengChuan commented 1 year ago

It is possible but requires to change the program code. I do not advise you to do this. I often adjust figures with AI.

ardy20 commented 1 year ago

OK, But what is AI? Artificial Intelligence or it is a program?

Anyway, By any chance Have you seen this? I think it uses Wgdi: https://github.com/Emma6674/PolyReco2022/blob/main/PolyReco

SunPengChuan commented 1 year ago

AI means Adobe illustrator. I also feel that he learned my code.