Exemple #1
0
    def __init__(self,
                 database: Database,
                 host='ftp.ncbi.nlm.nih.gov',
                 data_dir='gene/DATA/',
                 src_data_dir=APP_ROOT / 'data' / 'ncbi'):
        """Construct the NCBI ETL instance.

        :param Database database: gene database for adding new data
        :param str host: FTP host name
        :param str data_dir: FTP data directory to use
        :param Path src_data_dir: Data directory for NCBI
        """
        super().__init__(database, host, data_dir, src_data_dir)
        self._sequence_location = SequenceLocation()
        self._chromosome_location = ChromosomeLocation()
        self._data_url = f"ftp://{host}"
        self._assembly = None
        self._date_today = datetime.today().strftime('%Y%m%d')
Exemple #2
0
    def __init__(self,
                 database: Database,
                 host='ftp.ebi.ac.uk',
                 data_dir='pub/databases/genenames/hgnc/json/',
                 src_data_dir=APP_ROOT / 'data' / 'hgnc',
                 fn='hgnc_complete_set.json'):
        """Initialize HGNC ETL class.

        :param Database database: DynamoDB database
        :param str host: FTP host name
        :param str data_dir: FTP data directory to use
        :param Path src_data_dir: Data directory for HGNC
        :param str fn: Data file to download
        """
        super().__init__(database, host, data_dir, src_data_dir)
        self._chromosome_location = ChromosomeLocation()
        self._data_url = f"ftp://{host}/{data_dir}{fn}"
        self._fn = fn
        self._version = None