Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError when running BESST #61

Open
ademcan opened this issue Aug 15, 2017 · 8 comments
Open

TypeError when running BESST #61

ademcan opened this issue Aug 15, 2017 · 8 comments

Comments

@ademcan
Copy link

ademcan commented Aug 15, 2017

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.

@ksahlin
Copy link
Owner

ksahlin commented Aug 15, 2017

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!

@ademcan
Copy link
Author

ademcan commented Aug 15, 2017

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

@ksahlin
Copy link
Owner

ksahlin commented Aug 15, 2017

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!

@ademcan
Copy link
Author

ademcan commented Aug 16, 2017

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.

@ksahlin
Copy link
Owner

ksahlin commented Aug 16, 2017

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.

@ademcan
Copy link
Author

ademcan commented Aug 21, 2017

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.

@vetsuisse-unibe
Copy link

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.

@ksahlin
Copy link
Owner

ksahlin commented Sep 9, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants