scripts/export/genomes/genome_fetch.py
def fetch_wgs_range_accs(wgs_range):
    """
    Splits the WGS range into distinct accessions for metadata retrieval

    wgs_range: A valid ENA-WGS set range
    """

    wgs_accs = []

    wgs_end_points = wgs_range.strip().split('-')
    wgs_prefix = wgs_end_points[0][0:5]

    wgs_start = int(wgs_end_points[0][5:])
    wgs_end = int(wgs_end_points[1][5:])

    wgs_acc = ''

    while wgs_start < wgs_end:
        wgs_acc = wgs_prefix + str(wgs_start)
        wgs_accs.append(wgs_acc)
        wgs_start += 1
        wgs_acc = ''

    # include the last accession
    wgs_accs.append(wgs_end_points[1])

    return wgs_accs

    Splits the WGS range into distinct accessions for metadata retrieval

    wgs_range: A valid ENA-WGS set range
    
Splits the WGS range into distinct accessions for metadata retrieval
wgs_range: A valid ENA-WGS set range
Splits the WGS range into distinct accessions for metadata retrieval wgs_range : A valid ENA - WGS set range
def fetch_wgs_range_accs(wgs_range):
    wgs_accs = []
    wgs_end_points = wgs_range.strip().split('-')
    wgs_prefix = wgs_end_points[0][0:5]
    wgs_start = int(wgs_end_points[0][5:])
    wgs_end = int(wgs_end_points[1][5:])
    wgs_acc = ''
    while wgs_start < wgs_end:
        wgs_acc = wgs_prefix + str(wgs_start)
        wgs_accs.append(wgs_acc)
        wgs_start += 1
        wgs_acc = ''
    wgs_accs.append(wgs_end_points[1])
    return wgs_accs
def fetch_wgs_range_accs ( wgs_range ) : wgs_accs = [ ] wgs_end_points = wgs_range . strip ( ) . split ( '-' ) wgs_prefix = wgs_end_points [ 0 ] [ 0 : 5 ] wgs_start = int ( wgs_end_points [ 0 ] [ 5 : ] ) wgs_end = int ( wgs_end_points [ 1 ] [ 5 : ] ) wgs_acc = '' while wgs_start < wgs_end : wgs_acc = wgs_prefix + str ( wgs_start ) wgs_accs . append ( wgs_acc ) wgs_start += 1 wgs_acc = '' wgs_accs . append ( wgs_end_points [ 1 ] ) return wgs_accs
Splits the WGS range into distinct accessions for metadata retrieval
wgs_range: A valid ENA-WGS set range
Splits the WGS range into distinct accessions for metadata retrieval wgs_range : A valid ENA - WGS set range
"""
    Splits the WGS range into distinct accessions for metadata retrieval

    wgs_range: A valid ENA-WGS set range
    """ # include the last accession
wgs_range