From ad8a4c2586a3c5f7c97c426b348e779b749653ec Mon Sep 17 00:00:00 2001
From: Venkat Malladi <venkat.malladi@utsouthwestern.edu>
Date: Thu, 10 Jan 2019 10:08:17 -0600
Subject: [PATCH] Make csv to tsv.

---
 workflow/scripts/annotate_peaks.R     | 4 ++--
 workflow/tests/test_annotate_peaks.py | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/workflow/scripts/annotate_peaks.R b/workflow/scripts/annotate_peaks.R
index 135d1b6..c15ba69 100644
--- a/workflow/scripts/annotate_peaks.R
+++ b/workflow/scripts/annotate_peaks.R
@@ -51,10 +51,10 @@ column_names <- c("chr", "start", "end", "width", "strand_1", "name", "score", "
                   "ENSEMBL", "symbol", "geneName")
 
 for(index in c(1:length(peakAnnoList))) {
-  filename <- paste(names(peaks)[index], ".chipseeker_annotation.csv", sep="")
+  filename <- paste(names(peaks)[index], ".chipseeker_annotation.tsv", sep="")
   df <- as.data.frame(peakAnnoList[[index]])
   colnames(df) <- column_names
-  write.table(df[ , !(names(df) %in% c('strand_1'))], filename, sep="," ,quote=F, row.names=F)
+  write.table(df[ , !(names(df) %in% c('strand_1'))], filename, sep="\t" ,quote=F, row.names=F)
 
   # Draw individual plots
 
diff --git a/workflow/tests/test_annotate_peaks.py b/workflow/tests/test_annotate_peaks.py
index fa5c241..692ddce 100644
--- a/workflow/tests/test_annotate_peaks.py
+++ b/workflow/tests/test_annotate_peaks.py
@@ -14,7 +14,7 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
 def test_annotate_peaks_singleend():
     assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC.chipseeker_pie.pdf'))
     assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC.chipseeker_upsetplot.pdf'))
-    annotation_file = test_output_path + 'ENCSR238SGC.chipseeker_annotation.csv'
+    annotation_file = test_output_path + 'ENCSR238SGC.chipseeker_annotation.tsv'
     assert os.path.exists(annotation_file)
     assert utils.count_lines(annotation_file) == 152840
 
@@ -23,6 +23,6 @@ def test_annotate_peaks_singleend():
 def test_annotate_peaks_pairedend():
     assert os.path.exists(os.path.join(test_output_path, 'ENCSR729LGA.chipseeker_pie.pdf'))
     assert os.path.exists(os.path.join(test_output_path, 'ENCSR729LGA.chipseeker_upsetplot.pdf'))
-    annotation_file = test_output_path + 'ENCSR729LGA.chipseeker_annotation.csv'
+    annotation_file = test_output_path + 'ENCSR729LGA.chipseeker_annotation.tsv'
     assert os.path.exists(annotation_file)
     assert utils.count_lines(annotation_file) == 25391
-- 
GitLab