refgen/extractor.py
def extract(self, ftp_url, output = None):
        """find the best reference genome of the term from the NCBI server and
        download the binary file to the specified local path

        input:
            ftp_url     : (str) used path directly from find_refgen
            output      : (str, default PATH = '.')"""

        # pick the first candid and parse the ftp path
        ftp_dir_path    = ftp_url[FtpConst.URL_PREFIX_LEN:]
        file_prefix     = ftp_dir_path.split(SepConst.SLASH)[-1]

        file_ext        = SepConst.DOT.join([
            ExtractorConst.FILE_EXT_TYPE,
            ExtractorConst.FILE_EXT_FORMAT,
            ExtractorConst.FILE_EXT_SUFFIX])

        file_gff_name   = SepConst.UNDERSCORE.join([
            file_prefix,
            file_ext])

        file_path       = SepConst.SLASH.join([
            ftp_dir_path,
            file_gff_name])

        if output is None:
            output  = '.'

        ftp.download(
            FtpConst.HOST,
            file_path,
            output,
            'b')
find the best reference genome of the term from the NCBI server and
        download the binary file to the specified local path

        input:
            ftp_url     : (str) used path directly from find_refgen
            output      : (str, default PATH = '.')
find the best reference genome of the term from the NCBI server and
download the binary file to the specified local path

ftp_url     : (str) used path directly from find_refgen
output      : (str, default PATH = '.')
find the best reference genome of the term from the NCBI server and download the binary file to the specified local path ftp_url : ( str ) used path directly from find_refgen output : ( str default PATH = ' . ' )
def extract(self, ftp_url, output = None):
        ftp_dir_path    = ftp_url[FtpConst.URL_PREFIX_LEN:]
        file_prefix     = ftp_dir_path.split(SepConst.SLASH)[-1]
        file_ext        = SepConst.DOT.join([
            ExtractorConst.FILE_EXT_TYPE,
            ExtractorConst.FILE_EXT_FORMAT,
            ExtractorConst.FILE_EXT_SUFFIX])
        file_gff_name   = SepConst.UNDERSCORE.join([
            file_prefix,
            file_ext])
        file_path       = SepConst.SLASH.join([
            ftp_dir_path,
            file_gff_name])
        if output is None:
            output  = '.'
        ftp.download(
            FtpConst.HOST,
            file_path,
            output,
            'b')
def extract ( self , ftp_url , output = None ) : ftp_dir_path = ftp_url [ FtpConst . URL_PREFIX_LEN : ] file_prefix = ftp_dir_path . split ( SepConst . SLASH ) [ - 1 ] file_ext = SepConst . DOT . join ( [ ExtractorConst . FILE_EXT_TYPE , ExtractorConst . FILE_EXT_FORMAT , ExtractorConst . FILE_EXT_SUFFIX ] ) file_gff_name = SepConst . UNDERSCORE . join ( [ file_prefix , file_ext ] ) file_path = SepConst . SLASH . join ( [ ftp_dir_path , file_gff_name ] ) if output is None : output = '.' ftp . download ( FtpConst . HOST , file_path , output , 'b' )
find the best reference genome of the term from the NCBI server and
download the binary file to the specified local path
find the best reference genome of the term from the NCBI server and download the binary file to the specified local path
"""find the best reference genome of the term from the NCBI server and
        download the binary file to the specified local path

        input:
            ftp_url     : (str) used path directly from find_refgen
            output      : (str, default PATH = '.')""" # pick the first candid and parse the ftp path
self
ftp_url
output