Skip to content

TypeError: unsupported operand type(s) for -: 'str' and 'int'` #4

Description

@pepelisu

Hi rwnull,
Thank you for developing the tool.

We found a combination of inputs that throws an error.
When using fasta files from FlyBase we found that Blastn is not finding any probes and also the program is throwing and error about a type mismatch.

To solve the error a type conversion (int()) can be added in file mainscript_core.py in lines:
454
return [uniquesbad,uniques,fltrblastbad,fltrblastok,str(int(count)-1),seqs1,g,blst]
and 469:
return [uniquesbad,uniques,fltrblastbad,fltrblastok,str(int(count)-1),seqs,g,blst]

Here is the command to reproduce the error. Fasta files were downloaded from FlyBase.

(base) PS C:\Users\admin\Downloads\genome> python .\HCRprobemaker\v2_0\HCR.py -in .\FlyBase_JWHTSA.fasta -blast .\drostranscriptome.fasta -amp B1 -gc 20-75 -min 0 -max 100 -o . -polyAT 4 -polyGC 5
2026-02-11 08:32:08.869689
Amplifier Chosen: B1
jjsdf
Percent CG lower limit specified: 20 percent
Percent CG upper limit specified: 75 percent
AT homopolymer limit specified: 4
GC homopolymer limit specified: 5
The maximum number of probe pairs made will be 100.
Transcripts with fewer than -2 base pairs made will be ignored because a lower limit of 0 probe pairs was requested.
C:\Users\admin\Downloads\genome\drostranscriptome.fasta  is a fasta file.
Transcriptome reference: drostranscriptome.fasta, located in the directory C:\Users\admin\Downloads\genome

C:\Users\admin\Downloads\genome\FlyBase_JWHTSA.fasta  is a fasta file.
maker
B1
length of input sequence is  3020
blastnprobes
name =  FBtr0334550
WARNING: No BLAST hits were found.
WARNING: No BLAST hits were found.
WARNING: No BLAST hits were found.
WARNING: No BLAST hits were found.
WARNING: No BLAST hits were found.
WARNING: No BLAST hits were found.
WARNING: No BLAST hits were found.

All preliminary probe pairs will be used.

There were fewer than 100 pairs, no action to limit the number of probe pairs was taken.
<class 'str'> 52
TypeError: unsupported operand type(s) for -: 'str' and 'int'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions