diff --git a/workflow/tests/test_convert_reads.py b/workflow/tests/test_convert_reads.py index 6264e3fbf9439669fdd0973228ee4d699077e7ce..bf4528234807779c38123bf02f66af57ce44bc21 100644 --- a/workflow/tests/test_convert_reads.py +++ b/workflow/tests/test_convert_reads.py @@ -9,19 +9,19 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \ @pytest.mark.singleend def test_tag_reads_singleend(): - assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC/ENCLB831RUI.tagAlign.gz')) + assert os.path.exists(os.path.join(test_output_path, 'ENCLB831RUI/ENCLB831RUI.tagAlign.gz')) @pytest.mark.singleend def test_bed_reads_singleend(): - assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC/ENCLB831RUI.bedse.gz')) + assert os.path.exists(os.path.join(test_output_path, 'ENCLB831RUI/ENCLB831RUI.bedse.gz')) @pytest.mark.pairedend def test_tag_reads_pairedend(): - assert os.path.exists(os.path.join(test_output_path, 'ENCSR729LGA/ENCLB568IYX.tagAlign.gz')) + assert os.path.exists(os.path.join(test_output_path, 'ENCLB568IYX/ENCLB568IYX.tagAlign.gz')) @pytest.mark.pairedend def test_bed_reads_pairedend(): - assert os.path.exists(os.path.join(test_output_path, 'ENCSR729LGA/ENCLB568IYX.bedpe.gz')) + assert os.path.exists(os.path.join(test_output_path, 'ENCLB568IYX/ENCLB568IYX.bedpe.gz')) diff --git a/workflow/tests/test_map_qc.py b/workflow/tests/test_map_qc.py index f91d72b5dc4ef6bc1c4ab0ef620ec3b1a9df37d7..ab94969b9699c204b30df31680fae088cf021c52 100644 --- a/workflow/tests/test_map_qc.py +++ b/workflow/tests/test_map_qc.py @@ -10,14 +10,14 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \ @pytest.mark.singleend def test_dedup_files_singleend(): - assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC/ENCLB831RUI.dedup.bam')) - assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC/ENCLB831RUI.dedup.bam.bai')) - assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC/ENCLB831RUI.dedup.qc')) + assert os.path.exists(os.path.join(test_output_path, 'ENCLB831RUI/ENCLB831RUI.dedup.bam')) + assert os.path.exists(os.path.join(test_output_path, 'ENCLB831RUI/ENCLB831RUI.dedup.bam.bai')) + assert os.path.exists(os.path.join(test_output_path, 'ENCLB831RUI/ENCLB831RUI.dedup.qc')) @pytest.mark.singleend def test_map_qc_singleend(): - filtered_reads_report = test_output_path + 'ENCSR238SGC/ENCLB831RUI.dedup.flagstat.qc' + filtered_reads_report = test_output_path + 'ENCLB831RUI/ENCLB831RUI.dedup.flagstat.qc' samtools_report = open(filtered_reads_report).readlines() assert '64962570 + 0 in total' in samtools_report[0] assert '64962570 + 0 mapped (100.00%:N/A)' in samtools_report[4] @@ -25,7 +25,7 @@ def test_map_qc_singleend(): @pytest.mark.singleend def test_library_complexity_singleend(): - library_complexity = test_output_path + 'ENCSR238SGC/ENCLB831RUI.pbc.qc' + library_complexity = test_output_path + 'ENCLB831RUI/ENCLB831RUI.pbc.qc' df_library_complexity = pd.read_csv(library_complexity, sep='\t') assert df_library_complexity["NRF"].iloc[0] == 0.926192 assert df_library_complexity["PBC1"].iloc[0] == 0.926775 @@ -34,14 +34,14 @@ def test_library_complexity_singleend(): @pytest.mark.pairedend def test_dedup_files_pairedend(): - assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC/ENCLB568IYX.dedup.bam')) - assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC/ENCLB568IYX.dedup.bam.bai')) - assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC/ENCLB568IYX.dedup.qc')) + assert os.path.exists(os.path.join(test_output_path, 'ENCLB568IYX/ENCLB568IYX.dedup.bam')) + assert os.path.exists(os.path.join(test_output_path, 'ENCLB568IYX/ENCLB568IYX.dedup.bam.bai')) + assert os.path.exists(os.path.join(test_output_path, 'ENCLB568IYX/ENCLB568IYX.dedup.qc')) @pytest.mark.pairedend def test_map_qc_pairedend(): - filtered_reads_report = test_output_path + 'ENCSR729LGA/ENCLB568IYX.dedup.flagstat.qc' + filtered_reads_report = test_output_path + 'ENCLB568IYX/ENCLB568IYX.dedup.flagstat.qc' samtools_report = open(filtered_reads_report).readlines() assert '47388510 + 0 in total' in samtools_report[0] assert '47388510 + 0 mapped (100.00%:N/A)' in samtools_report[4] @@ -49,7 +49,7 @@ def test_map_qc_pairedend(): @pytest.mark.pairedend def test_library_complexity_pairedend(): - library_complexity = test_output_path + 'ENCSR729LGA/ENCLB568IYX.pbc.qc' + library_complexity = test_output_path + 'ENCLB568IYX/ENCLB568IYX.pbc.qc' df_library_complexity = pd.read_csv(library_complexity, sep='\t') assert df_library_complexity["NRF"].iloc[0] == 0.947064 assert round(df_library_complexity["PBC1"].iloc[0],6) == 0.946723 diff --git a/workflow/tests/test_map_reads.py b/workflow/tests/test_map_reads.py index 9b86193f9d8a98ca05d386c8c81dc291c56b2990..1d64436a1273f82c75929b7ffb468d93c4ae9ec4 100644 --- a/workflow/tests/test_map_reads.py +++ b/workflow/tests/test_map_reads.py @@ -9,8 +9,8 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \ @pytest.mark.singleend def test_map_reads_singleend(): - assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC/ENCLB831RUI.bam')) - aligned_reads_report = test_output_path + 'ENCSR238SGC/ENCLB831RUI.flagstat.qc' + assert os.path.exists(os.path.join(test_output_path, 'ENCLB831RUI/ENCLB831RUI.bam')) + aligned_reads_report = test_output_path + 'ENCLB831RUIENCLB831RUI/ENCLB831RUI.flagstat.qc' samtools_report = open(aligned_reads_report).readlines() assert '80795025 + 0 in total' in samtools_report[0] assert '80050072 + 0 mapped (99.08% : N/A)' in samtools_report[4] @@ -18,8 +18,8 @@ def test_map_reads_singleend(): @pytest.mark.pairedend def test_map_reads_pairedend(): - assert os.path.exists(os.path.join(test_output_path, 'ENCSR729LGA/ENCLB678IDC.bam')) - aligned_reads_report = test_output_path + 'ENCSR729LGA/ENCLB678IDC.flagstat.qc' + assert os.path.exists(os.path.join(test_output_path, 'ENCLB678IDC/ENCLB678IDC.bam')) + aligned_reads_report = test_output_path + 'ENCLB678IDC/ENCLB678IDC.flagstat.qc' samtools_report = open(aligned_reads_report).readlines() assert '72660890 + 0 in total' in samtools_report[0] assert '72053925 + 0 mapped (99.16% : N/A)' in samtools_report[4] diff --git a/workflow/tests/test_trim_reads.py b/workflow/tests/test_trim_reads.py index b8fdcf4f5f7a7db4cefd33daece9cf25b1ad876c..953f15a3ea65719cdf73a76587cc35459de7397f 100644 --- a/workflow/tests/test_trim_reads.py +++ b/workflow/tests/test_trim_reads.py @@ -12,8 +12,8 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \ @pytest.mark.singleend def test_trim_reads_singleend(): - raw_fastq = test_data_path + 'ENCSR238SGC/ENCFF833BLU.fastq.gz' - trimmed_fastq = test_output_path + 'ENCSR238SGC/ENCLB144FDT_R1_trimmed.fq.gz' + raw_fastq = test_data_path + 'ENCLB144FDT/ENCFF833BLU.fastq.gz' + trimmed_fastq = test_output_path + 'ENCLB144FDT/ENCLB144FDT_R1_trimmed.fq.gz' assert os.path.getsize(raw_fastq) != os.path.getsize(trimmed_fastq) assert os.path.getsize(trimmed_fastq) == 2512853101 @@ -21,14 +21,14 @@ def test_trim_reads_singleend(): @pytest.mark.singleend def test_trim_report_singleend(): trimmed_fastq_report = test_output_path + \ - 'ENCSR238SGC/ENCLB144FDT_R1.fastq.gz_trimming_report.txt' + 'ENCLB144FDT/ENCLB144FDT_R1.fastq.gz_trimming_report.txt' assert 'Trimming mode: single-end' in open(trimmed_fastq_report).readlines()[4] @pytest.mark.pairedend def test_trim_reads_pairedend(): - raw_fastq = test_data_path + 'ENCSR729LGA/ENCFF582IOZ.fastq.gz' - trimmed_fastq = test_output_path + 'ENCSR729LGA/ENCLB637LZP_R2_val_2.fq.gz' + raw_fastq = test_data_path + 'ENCLB637LZP/ENCFF582IOZ.fastq.gz' + trimmed_fastq = test_output_path + 'ENCLB637LZP/ENCLB637LZP_R2_val_2.fq.gz' assert os.path.getsize(raw_fastq) != os.path.getsize(trimmed_fastq) assert os.path.getsize(trimmed_fastq) == 2229312710 @@ -36,5 +36,5 @@ def test_trim_reads_pairedend(): @pytest.mark.pairedend def test_trim_report_pairedend(): trimmed_fastq_report = test_output_path + \ - 'ENCSR729LGA/ENCLB637LZP_R2.fastq.gz_trimming_report.txt' + 'ENCLB637LZP/ENCLB637LZP_R2.fastq.gz_trimming_report.txt' assert 'Trimming mode: paired-end' in open(trimmed_fastq_report).readlines()[4] diff --git a/workflow/tests/test_xcor.py b/workflow/tests/test_xcor.py index 0a79a2c8af77b4cf93b74f6b6ba63265a79c6bbc..fd475943f3f60317c4e0d5dd1ef067cc23fd842d 100644 --- a/workflow/tests/test_xcor.py +++ b/workflow/tests/test_xcor.py @@ -10,12 +10,12 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \ @pytest.mark.singleend def test_cross_plot_singleend(): - assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC/ENCLB144FDT.cc.plot.pdf')) + assert os.path.exists(os.path.join(test_output_path, 'ENCLB144FDT/ENCLB144FDT.cc.plot.pdf')) @pytest.mark.singleend def test_cross_qc_singleend(): - qc_file = os.path.join(test_output_path,"ENCSR238SGC/ENCLB144FDT.cc.qc") + qc_file = os.path.join(test_output_path,"ENCLB144FDT/ENCLB144FDT.cc.qc") df_xcor = pd.read_csv(qc_file, sep="\t", header=None) assert df_xcor[2].iloc[0] == '190,200,210' assert df_xcor[8].iloc[0] == 1.025906 @@ -24,12 +24,12 @@ def test_cross_qc_singleend(): @pytest.mark.pairedend def test_cross_qc_pairedend(): - assert os.path.exists(os.path.join(test_output_path, 'ENCSR729LGA/ENCLB568IYX.cc.plot.pdf')) + assert os.path.exists(os.path.join(test_output_path, 'ENCLB568IYX/ENCLB568IYX.cc.plot.pdf')) @pytest.mark.pairedend def test_cross_plot_pairedend(): - qc_file = os.path.join(test_output_path,"ENCSR729LGA/ENCLB568IYX.cc.qc") + qc_file = os.path.join(test_output_path,"ENCLB568IYX/ENCLB568IYX.cc.qc") df_xcor = pd.read_csv(qc_file, sep="\t", header=None) assert df_xcor[2].iloc[0] == '220,430,475' assert round(df_xcor[8].iloc[0],6) == 1.060018