Skip to content

Instantly share code, notes, and snippets.

@indapa
Created October 23, 2012 16:03
Show Gist options
  • Save indapa/3939668 to your computer and use it in GitHub Desktop.
Save indapa/3939668 to your computer and use it in GitHub Desktop.
using a Python namedtuple
import collections
Pileup = collections.namedtuple('Pileup', ['sample', 'RG', 'alignmentname', 'basecall', 'bq'])
pileupList=[('51_WGA', 'ZFJDLOT83TE', 'D9WJ65M1:224:BB006PABXX:2:21:8481:67213', 'C', 45),
('51_WGA', 'ZFJDLOT83TE', 'D9WJ65M1:224:BB006PABXX:2:21:8481:67214', 'C', 40
)]
pileupList=map(Pileup._make, pileupList)
for p in pileupList:
print p.sample, p.basecall, p.bq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment