ku-cbd/PhageBoost

Possible bug in calc_features.py

Closed this issue · 1 comments

chg60 commented

Inside the _count_codons() method of your custom CodonAdaptationIndex class, the for-loop that actually processes the codons in each sequence (lines 61-68) may be indented too far. Given that the preceding if-else block casts lowercase sequences to uppercase, it appears that the intended behavior is for all sequences that enter _count_codons() to be processed; the if-else block makes sure that the BioPython codons (which are all uppercase) can be found in the input strings. With the current indentation it seems that only those sequences which come into the method already in uppercase, will be processed. Possibly you have code elsewhere that deals with this and so this bug may never be encountered, but I wanted to let you know just in case!

Thank you - nice catch!
Fixed now
/T