Mercurial > repos > jpayne > bioproject_to_srr_2
comparison bio2srr.py @ 9:f9f1d0a0599a
planemo upload for repository https://toolrepo.galaxytrakr.org/view/jpayne/bioproject_to_srr_2/556cac4fb538
author | jpayne |
---|---|
date | Sun, 05 May 2024 23:58:19 -0400 |
parents | 832f269deeb0 |
children | ccec96a537b7 |
comparison
equal
deleted
inserted
replaced
8:832f269deeb0 | 9:f9f1d0a0599a |
---|---|
5 import csv | 5 import csv |
6 | 6 |
7 try: | 7 try: |
8 from itertools import batched | 8 from itertools import batched |
9 except ImportError: | 9 except ImportError: |
10 from itertools import islice | |
10 def batched(iterable, n): | 11 def batched(iterable, n): |
11 "Batch data into tuples of length n. The last batch may be shorter." | 12 "Batch data into tuples of length n. The last batch may be shorter." |
12 # batched('ABCDEFG', 3) --> ABC DEF G | 13 # batched('ABCDEFG', 3) --> ABC DEF G |
13 if n < 1: | 14 if n < 1: |
14 raise ValueError('n must be at least one') | 15 raise ValueError('n must be at least one') |