From 3a0ac094555e511463a8ddcce83252c20ddc40bf Mon Sep 17 00:00:00 2001
From: Venkat Malladi <venkat.malladi@utsouthwestern.edu>
Date: Sun, 6 Jan 2019 17:15:29 -0600
Subject: [PATCH] Fix test options and files that should be moved over.

---
 workflow/main.nf                       |  1 +
 workflow/tests/test_annotate_peaks.py  |  2 +-
 workflow/tests/test_call_peaks_macs.py |  2 +-
 workflow/tests/test_overlap_peaks.py   |  2 +-
 workflow/tests/test_trim_reads.py      |  2 +-
 workflow/tests/test_xcor.py            | 14 +++++++-------
 6 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/workflow/main.nf b/workflow/main.nf
index bdaaa92..29afb26 100644
--- a/workflow/main.nf
+++ b/workflow/main.nf
@@ -423,6 +423,7 @@ process motifSearch {
   output:
 
   file "*memechip" into motifSearch
+  file "sorted-*" into filteredPeaks
 
   script:
 
diff --git a/workflow/tests/test_annotate_peaks.py b/workflow/tests/test_annotate_peaks.py
index 1381350..e3f5746 100644
--- a/workflow/tests/test_annotate_peaks.py
+++ b/workflow/tests/test_annotate_peaks.py
@@ -16,7 +16,7 @@ def test_annotate_peaks_singleend():
     assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC.chipseeker_upsetplot.pdf'))
     annotation_file = test_output_path + 'ENCSR238SGC.chipseeker_annotation.csv'
     assert os.path.exists(annotation_file)
-    assert utils.count_lines(annotation_file) == 149820
+    assert utils.count_lines(annotation_file) == 152840
 
 
 @pytest.mark.pairedend
diff --git a/workflow/tests/test_call_peaks_macs.py b/workflow/tests/test_call_peaks_macs.py
index a0792c6..71358bc 100644
--- a/workflow/tests/test_call_peaks_macs.py
+++ b/workflow/tests/test_call_peaks_macs.py
@@ -13,7 +13,7 @@ def test_call_peaks_macs_singleend():
     assert os.path.exists(os.path.join(test_output_path, 'ENCLB144FDT.fc_signal.bw'))
     assert os.path.exists(os.path.join(test_output_path, 'ENCLB144FDT.pvalue_signal.bw'))
     peak_file = test_output_path + 'ENCLB144FDT_peaks.narrowPeak'
-    assert utils.count_lines(peak_file) == 210349
+    assert utils.count_lines(peak_file) == 227389
 
 
 @pytest.mark.pairedend
diff --git a/workflow/tests/test_overlap_peaks.py b/workflow/tests/test_overlap_peaks.py
index a239b41..ccbf186 100644
--- a/workflow/tests/test_overlap_peaks.py
+++ b/workflow/tests/test_overlap_peaks.py
@@ -37,7 +37,7 @@ 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) == 150302
+    assert utils.count_lines(peak_file) == 149828
 
 
 @pytest.mark.pairedend
diff --git a/workflow/tests/test_trim_reads.py b/workflow/tests/test_trim_reads.py
index b925627..8e2176d 100644
--- a/workflow/tests/test_trim_reads.py
+++ b/workflow/tests/test_trim_reads.py
@@ -24,7 +24,7 @@ def test_trim_reads_singleend():
 @pytest.mark.pairedend
 def test_trim_reads_pairedend():
     raw_fastq = test_data_path + 'ENCFF582IOZ.fastq.gz'
-    trimmed_fastq = test_output_path + ' ENCFF582IOZ_val_2.fq.gz'
+    trimmed_fastq = test_output_path + 'ENCFF582IOZ_val_2.fq.gz'
     trimmed_fastq_report = test_output_path + \
                             'ENCFF582IOZ.fastq.gz_trimming_report.txt'
     assert os.path.getsize(raw_fastq) != os.path.getsize(trimmed_fastq)
diff --git a/workflow/tests/test_xcor.py b/workflow/tests/test_xcor.py
index 0c27795..8492de4 100644
--- a/workflow/tests/test_xcor.py
+++ b/workflow/tests/test_xcor.py
@@ -9,13 +9,13 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
 
 
 @pytest.mark.singleend
-def test_convert_reads_singleend():
+def test_map_qc_singleend():
     assert os.path.exists(os.path.join(test_output_path, 'ENCFF833BLU.filt.nodup.tagAlign.15.tagAlign.gz.cc.plot.pdf'))
     qc_file = os.path.join(test_output_path,"ENCFF833BLU.filt.nodup.tagAlign.15.tagAlign.gz.cc.qc")
     df_xcor = pd.read_csv(qc_file, sep="\t", header=None)
-    assert df_xcor[2].iloc[0] == '195,215,230'
-    assert df_xcor[8].iloc[0] == 1.024836
-    assert df_xcor[9].iloc[0] == 1.266678
+    assert df_xcor[2].iloc[0] == '190,200,210'
+    assert df_xcor[8].iloc[0] == 1.025906
+    assert df_xcor[9].iloc[0] == 1.139671
 
 
 @pytest.mark.pairedend
@@ -23,6 +23,6 @@ def test_map_qc_pairedend():
     assert os.path.exists(os.path.join(test_output_path, 'ENCFF582IOZ_val_2ENCFF957SQS_val_1.filt.nodup.tagAlign.15.tagAlign.gz.cc.plot.pdf'))
     qc_file = os.path.join(test_output_path,"ENCFF582IOZ_val_2ENCFF957SQS_val_1.filt.nodup.tagAlign.15.tagAlign.gz.cc.qc")
     df_xcor = pd.read_csv(qc_file, sep="\t", header=None)
-    assert df_xcor[2].iloc[0] == '205,410,430'
-    assert df_xcor[8].iloc[0] == 1.060266
-    assert df_xcor[9].iloc[0] == 4.308793
+    assert df_xcor[2].iloc[0] == '210,220,475'
+    assert df_xcor[8].iloc[0] == 1.062032
+    assert df_xcor[9].iloc[0] == 3.737722
-- 
GitLab