Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- #from itertools import groupby
- #from operator import itemgetter
- import sys
- def read_mapper_output(file, separator='\t'):
- for line in file:
- yield line.rstrip().split(separator, 1)
- def main(separator='\t'):
- # Input comes from STDIN
- data = read_mapper_output(sys.stdin, separator=separator)
- # Extract the 10 first items
- for i in range(10):
- uri = data.next()
- print "%s%s%s" % (uri[1], separator, uri[0])
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement