From genes to memes: Algorithm may help scientists demystify