Skip to content
Snippets Groups Projects
Commit a8753bd3 authored by Venkat Malladi's avatar Venkat Malladi
Browse files

Merge branch 'master' into 23-rename_output

parents 023a7f7b 21f00e65
Branches
Tags
No related merge requests found
...@@ -51,10 +51,10 @@ column_names <- c("chr", "start", "end", "width", "strand_1", "name", "score", " ...@@ -51,10 +51,10 @@ column_names <- c("chr", "start", "end", "width", "strand_1", "name", "score", "
"ENSEMBL", "symbol", "geneName") "ENSEMBL", "symbol", "geneName")
for(index in c(1:length(peakAnnoList))) { 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]]) df <- as.data.frame(peakAnnoList[[index]])
colnames(df) <- column_names 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 # Draw individual plots
...@@ -68,7 +68,7 @@ for(index in c(1:length(peakAnnoList))) { ...@@ -68,7 +68,7 @@ for(index in c(1:length(peakAnnoList))) {
dev.off() dev.off()
# Upset Plot # Upset Plot
pdf(upsetplot_name) pdf(upsetplot_name, onefile=F)
upsetplot(peakAnnoList[[index]]) upsetplot(peakAnnoList[[index]])
dev.off() dev.off()
} }
...@@ -14,7 +14,7 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \ ...@@ -14,7 +14,7 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
def test_annotate_peaks_singleend(): 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_pie.pdf'))
assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC.chipseeker_upsetplot.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 os.path.exists(annotation_file)
assert utils.count_lines(annotation_file) == 152840 assert utils.count_lines(annotation_file) == 152840
...@@ -23,6 +23,6 @@ def test_annotate_peaks_singleend(): ...@@ -23,6 +23,6 @@ def test_annotate_peaks_singleend():
def test_annotate_peaks_pairedend(): 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_pie.pdf'))
assert os.path.exists(os.path.join(test_output_path, 'ENCSR729LGA.chipseeker_upsetplot.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 os.path.exists(annotation_file)
assert utils.count_lines(annotation_file) == 25614 assert utils.count_lines(annotation_file) == 25391
...@@ -44,4 +44,4 @@ def test_overlap_peaks_singleend(): ...@@ -44,4 +44,4 @@ def test_overlap_peaks_singleend():
def test_overlap_peaks_pairedend(): def test_overlap_peaks_pairedend():
assert os.path.exists(os.path.join(test_output_path, 'ENCSR729LGA.rejected.narrowPeak')) assert os.path.exists(os.path.join(test_output_path, 'ENCSR729LGA.rejected.narrowPeak'))
peak_file = test_output_path + 'ENCSR729LGA.replicated.narrowPeak' peak_file = test_output_path + 'ENCSR729LGA.replicated.narrowPeak'
assert utils.count_lines(peak_file) == 25878 assert utils.count_lines(peak_file) == 25655
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment