diff --git a/tests/analysis/test_analysis.py b/tests/analysis/test_analysis.py index 3c5ed0e8..1d36c8f2 100644 --- a/tests/analysis/test_analysis.py +++ b/tests/analysis/test_analysis.py @@ -376,21 +376,22 @@ def create_illumina_run_dir( e.g. tmp - └── sequencing - └── NovaSeqXPlus - └── 20240202_LH00217_0044_A2255J2LT3 - ├── CopyComplete.txt - ├── Demultiplexing - ├── RTAComplete.txt - ├── RunInfo.xml - ├── RunParameters.xml - └── SampleSheet.csv + └── ngi_data + └── sequencing + └── NovaSeqXPlus + └── 20240202_LH00217_0044_A2255J2LT3 + ├── CopyComplete.txt + ├── Demultiplexing + ├── RTAComplete.txt + ├── RunInfo.xml + ├── RunParameters.xml + └── SampleSheet.csv Return it's path. """ # Get run path - run_path = f"{tmp.name}/sequencing/{instrument}/{run_name}" + run_path = f"{tmp.name}/ngi_data/sequencing/{instrument}/{run_name}" # Create runs directory structure if os.path.exists(run_path): @@ -549,7 +550,7 @@ def create_illumina_run_dir( return run_path -def test_get_runObj(create_dirs): +def test_run_preprocessing(create_dirs): tmp = create_dirs # Mock CONFIG @@ -577,7 +578,7 @@ def test_get_runObj(create_dirs): level = test_config_yaml.get("log").get("log_level", "INFO") init_logger_file(log_file, level) - # Start demux - analysis.run_preprocessing(run_path, software) - # Demux in progress + # Start demux, all runs + analysis.run_preprocessing(None, software) + # Demux in progress, specified run analysis.run_preprocessing(run_path, software) diff --git a/tests/conftest.py b/tests/conftest.py index 62829ab6..171a5667 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -34,46 +34,45 @@ def create_dirs(): │ └── samplesheets │ ├── NovaSeqXPlus │ └── anglerfish - └── sequencing - ├── MiSeq - │ └── nosync - ├── NextSeq - │ └── nosync - ├── NovaSeq - │ └── nosync - ├── NovaSeqXPlus - │ └── nosync - ├── minion - │ ├── nosync - │ └── qc - │ └── nosync - └── promethion - └── nosync + └── ngi_data + └── sequencing + ├── MiSeq + │ └── nosync + ├── NextSeq + │ └── nosync + ├── NovaSeq + │ └── nosync + ├── NovaSeqXPlus + │ └── nosync + ├── minion + │ ├── nosync + │ └── qc + │ └── nosync + └── promethion + └── nosync --> Return the the temporary directory object """ tmp = tempfile.TemporaryDirectory() - # CREATE DIR STRUCTURE - # Sequencing data - # Illumina - os.makedirs(f"{tmp.name}/sequencing/MiSeq/nosync") - os.makedirs(f"{tmp.name}/sequencing/NextSeq/nosync") - os.makedirs(f"{tmp.name}/sequencing/NovaSeq/nosync") - os.makedirs(f"{tmp.name}/sequencing/NovaSeqXPlus/nosync") - # ONT - os.makedirs(f"{tmp.name}/sequencing/promethion/nosync") - os.makedirs(f"{tmp.name}/sequencing/minion/nosync") - os.makedirs(f"{tmp.name}/sequencing/minion/qc/nosync") + ## Illumina + os.makedirs(f"{tmp.name}/ngi_data/sequencing/MiSeq/nosync") + os.makedirs(f"{tmp.name}/ngi_data/sequencing/NextSeq/nosync") + os.makedirs(f"{tmp.name}/ngi_data/sequencing/NovaSeq/nosync") + os.makedirs(f"{tmp.name}/ngi_data/sequencing/NovaSeqXPlus/nosync") + ## ONT + os.makedirs(f"{tmp.name}/ngi_data/sequencing/promethion/nosync") + os.makedirs(f"{tmp.name}/ngi_data/sequencing/minion/nosync") + os.makedirs(f"{tmp.name}/ngi_data/sequencing/minion/qc/nosync") # Sequencing metadata - # Illumina + ## Illumina os.makedirs(f"{tmp.name}/ngi-nas-ns/miseq_data") os.makedirs(f"{tmp.name}/ngi-nas-ns/NextSeq_data") os.makedirs(f"{tmp.name}/ngi-nas-ns/NovaSeq_data") os.makedirs(f"{tmp.name}/ngi-nas-ns/NovaSeqXPlus_data") - # ONT + ## ONT os.makedirs(f"{tmp.name}/ngi-nas-ns/promethion_data") os.makedirs(f"{tmp.name}/ngi-nas-ns/minion_data") diff --git a/tests/nanopore/test_ONT_run_classes.py b/tests/nanopore/test_ONT_run_classes.py index fe4ad19b..a91a2f97 100644 --- a/tests/nanopore/test_ONT_run_classes.py +++ b/tests/nanopore/test_ONT_run_classes.py @@ -19,31 +19,31 @@ def make_ONT_test_config(tmp: tempfile.TemporaryDirectory) -> dict: run_types: user_run: data_dirs: - - {tmp.name}/sequencing/promethion - - {tmp.name}/sequencing/minion + - {tmp.name}/ngi_data/sequencing/promethion + - {tmp.name}/ngi_data/sequencing/minion ignore_dirs: - 'nosync' - 'qc' instruments: promethion: transfer_log: {tmp.name}/log/transfer_promethion.tsv - archive_dir: {tmp.name}/sequencing/promethion/nosync + archive_dir: {tmp.name}/ngi_data/sequencing/promethion/nosync metadata_dir: {tmp.name}/ngi-nas-ns/promethion_data destination: {tmp.name}/miarka/promethion/ minion: transfer_log: {tmp.name}/log/transfer_minion.tsv - archive_dir: {tmp.name}/sequencing/minion/nosync + archive_dir: {tmp.name}/ngi_data/sequencing/minion/nosync metadata_dir: {tmp.name}/ngi-nas-ns/minion_data destination: {tmp.name}/miarka/minion/ qc_run: data_dirs: - - {tmp.name}/sequencing/minion/qc + - {tmp.name}/ngi_data/sequencing/minion/qc ignore_dirs: - 'nosync' instruments: minion: transfer_log: {tmp.name}/log/transfer_minion_qc.tsv - archive_dir: {tmp.name}/sequencing/minion/qc/nosync + archive_dir: {tmp.name}/ngi_data/sequencing/minion/qc/nosync metadata_dir: {tmp.name}/ngi-nas-ns/minion_data/qc destination: {tmp.name}/miarka/minion/qc anglerfish: @@ -118,7 +118,7 @@ def create_ONT_run_dir( instrument = "minion" instrument_position = "MN19414" if not data_dir: - data_dir = f"{tmp.name}/sequencing/{instrument}" + data_dir = f"{tmp.name}/ngi_data/sequencing/{instrument}" run_name = f"{run_start_time}_{instrument_position}_{flowcell_id}_{run_id}" if qc: