tanghaibao / jcvi

Python library to facilitate genome assembly, annotation, and comparative genomics
BSD 2-Clause "Simplified" License
712 stars 185 forks source link

ALLMAPS KeyError: 'CHR01_1133501' #596

Closed mixle18 closed 9 months ago

mixle18 commented 9 months ago

Hi, i am running allmaps. i am trying to align one linkage map and genetic map. It is giving this error,

File "/home/safflower2/anaconda3/lib/python3.10/site-packages/jcvi/formats/agp.py", line 800, in order_to_agp size = sizes[ctg] KeyError: 'CHR01_1133501'.

I checked my .bed .csv , both have this id. I dont understand, why i am getting this error. Can you help? grep -c "CHR01_1133501" combined_linkage_map.tour 27406 grep "CHR01_1133501" combined_linkage_map.bed CHR01_1133501 1133500 1133501 combined_linkage_map-1:206.600000 CHR01_1133501:1133501 grep "CHR01_1133501" combined_linkage_map.csv CHR01_1133501,113501,1,206.6

Also, is there any way through which we can resume the command from the point it is giving error because 12 hours to construct the tour file.

tanghaibao commented 9 months ago

@mixle18

Would you please check if CHR01_1133501 is present in the FASTA file? The good news is that the optimization is already done, but this unfortunately errors out during the AGP file is written (otherwise with the AGP file you can reconstruct FASTA).

I don't see an easy way (without some code refactoring) to recover but assuming all contig Ids are verified in the FASTA file then you should have a result with another run. Sorry for the inconvenience.

mixle18 commented 9 months ago

Hi, thanks for the fast reply. The error was resolved after I checked names in my marker file and fasta file. However, i come across the other error, while saving the pdf file, ERROR savefig failed with message: base.py:324 latex was not able to process the following string:
b'lp'

                   Here is the full command invocation and its output:                                                                      

                   latex -interaction=nonstopmode --halt-on-error --output-directory=tmpcrnjt9xd                                            
                   9227465b0c813627a0c842d24490ee1a.tex                                                                                     

                   This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2022/dev/Debian) (preloaded format=latex)                      
                    restricted \write18 enabled.                                                                                            
                   entering extended mode                                                                                                   
                   (./9227465b0c813627a0c842d24490ee1a.tex                                                                                  
                   LaTeX2e <2021-11-15> patch level 1                                                                                       
                   L3 programming layer <2022-01-21>                                                                                        
                   (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls                                                                
                   Document Class: article 2021/10/04 v1.4n Standard LaTeX document class                                                   
                   (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))                                                               
                   (/usr/share/texlive/texmf-dist/tex/latex/psnfss/helvet.sty                                                               
                   (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty))                                                           

                   ! LaTeX Error: File `type1cm.sty' not found.                                                                             

                   Type X to quit or <RETURN> to proceed,                                                                                   
                   or enter new name. (Default extension: sty)                                                                              

                   Enter file name:                                                                                                         
                   ! Emergency stop.                                                                                                        
                   <read *>                                                                                                                 

                   l.8 \usepackage                                                                                                          
                                  {type1ec}^^M                                                                                              
                   No pages of output.                                                                                                      
                   Transcript written on tmpcrnjt9xd/9227465b0c813627a0c842d24490ee1a.log.                                                  

          INFO     Try running again with --notex option to disable latex.                                                       base.py:325
          DEBUG    Cleaning up empty file: chr1.pdf         

I tried --notex, but getting the same error. I also. installed all the dependencies that are required for the latex. Is it any kind of dependencies that are missing or am I missing something here? Can you please help.

Thank you,

mixle18 commented 9 months ago

I resolved by uninstalling the later(which might be broken earlier) and reinstalling it using sudo apt install texlive texlive-latex-extra texlive-fonts-recommended dvipng cm-super pip install latex

Thanks. It's a great tool.