Skip to content

Commit

Permalink
Update exportPeakCPeaks in functions.R
Browse files Browse the repository at this point in the history
  • Loading branch information
geertgeeven authored Mar 11, 2020
1 parent 21748b4 commit 6535108
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -1547,16 +1547,24 @@ exportPeakCPeaks <- function(resPeakC,bedFile,name=NULL,desc=NULL,includeVP=TRUE

if(includeVP) {

bedDF <- as.data.frame(resPeakC$exportPeakGR)[,1:3]
colnames(bedDF)[1] <- "chr"
write.table(bedDF,file=bedFile,sep="\t",row.names=FALSE,col.names=FALSE,quote=FALSE,append=TRUE)
if(!is.null(resPeakC$exportPeakGR)){

bedDF <- as.data.frame(resPeakC$exportPeakGR)[,1:3]
colnames(bedDF)[1] <- "chr"
write.table(bedDF,file=bedFile,sep="\t",row.names=FALSE,col.names=FALSE,quote=FALSE,append=TRUE)

}

} else {

bedDF <- as.data.frame(resPeakC$exportPeakGR)[,1:3]
colnames(bedDF)[1] <- "chr"
write.table(bedDF,file=bedFile,sep="\t",row.names=FALSE,col.names=FALSE,quote=FALSE,append=TRUE)
if(!is.null(resPeakC$exportPeakGR)){

bedDF <- as.data.frame(resPeakC$exportPeakGR)[,1:3]
colnames(bedDF)[1] <- "chr"
write.table(bedDF,file=bedFile,sep="\t",row.names=FALSE,col.names=FALSE,quote=FALSE,append=TRUE)

}

}


Expand Down

0 comments on commit 6535108

Please sign in to comment.