comparison bio2srr.py @ 8:832f269deeb0

planemo upload for repository https://toolrepo.galaxytrakr.org/view/jpayne/bioproject_to_srr_2/556cac4fb538
author jpayne
date Sun, 05 May 2024 23:47:10 -0400
parents 2d4a2159c74b
children f9f1d0a0599a
comparison
equal deleted inserted replaced
7:5eb2d5e3bf22 8:832f269deeb0
2 2
3 import requests 3 import requests
4 import sys 4 import sys
5 import csv 5 import csv
6 6
7 7 try:
8 from itertools import batched 8 from itertools import batched
9 except ImportError:
10 def batched(iterable, n):
11 "Batch data into tuples of length n. The last batch may be shorter."
12 # batched('ABCDEFG', 3) --> ABC DEF G
13 if n < 1:
14 raise ValueError('n must be at least one')
15 it = iter(iterable)
16 while batch := tuple(islice(it, n)):
17 yield batch
9 from functools import cmp_to_key 18 from functools import cmp_to_key
10 from time import sleep 19 from time import sleep
11 from xml.etree import ElementTree as xml 20 from xml.etree import ElementTree as xml
12 21
13 esearch = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi" 22 esearch = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi"