BESST icon indicating copy to clipboard operation
BESST copied to clipboard

TypeError when running BESST

Open ademcan opened this issue 6 years ago • 8 comments

Hi, thank you for the tool. I am trying to run BESST after mapping the reads to the assembly with bwa, but it always ends up with the following error: param.contig_threshold = N60 - 1 TypeError: unsupported operand type(s) for -: 'NoneType' and 'int' I don't know how to solve this issue. I would be grateful if you could help me with that. Thanks in advance.

ademcan avatar Aug 15 '17 07:08 ademcan

Hi,

Can you post the full error output here. Also, can you attach the Statistics.txt file generated by BESST? Either here or by email.

Thanks!

ksahlin avatar Aug 15 '17 11:08 ksahlin

Thank you for your help. Here is the complete error output: Traceback (most recent call last): File "/software/UHTS/Assembler/BESST/2.2.5/bin/runBESST", line 415, in main(args) File "/software/UHTS/Assembler/BESST/2.2.5/bin/runBESST", line 180, in main decide_approach.decide_scaffolding_procedure(Scaffolds,small_scaffolds, param) File "/software/UHTS/Assembler/BESST/2.2.5/lib/python2.7/site-packages/BESST/decide_approach.py", line 20, in decide_scaffolding_procedure param.contig_threshold = N60 - 1 TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

I also attached the Statistics.txt file. I hope I can get BESST running :) Thanks Statistics.txt

ademcan avatar Aug 15 '17 12:08 ademcan

It seems that you have specified some non default options (such as -T and -k). Can you:

  1. Provide the command line options that you ran BESST with here.
  2. Run BESST without any parameters (everything default) and see if this still causes the error?

Thanks!

ksahlin avatar Aug 15 '17 13:08 ksahlin

Oh, yes you are right. Actually, I got the same error when I tried without any parameter, just as follow: runBESST -c path_to_assembly -f path_to_pairedendBAM path_to_matepairBAM -o path_to_outputDir (I attached the resulting Statistics.txt) Statistics.txt

Then I thought I was missing some parameters and tried again with -k and -T but got the same error again.

ademcan avatar Aug 16 '17 06:08 ademcan

Oh, ok!

At this point, the only way I can see this bug happen is if the contigs accessions in the fasta file does not match the accessions of contigs in the bam file. Has the contig sequences and/or accessions in the fasta file in any way been modified after the alignments were done? I would recommend to check this.

ksahlin avatar Aug 16 '17 15:08 ksahlin

Thanks, I'll have a look into that. I didn't modify anything manually but I will still check to see if there is anything weird/wrong, thanks for your help.

ademcan avatar Aug 21 '17 09:08 ademcan

Was there a solution to this problem. I have the same type error issues. and I checked for the contig accessions and they seem to be the same. Thank you very much for your answer.

vetsuisse-unibe avatar Sep 08 '19 22:09 vetsuisse-unibe

I'm afraid not. It seems that in order for this to happen, the list lengths on this line is empty. To my knowledge this is caused by something degenerate in the input.

How many contigs are in your input? Does the accessions in the fasta file contain any whitespaces?

If you are familiar with python, you can insert a print(lengths) after lengthsis created to check whether my assumption of an empty list is correct.

ksahlin avatar Sep 09 '19 06:09 ksahlin