diff --git a/workflow_flu_genbank_ingest/Snakefile b/workflow_flu_genbank_ingest/Snakefile index 61875736..744fb5cf 100644 --- a/workflow_flu_genbank_ingest/Snakefile +++ b/workflow_flu_genbank_ingest/Snakefile @@ -17,7 +17,11 @@ data_folder = os.path.join("..", config["data_folder"]) static_data_folder = os.path.join("..", config["static_data_folder"]) min_date = pd.to_datetime(config.get('min_date', '2019-12-01')) +if min_date is None: + min_date = '2019-12-01' max_date = pd.to_datetime(datetime.date.today().isoformat()) +if max_date is None: + max_date = datetime.date.today().isoformat() chunks = [d for d in pd.period_range(start=min_date, end=max_date, freq=config.get('dl_chunk_period', 'W'))] DL_CHUNKS = [i for i in range(len(chunks))] diff --git a/workflow_rsv_genbank_ingest/Snakefile b/workflow_rsv_genbank_ingest/Snakefile index 495094f7..a6adc5e2 100644 --- a/workflow_rsv_genbank_ingest/Snakefile +++ b/workflow_rsv_genbank_ingest/Snakefile @@ -17,7 +17,11 @@ data_folder = os.path.join("..", config["data_folder"]) static_data_folder = os.path.join("..", config["static_data_folder"]) min_date = pd.to_datetime(config.get('min_date', '2019-12-01')) +if min_date is None: + min_date = '2019-12-01' max_date = pd.to_datetime(datetime.date.today().isoformat()) +if max_date is None: + max_date = datetime.date.today().isoformat() chunks = [d for d in pd.period_range(start=min_date, end=max_date, freq=config.get('dl_chunk_period', 'W'))] DL_CHUNKS = [i for i in range(len(chunks))] diff --git a/workflow_sars2_genbank_ingest/Snakefile b/workflow_sars2_genbank_ingest/Snakefile index c7412d8d..d0cee6cc 100644 --- a/workflow_sars2_genbank_ingest/Snakefile +++ b/workflow_sars2_genbank_ingest/Snakefile @@ -32,7 +32,11 @@ rule all: metadata = os.path.join(data_folder, "metadata.csv") min_date = pd.to_datetime(config.get('min_date', '2019-12-01')) +if min_date is None: + min_date = '2019-12-01' max_date = pd.to_datetime(config.get('end_date_cutoff', datetime.date.today().isoformat())) +if max_date is None: + max_date = datetime.date.today().isoformat() chunks = [d for d in pd.period_range(start=min_date, end=max_date, freq=config.get('dl_chunk_period', 'W'))] DL_CHUNKS = [i for i in range(len(chunks))]