AvoidPattern with biopython FeatureLocation raises AttributeError (in some specific parameters)
See original GitHub issueAdding a simple DNA pattern TGAA
as an AvoidPattern
constraint causes an AttributeError
, the stack trace is listed below
"/usr/local/lib/python3.8/site-packages/dnachisel/DnaOptimizationProblem/mixins/ConstraintsSolverMixin.py", line 357, in resolve_constraints
self.resolve_constraint(constraint=constraint)
File "/usr/local/lib/python3.8/site-packages/dnachisel/DnaOptimizationProblem/mixins/ConstraintsSolverMixin.py", line 251, in resolve_constraint
evaluation = this_local_constraint.evaluate(self)
AttributeError: 'NoneType' object has no attribute 'evaluate'
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (9 by maintainers)
Top Results From Across the Web
Bio.SeqFeature module — Biopython 1.76 documentation
If the FeatureLocation is None, e.g. when parsing invalid locus locations in the GenBank parser, extract() will raise a ValueError. >>> from Bio.Seq...
Read more >[Biopython] Edit feature's location
Assigning to feature.location.start raises > an AttributeError. ... goal is to move all features in a genbank file by some specific > number ......
Read more >biopython FeatureLocation comparison - Stack Overflow
I am using biopython to complete a simple task: from a specific genebank fill, extract a gene ID and related information into a...
Read more >Source code for dnachisel.biotools.genbank_operations
SeqFeature import SeqFeature, FeatureLocation from Bio. ... Parameters ----------- record A Biopython record. pattern A DnaChisel SequencePattern object ...
Read more >Sequence annotation objects - Biopython - Read the Docs
SeqFeature import FeatureLocation from Bio.SeqRecord import SeqRecord ... SeqIO has been able to automatically assign a more specific alphabet: In [13]:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have to admit I have no clue what Biopython version supports what values 😦 . I think replacing
None
strands by0
should be pretty safe (someone will scream if it isn’t 😄 )Thanks for pointing out the problem; I’ll have to look into it to keep Biopython support for older version (as did with DNAalphabet). Alternatively we can drop support (?)