Ejemplo n.º 1
0
def download_versioned_wgs(dest_dir, accession, format):
    prefix = accession[:6]
    if format is None:
        format = utils.EMBL_FORMAT
    public_set_url = utils.get_wgs_ftp_url(prefix, utils.PUBLIC, format)
    supp_set_url = utils.get_wgs_ftp_url(prefix, utils.SUPPRESSED, format)
    success = utils.get_ftp_file(public_set_url, dest_dir)
    if not success:
        success = utils.get_ftp_file(supp_set_url, dest_dir)
    if not success:
        print ('No WGS set file available for ' + accession + ', format ' + format)
        print ('Please contact ENA ([email protected]) if you feel this set should be available')
Ejemplo n.º 2
0
def download_versioned_wgs(dest_dir, accession, output_format):
    prefix = accession[:6]
    public_set_url = utils.get_wgs_ftp_url(prefix, utils.PUBLIC, output_format)
    supp_set_url = utils.get_wgs_ftp_url(prefix, utils.SUPPRESSED,
                                         output_format)
    success = utils.get_ftp_file(public_set_url, dest_dir)
    if not success:
        success = utils.get_ftp_file(supp_set_url, dest_dir)
    if not success:
        print('No WGS set file available for {0}, format {1}'.format(
            accession, output_format))
        print(
            'Please contact ENA (https://www.ebi.ac.uk/ena/browser/support) if you feel this set should be available'
        )