Commit 408bf203 authored by Chris Cheshire's avatar Chris Cheshire
Browse files

Added tests for conensus peaks and a parameter check

parent 6b7e1c7b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -164,6 +164,9 @@ jobs:
          - verify_output_align_duplicates_remove_target
          - verify_output_peak_calling_only_peak_calling
          - test_peak_callers
          - test_conseneus_peaks_group
          - test_conseneus_peaks_all
          - test_conseneus_peaks_invalid
          - verify_output_reporting
    steps:
      - uses: actions/checkout@v2
+25 −0
Original line number Diff line number Diff line
- name: test_conseneus_peaks_group
  command: nextflow run main.nf -profile docker,test_full_small --only_peak_calling true --skip_fastqc true --consensus_peak_mode group -c tests/config/nextflow.config
  tags:
    - test_conseneus_peaks
    - test_conseneus_peaks_group
  files:
    - path: results/03_peak_calling/05_consensus_peaks/h3k4me3.consensus.peaks.bed
    - path: results/03_peak_calling/05_consensus_peaks/h3k4me3.consensus.peaks.filtered.awk.bed
    - path: results/03_peak_calling/05_consensus_peaks/h3k27me3.consensus.peaks.bed
    - path: results/03_peak_calling/05_consensus_peaks/h3k27me3.consensus.peaks.filtered.awk.bed

- name: test_conseneus_peaks_all
  command: nextflow run main.nf -profile docker,test_full_small --only_peak_calling true --skip_fastqc true --consensus_peak_mode all -c tests/config/nextflow.config
  tags:
    - test_conseneus_peaks
    - test_conseneus_peaks_all
  files:
    - path: results/03_peak_calling/05_consensus_peaks/all_samples.awk.bed
    - path: results/03_peak_calling/05_consensus_peaks/all_samples.consensus.peaks.bed

- name: test_conseneus_peaks_invalid
  command: nextflow run main.nf -profile docker,test_full_small --only_peak_calling true --skip_fastqc true --consensus_peak_mode test -c tests/config/nextflow.config
    - test_conseneus_peaks
    - test_conseneus_peaks_invalid
  exit_code: 1
 No newline at end of file
+5 −0
Original line number Diff line number Diff line
@@ -76,6 +76,11 @@ if ((caller_list + callers).unique().size() != caller_list.size()) {
    exit 1, "Invalid variant calller option: ${params.peakcaller}. Valid options: ${caller_list.join(', ')}"
}

conseneus_mode_list = ['group', 'all']
if (!(params.consensus_peak_mode in conseneus_mode_list)) {
    exit 1, "Invalid conseneus mode option: ${params.consensus_peak_mode}. Valid options: ${conseneus_mode_list.join(', ')}"
}

/*
========================================================================================
    IMPORT LOCAL MODULES/SUBWORKFLOWS