diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 69c2ece0cc65fb40e720e768b16df6b31e5a2b4d..6d2c02bafa267b607097ebe73283d3b4e6a24c89 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,6 +17,10 @@ user_configuration: single_end_mouse: stage: single + only: + - master + except: + - branches script: - nextflow run workflow/main.nf -resume - pytest -m singleend @@ -25,6 +29,10 @@ single_end_mouse: paired_end_human: stage: single + only: + - branches + except: + - master script: - nextflow run workflow/main.nf --designFile "$CI_PROJECT_DIR/test_data/design_ENCSR729LGA_PE.txt" --genome 'GRCh38' --pairedEnd true -resume - pytest -m pairedend @@ -33,6 +41,10 @@ paired_end_human: single_end_diff: stage: multiple + only: + - branches + except: + - master script: - nextflow run workflow/main.nf --designFile "$CI_PROJECT_DIR/test_data/design_diff_SE.txt" --genome 'GRCm38' -resume - pytest -m singlediff @@ -40,6 +52,10 @@ single_end_diff: expire_in: 2 days paired_end_diff: + only: + - master + except: + - branches stage: multiple script: - nextflow run workflow/main.nf --designFile "$CI_PROJECT_DIR/test_data/design_diff_PE.txt" --genome 'GRCh38' --pairedEnd true -resume diff --git a/workflow/tests/test_annotate_peaks.py b/workflow/tests/test_annotate_peaks.py index ef42a9adc332c505715ad70be3b343de901898a8..ee3ebe12983b82607d7f3fe5559869633a7a8a72 100644 --- a/workflow/tests/test_annotate_peaks.py +++ b/workflow/tests/test_annotate_peaks.py @@ -23,7 +23,7 @@ def test_upsetplot_singleend(): def test_annotation_singleend(): annotation_file = test_output_path + 'ENCSR238SGC.chipseeker_annotation.tsv' assert os.path.exists(annotation_file) - assert utils.count_lines(annotation_file) == 152840 + assert utils.count_lines(annotation_file) == 152255 @pytest.mark.pairedend @@ -40,4 +40,4 @@ def test_upsetplot_pairedend(): def test_annotation_pairedend(): annotation_file = test_output_path + 'ENCSR729LGA.chipseeker_annotation.tsv' assert os.path.exists(annotation_file) - assert utils.count_lines(annotation_file) == 25391 + assert utils.count_lines(annotation_file) == 25494 diff --git a/workflow/tests/test_call_peaks_macs.py b/workflow/tests/test_call_peaks_macs.py index 91c1d0e43460ed663d1c59bf6caa8ad800e8fd61..9f3f6c0778a888ff30c795fba2f2126a4a3bb672 100644 --- a/workflow/tests/test_call_peaks_macs.py +++ b/workflow/tests/test_call_peaks_macs.py @@ -41,7 +41,7 @@ def test_pvalue_signal_pairedend(): @pytest.mark.pairedend def test_peaks_xls_pairedend(): - assert os.path.exists(os.path.join(test_output_path, 'ENCLB568IYX_peak.xls')) + assert os.path.exists(os.path.join(test_output_path, 'ENCLB568IYX_peaks.xls')) @pytest.mark.pairedend diff --git a/workflow/tests/test_diff_peaks.py b/workflow/tests/test_diff_peaks.py index 84c5179f021abd676a818ac24e698b54bd7b648d..b0a76aaece94d6b795efee271ffd64404da8ad92 100644 --- a/workflow/tests/test_diff_peaks.py +++ b/workflow/tests/test_diff_peaks.py @@ -42,7 +42,7 @@ def test_diffbind_singleend_multiple_rep(): assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC_vs_ENCSR272GNQ_diffbind.bed')) diffbind_file = test_output_path + 'ENCSR238SGC_vs_ENCSR272GNQ_diffbind.csv' assert os.path.exists(diffbind_file) - assert utils.count_lines(diffbind_file) == 201039 + assert utils.count_lines(diffbind_file) == 197471 @pytest.mark.paireddiff diff --git a/workflow/tests/test_experiment_qc.py b/workflow/tests/test_experiment_qc.py index 17f8eaa42e19fcadd144fd8802ec441f22929f78..c0cd5d7d340b27b3217620ef4b12a1391841820b 100644 --- a/workflow/tests/test_experiment_qc.py +++ b/workflow/tests/test_experiment_qc.py @@ -33,42 +33,42 @@ def test_check_update_controls(design_bam): @pytest.mark.singleend def test_coverage_singleend(): assert os.path.exists(os.path.join(test_output_path, 'sample_mbs.npz')) - assert os.path.exists(os.path.join(test_output_path, 'coverage.png')) + assert os.path.exists(os.path.join(test_output_path, 'coverage.pdf')) @pytest.mark.singleend def test_spearman_singleend(): - assert os.path.exists(os.path.join(test_output_path, 'heatmap_SpearmanCorr.png')) + assert os.path.exists(os.path.join(test_output_path, 'heatmap_SpearmanCorr.pdf')) @pytest.mark.singleend def test_pearson_singleend(): - assert os.path.exists(os.path.join(test_output_path, 'heatmap_PearsonCorr.png')) + assert os.path.exists(os.path.join(test_output_path, 'heatmap_PearsonCorr.pdf')) @pytest.mark.singleend def test_fingerprint_singleend(): - assert os.path.exists(os.path.join(test_output_path, 'ENCLB144FDT_fingerprint.png')) - assert os.path.exists(os.path.join(test_output_path, 'ENCLB831RUI_fingerprint.png')) + assert os.path.exists(os.path.join(test_output_path, 'ENCLB144FDT_fingerprint.pdf')) + assert os.path.exists(os.path.join(test_output_path, 'ENCLB831RUI_fingerprint.pdf')) @pytest.mark.pairdend def test_coverage_pairedend(): assert os.path.exists(os.path.join(test_output_path, 'sample_mbs.npz')) - assert os.path.exists(os.path.join(test_output_path, 'coverage.png')) + assert os.path.exists(os.path.join(test_output_path, 'coverage.pdf')) @pytest.mark.pairdend def test_spearman_pairedend(): - assert os.path.exists(os.path.join(test_output_path, 'heatmap_SpearmanCorr.png')) + assert os.path.exists(os.path.join(test_output_path, 'heatmap_SpearmanCorr.pdf')) @pytest.mark.pairdend def test_pearson_pairedend(): - assert os.path.exists(os.path.join(test_output_path, 'heatmap_PearsonCorr.png')) + assert os.path.exists(os.path.join(test_output_path, 'heatmap_PearsonCorr.pdf')) @pytest.mark.pairdend def test_fingerprint_pairedend(): - assert os.path.exists(os.path.join(test_output_path, 'ENCLB568IYX_fingerprint.png')) - assert os.path.exists(os.path.join(test_output_path, 'ENCLB637LZP_fingerprint.png')) + assert os.path.exists(os.path.join(test_output_path, 'ENCLB568IYX_fingerprint.pdf')) + assert os.path.exists(os.path.join(test_output_path, 'ENCLB637LZP_fingerprint.pdf')) diff --git a/workflow/tests/test_map_qc.py b/workflow/tests/test_map_qc.py index 7bff0601d679dd5426e03c08c1670acbecf0ad22..5a94421557fef672044a12ad083278ba9ead6d8a 100644 --- a/workflow/tests/test_map_qc.py +++ b/workflow/tests/test_map_qc.py @@ -53,4 +53,4 @@ def test_library_complexity_pairedend(): 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 - assert df_library_complexity["PBC2"].iloc[0] == 18.643039 + assert round(df_library_complexity["PBC2"].iloc[0],6) == 18.642645 diff --git a/workflow/tests/test_overlap_peaks.py b/workflow/tests/test_overlap_peaks.py index 9289d165ee8a7cf3bb613616a165e852ad80d462..ff61c937f42af911bba8e8e21acde80bd41a592e 100644 --- a/workflow/tests/test_overlap_peaks.py +++ b/workflow/tests/test_overlap_peaks.py @@ -37,11 +37,11 @@ def test_check_update_design(design_diff): def test_overlap_peaks_singleend(): assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC.rejected.narrowPeak')) peak_file = test_output_path + 'ENCSR238SGC.replicated.narrowPeak' - assert utils.count_lines(peak_file) == 152848 + assert utils.count_lines(peak_file) == 152262 @pytest.mark.pairedend def test_overlap_peaks_pairedend(): assert os.path.exists(os.path.join(test_output_path, 'ENCSR729LGA.rejected.narrowPeak')) peak_file = test_output_path + 'ENCSR729LGA.replicated.narrowPeak' - assert utils.count_lines(peak_file) == 26281 + assert utils.count_lines(peak_file) == 25758 diff --git a/workflow/tests/test_trim_reads.py b/workflow/tests/test_trim_reads.py index f929d9c20cb95c3c89fdda22096870120195972d..ca25db6a9131abe26ded6b8746c11cecda502a49 100644 --- a/workflow/tests/test_trim_reads.py +++ b/workflow/tests/test_trim_reads.py @@ -21,7 +21,7 @@ def test_trim_reads_singleend(): @pytest.mark.singleend def test_trim_report_singleend(): trimmed_fastq_report = test_output_path + \ - 'ENCLB144FDT_R1_trimmed.fq.gz_trimming_report.txt' + 'ENCLB144FDT_R1.fastq.gz_trimming_report.txt' assert 'Trimming mode: single-end' in open(trimmed_fastq_report).readlines()[4]