[Biopython-dev] [Bug 2778] New: Efficiency improvement in function Bio.SeqUtils.GC()
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Wed Mar 4 19:10:37 UTC 2009
http://bugzilla.open-bio.org/show_bug.cgi?id=2778
Summary: Efficiency improvement in function Bio.SeqUtils.GC()
Product: Biopython
Version: 1.48
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Main Distribution
AssignedTo: biopython-dev at biopython.org
ReportedBy: wscott at chem.ubc.ca
Bio.SeqUtils.GC recalculates the gc variable in a loop using a dictionary
whereas it could simply be calculated after the loop.
The following code is suggested to replace the function:
def ScoGC(seq):
""" calculates G+C content """
gc=sum(map(seq.count,['G','C','g','c','S','s']))
return gc*100.0/len(seq)
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Biopython-dev
mailing list