Learn R Programming

CoverageView (version 1.8.0)

write.profile: Write coverage values into a file

Description

Write the coverage values calculated using the cov.matrix function into a file

Usage

"write.profile"(DF,outfile=NULL)

Arguments

DF
Coverage matrix generated by the function cov.matrix
outfile
Where to write the .txt file that will contain the matrix

Details

This method is used to write the matrix containing the coverage values calculated by cov.matrix into a file.

See Also

cov.matrix

Examples

Run this code
#get a BAM test file
treatBAMfile<-system.file("extdata","treat.bam",package="CoverageView")
  
#get a BED file with the TSS (transcription start site) coordinates of some genes
bedfile<-system.file("extdata","testTSS.bed",package="CoverageView")
  
#create the CoverageBamFile object
trm<-CoverageBamFile(treatBAMfile)
  
#generate the coverage matrix extending 100 nts on each side of the TSS provided
#in the BED file
DF1=cov.matrix(trm,coordfile=bedfile,extend=100)
  
#write the coverage matrix into the provided file
write.profile(DF1,outfile="DF1.txt")

Run the code above in your browser using DataLab