SnapGeneReader
SnapGeneReader copied to clipboard
Fix seqfeature strand arg
Issue: The script fails with a TypeError upon calling the snapgene_file_to_seqrecord function. The error message is: TypeError: init() got an unexpected keyword argument 'strand'. This occurs because the 'strand' information is being directly passed to the SeqFeature constructor.
Proposed solution: I have modified the snapgene_file_to_seqrecord function to correctly include the strand information within the FeatureLocation object, rather than as a direct argument to the SeqFeature constructor. I have done so by deleting the line:
strand=strand_dict[feature["strand"]]
This resolves the TypeError.
images showing the issue and its resolution:
Error:
Result after implementing the proposed solution: