From 58b92f5deecea0ca512d04e129e07ba5daa15697 Mon Sep 17 00:00:00 2001
From: Venkat Malladi <venkat.malladi@utsouthwestern.edu>
Date: Sat, 11 Aug 2018 20:09:45 -0500
Subject: [PATCH] Add in paired-end filter test.

---
 workflow/tests/test_map_qc.py | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/workflow/tests/test_map_qc.py b/workflow/tests/test_map_qc.py
index a882e53..f2c4e74 100644
--- a/workflow/tests/test_map_qc.py
+++ b/workflow/tests/test_map_qc.py
@@ -25,5 +25,14 @@ def test_map_qc_singleend():
 
 @pytest.mark.integration
 def test_map_qc_pairedend():
-    # Do the same thing for paired end data
-    pass
+    assert os.path.exists(os.path.join(test_output_path, 'ENCFF293YFE_val_2ENCFF330MCZ_val_1.filt.nodup.bam'))
+    assert os.path.exists(os.path.join(test_output_path, 'ENCFF293YFE_val_2ENCFF330MCZ_val_1.filt.nodup.bambai'))
+    filtered_reads_report = test_output_path + 'ENCFF293YFE_val_2ENCFF330MCZ_val_1.filt.nodup.flagstat.qc'
+    samtools_report = open(filtered_reads_report).readlines()
+    assert '47389080 + 0 in total' in samtools_report[0]
+    assert '47389080 + 0 mapped (100.00%:N/A)' in samtools_report[4]
+    library_complexity = test_output_path + 'ENCFF293YFE_val_2ENCFF330MCZ_val_1.filt.nodup.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  df_library_complexity["PBC2"].iloc[0] == 18.643039
-- 
GitLab