diff --git a/workflow/scripts/annotate_peaks.R b/workflow/scripts/annotate_peaks.R index 135d1b69584c3228f077bb8880297bbe26b73a19..c15ba698dc3f9d120024426b4d7f57bd24a741a6 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 fa5c2411fccd7784d780c5699b2b9de541e84064..692ddced7762a9a9742c6bf51e652673b62bdd1f 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