Skip to content
Snippets Groups Projects
Commit d84a3b62 authored by Venkat Malladi's avatar Venkat Malladi
Browse files

Check differential peaks.

parent eea9ab16
No related merge requests found
...@@ -35,7 +35,7 @@ single_end_diff: ...@@ -35,7 +35,7 @@ single_end_diff:
stage: integration stage: integration
script: script:
- nextflow run workflow/main.nf --designFile "$CI_PROJECT_DIR/test_data/design_diff_SE.txt" --genome 'GRCm38' -resume - nextflow run workflow/main.nf --designFile "$CI_PROJECT_DIR/test_data/design_diff_SE.txt" --genome 'GRCm38' -resume
- pytest -m pairedend - pytest -m singlediff
- pytest --cov=./workflow/scripts - pytest --cov=./workflow/scripts
artifacts: artifacts:
expire_in: 2 days expire_in: 2 days
...@@ -44,7 +44,7 @@ paired_end_diff: ...@@ -44,7 +44,7 @@ paired_end_diff:
stage: integration stage: integration
script: script:
- nextflow run workflow/main.nf --designFile "$CI_PROJECT_DIR/test_data/design_diff_PE.txt" --genome 'GRCh38' --pairedEnd true -resume - nextflow run workflow/main.nf --designFile "$CI_PROJECT_DIR/test_data/design_diff_PE.txt" --genome 'GRCh38' --pairedEnd true -resume
- pytest -m pairedend - pytest -m paireddiff
- pytest --cov=./workflow/scripts - pytest --cov=./workflow/scripts
artifacts: artifacts:
expire_in: 2 days expire_in: 2 days
#!/usr/bin/env python3
import pytest
import pandas as pd
from io import StringIO
import os
import utils
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/diffPeaks/'
@pytest.mark.singleend
def test_diff_peaks_singleend_single_rep():
assert os.path.exists(os.path.join(test_output_path, 'no_diffbind.bed'))
assert os.path.exists(os.path.join(test_output_path, 'no_diffbind.csv'))
assert os.path.exists(os.path.join(test_output_path, 'no_heatmap.pdf'))
assert os.path.exists(os.path.join(test_output_path, 'no_pca.pdf'))
assert os.path.exists(os.path.join(test_output_path, 'normcount_peaksets.pdf'))
@pytest.mark.pairedend
def test_annotate_peaks_pairedend_single_rep():
assert os.path.exists(os.path.join(test_output_path, 'no_diffbind.bed'))
assert os.path.exists(os.path.join(test_output_path, 'no_diffbind.csv'))
assert os.path.exists(os.path.join(test_output_path, 'no_heatmap.pdf'))
assert os.path.exists(os.path.join(test_output_path, 'no_pca.pdf'))
assert os.path.exists(os.path.join(test_output_path, 'normcount_peaksets.pdf'))
@pytest.mark.singlediff
def test_diff_peaks_singleend_multiple_rep():
assert os.path.exists(os.path.join(test_output_path, 'heatmap.pdf'))
assert os.path.exists(os.path.join(test_output_path, 'pca.pdf'))
assert os.path.exists(os.path.join(test_output_path, 'normcount_peaksets.txt'))
assert os.path.exists(os.path.join(test_output_path, 'ENCSR272GNQ_vs_ENCSR238SGC_diffbind.bed'))
diffbind_file = test_output_path + 'ENCSR272GNQ_vs_ENCSR238SGC_diffbind.csv'
assert os.path.exists(diffbind_file)
assert utils.count_lines(diffbind_file) == 201039
@pytest.mark.paireddiff
def test_annotate_peaks_pairedend_single_rep():
assert os.path.exists(os.path.join(test_output_path, 'heatmap.pdf'))
assert os.path.exists(os.path.join(test_output_path, 'pca.pdf'))
assert os.path.exists(os.path.join(test_output_path, 'normcount_peaksets.txt'))
assert os.path.exists(os.path.join(test_output_path, 'ENCSR729LGA_vs_ENCSR757EMK_diffbind.bed'))
diffbind_file = test_output_path + 'ENCSR729LGA_vs_ENCSR757EMK_diffbind.csv'
assert os.path.exists(diffbind_file)
assert utils.count_lines(diffbind_file) == 112652
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment