SnapGeneReader icon indicating copy to clipboard operation
SnapGeneReader copied to clipboard

Fix seqfeature strand arg

Open Atishaysjain opened this issue 1 year ago • 0 comments

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:

Screenshot 2024-01-21 at 8 26 47 PM

Result after implementing the proposed solution:

Screenshot 2024-01-21 at 8 25 24 PM

Atishaysjain avatar Jan 22 '24 04:01 Atishaysjain