def writeScores(scoresO, strainNamesT, scoresFN, genesO=None, geneInfoFN=None):
    """Write a scores object to file. If scoresFN has the .bout extension, write
binary version, otherwise write in text output format."""
    scoreTypeL = ['rawSc', 'synSc', 'coreSynSc']
    if scoresFN.split('.')[-1] == 'bout':
        scoresO.writeScoresBinary(strainNamesT, scoreTypeL, scoresFN)
    else:
        scoresO.writeScoresText(strainNamesT, scoreTypeL, scoresFN, genesO,
            geneInfoFN)
