zhangrengang / TEsorter

TEsorter: an accurate and fast method to classify LTR-retrotransposons in plant genomes
https://doi.org/10.1093/hr/uhac017
GNU General Public License v3.0
87 stars 19 forks source link

ValueError: invalid literal for int() with base 10: '0.5' #40

Closed LeeYEAH2 closed 1 year ago

LeeYEAH2 commented 1 year ago

Hi, I encountered a problem which only showed up in 2 of my 6 LTR datasets. Below is the traceback. Could you please help out with this?
-INFO- generating gene anntations Traceback (most recent call last): File "/Share/home/louliyi/miniconda3/envs/LTR_retriever/bin/TEsorter", line 10, in sys.exit(main()) File "/Share/home/louliyi/miniconda3/envs/LTR_retriever/lib/python3.9/site-packages/TEsorter/app.py", line 1014, in main pipeline(Args()) File "/Share/home/louliyi/miniconda3/envs/LTR_retriever/lib/python3.9/site-packages/TEsorter/app.py", line 158, in pipeline gff, geneSeq = LTRlibAnn( File "/Share/home/louliyi/miniconda3/envs/LTR_retriever/lib/python3.9/site-packages/TEsorter/app.py", line 918, in LTRlibAnn gff, geneSeq = hmm2best(aaSeq, [domtbl], db=hmmdb, nucl_len=d_nucl_len, File "/Share/home/louliyi/miniconda3/envs/LTR_retriever/lib/python3.9/site-packages/TEsorter/app.py", line 760, in hmm2best for rc in HmmScan(inHmmout): File "/Share/home/louliyi/miniconda3/envs/LTR_retriever/lib/python3.9/site-packages/TEsorter/app.py", line 645, in parse yield HmmDomRecord(line) File "/Share/home/louliyi/miniconda3/envs/LTR_retriever/lib/python3.9/site-packages/TEsorter/app.py", line 658, in init list(map(int, [self.tlen, self.qlen, self.domi, self.domn, \ ValueError: invalid literal for int() with base 10: '0.5'

zhangrengang commented 1 year ago

The error is not expected. I have revised the funtion to make the float type compitable. Please try the last verion in github. By the way, which version of hmmer are you using?

LeeYEAH2 commented 1 year ago

The hmmer version I used is V.3.3.2 which was auto-downloaded by conda.

LeeYEAH2 commented 1 year ago

Hi there, Recently I encountered another problem which is quite similar to the former one. It happened when I was using the get_full_seq subcmd in LTR_retriever.py. tracebacks are listed below. Could you plz help me out with this again? Traceback (most recent call last): File "/Share/home/louliyi/miniconda3/bin/LTR_retriever.py", line 4, in import('pkg_resources').run_script('TEsorter==1.4.5', 'LTR_retriever.py') File "/Share/home/louliyi/miniconda3/lib/python3.9/site-packages/pkg_resources/init.py", line 672, in run_script self.require(requires)[0].run_script(script_name, ns) File "/Share/home/louliyi/miniconda3/lib/python3.9/site-packages/pkg_resources/init.py", line 1472, in run_script exec(code, namespace, namespace) File "/Share/home/louliyi/miniconda3/lib/python3.9/site-packages/TEsorter-1.4.5-py3.9.egg/EGG-INFO/scripts/LTR_retriever.py", line 757, in main() File "/Share/home/louliyi/miniconda3/lib/python3.9/site-packages/TEsorter-1.4.5-py3.9.egg/EGG-INFO/scripts/LTR_retriever.py", line 753, in main Retriever(genome).get_full_seqs() File "/Share/home/louliyi/miniconda3/lib/python3.9/site-packages/TEsorter-1.4.5-py3.9.egg/EGG-INFO/scripts/LTR_retriever.py", line 87, in get_full_seqs for rc in self.intact_list(): File "/Share/home/louliyi/miniconda3/lib/python3.9/site-packages/TEsorter-1.4.5-py3.9.egg/EGG-INFO/scripts/LTR_retriever.py", line 146, in intact_list yield IntactRecord(title, temp) File "/Share/home/louliyi/miniconda3/lib/python3.9/site-packages/TEsorter-1.4.5-py3.9.egg/EGG-INFO/scripts/LTR_retriever.py", line 26, in init self.dict['Insertion_Time'] = int(self.dict['Insertion_Time']) ValueError: invalid literal for int() with base 10: 'NA'

LeeYEAH2 commented 1 year ago

To my shallow knowledge, I think there may be some elements missing in my input file. But the directory running the program contains .pass.list&.nmtf.pass.list file. And they are named after the inputed genome.

zhangrengang commented 1 year ago

@LeeYEAH2 I have updates the code. You can have a try. It should be beacause some Insertion_Time by LTR_retriever are "NA".

zhangrengang commented 1 year ago

@LeeYEAH2 please wait a moment. It is pushing.

zhangrengang commented 1 year ago

@LeeYEAH2 now is ok.

LeeYEAH2 commented 1 year ago

It just works, thx. :D