def download_unversioned_wgs(dest_dir, accession, output_format): prefix = accession[:4] if output_format is None: output_format = utils.EMBL_FORMAT public_set_url = utils.get_nonversioned_wgs_ftp_url(prefix, utils.PUBLIC, output_format) if public_set_url is not None: utils.get_ftp_file(public_set_url, dest_dir) else: supp_set_url = utils.get_nonversioned_wgs_ftp_url(prefix, utils.SUPPRESSED, output_format) if supp_set_url is not None: utils.get_ftp_file(supp_set_url, dest_dir) else: print 'No WGS set file available for {0}, format {1}'.format(accession, output_format) print 'Please contact ENA ([email protected]) if you feel this set should be available'
def download_unversioned_wgs(dest_dir, accession, output_format): prefix = accession[:4] public_set_url = utils.get_nonversioned_wgs_ftp_url( prefix, utils.PUBLIC, output_format) if public_set_url is not None: utils.get_ftp_file(public_set_url, dest_dir) else: supp_set_url = utils.get_nonversioned_wgs_ftp_url( prefix, utils.SUPPRESSED, output_format) if supp_set_url is not None: utils.get_ftp_file(supp_set_url, dest_dir) else: 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' )
def download_unversioned_wgs(dest_dir, accession, format): prefix = accession[:4] if format is None: format = utils.EMBL_FORMAT public_set_url = utils.get_nonversioned_wgs_ftp_url(prefix, utils.PUBLIC, format) if public_set_url is not None: utils.get_ftp_file(public_set_url, dest_dir) else: supp_set_url = utils.get_nonversion_supp_wgs_ftp_url(prefix, format) if supp_set_url is not None: utils.get_ftp_file(supp_set_url, dest_dir) else: print ('No WGS set file available for ' + accession + ', format ' + format) print ('Please contact ENA ([email protected]) if you feel this set should be available')