From 511f55b0a43c1626429937039ea8b88dbecf2d93 Mon Sep 17 00:00:00 2001
From: Venkat Malladi <venkat.malladi@utsouthwestern.edu>
Date: Sat, 19 Jan 2019 00:07:02 -0600
Subject: [PATCH] Fix test output.

---
 workflow/tests/test_annotate_peaks.py | 4 ++--
 workflow/tests/test_map_qc.py         | 2 +-
 workflow/tests/test_overlap_peaks.py  | 4 ++--
 workflow/tests/test_trim_reads.py     | 8 ++++----
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/workflow/tests/test_annotate_peaks.py b/workflow/tests/test_annotate_peaks.py
index 5c67640..ef42a9a 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) == 149820
+    assert utils.count_lines(annotation_file) == 152840
 
 
 @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) == 25579
+    assert utils.count_lines(annotation_file) == 25391
diff --git a/workflow/tests/test_map_qc.py b/workflow/tests/test_map_qc.py
index f292559..cd734f8 100644
--- a/workflow/tests/test_map_qc.py
+++ b/workflow/tests/test_map_qc.py
@@ -52,5 +52,5 @@ def test_library_complexity_pairedend():
     library_complexity = test_output_path + 'ENCLB568IYX.pbc.qc'
     df_library_complexity = pd.read_csv(library_complexity, sep='\t')
     assert  df_library_complexity["NRF"].iloc[0] == 0.947064
-    assert  df_library_complexity["PBC1"].iloc[0] == 0.946724
+    assert  round(df_library_complexity["PBC1"].iloc[0],6 == 0.946723
     assert  df_library_complexity["PBC2"].iloc[0] == 18.643039
diff --git a/workflow/tests/test_overlap_peaks.py b/workflow/tests/test_overlap_peaks.py
index 63d4752..9289d16 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) == 149828
+    assert utils.count_lines(peak_file) == 152848
 
 
 @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) == 25847
+    assert utils.count_lines(peak_file) == 26281
diff --git a/workflow/tests/test_trim_reads.py b/workflow/tests/test_trim_reads.py
index 449b5fd..f929d9c 100644
--- a/workflow/tests/test_trim_reads.py
+++ b/workflow/tests/test_trim_reads.py
@@ -14,14 +14,14 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
 def test_trim_reads_singleend():
     raw_fastq = test_data_path + 'ENCFF833BLU.fastq.gz'
     trimmed_fastq = test_output_path + 'ENCLB144FDT_R1_trimmed.fq.gz'
+    assert os.path.getsize(raw_fastq) != os.path.getsize(trimmed_fastq)
+    assert os.path.getsize(trimmed_fastq) == 2512853101
 
 
 @pytest.mark.singleend
 def test_trim_report_singleend():
     trimmed_fastq_report = test_output_path + \
                             'ENCLB144FDT_R1_trimmed.fq.gz_trimming_report.txt'
-    assert os.path.getsize(raw_fastq) != os.path.getsize(trimmed_fastq)
-    assert os.path.getsize(trimmed_fastq) == 2512853101
     assert 'Trimming mode: single-end' in open(trimmed_fastq_report).readlines()[4]
 
 
@@ -29,12 +29,12 @@ def test_trim_report_singleend():
 def test_trim_reads_pairedend():
     raw_fastq = test_data_path + 'ENCFF582IOZ.fastq.gz'
     trimmed_fastq = test_output_path + 'ENCLB637LZP_R2_val_2.fq.gz'
+    assert os.path.getsize(raw_fastq) != os.path.getsize(trimmed_fastq)
+    assert os.path.getsize(trimmed_fastq) == 2229312710
 
 
 @pytest.mark.pairedend
 def test_trim_report_pairedend():
     trimmed_fastq_report = test_output_path + \
                             'ENCLB637LZP_R2.fastq.gz_trimming_report.txt'
-    assert os.path.getsize(raw_fastq) != os.path.getsize(trimmed_fastq)
-    assert os.path.getsize(trimmed_fastq) == 2229312710
     assert 'Trimming mode: paired-end' in open(trimmed_fastq_report).readlines()[4]
-- 
GitLab