Real‐world examples to run TSSr - Linlab-slu/TSSr GitHub Wiki
Here we will provide some real-world examples for different purposes when you run TSSr.
We will use data from this paper as an example.
The data has been submitted to the NCBI BioProject database under accession number PRJNA510689.
.bw
/ .bedGraph
format files from CAGE (CAGE-like) data
1. Generate If you want to generate both plus and minus strand TSS singal in .bw
format or bedGraph
.
##########Load packages################
library(TSSr)
library(Rsamtools)
library(BSgenome.Spombe.NCBI.ASM294v231)
##########Change below lines################
genomeName <- "BSgenome.Spombe.NCBI.ASM294v231"
species <- ""
mergeIndex <- c(1,1)
organismName <- "Schizosaccharomyces pombe"
inputFiles <- c(
"SRR8360238_Aligned.sortedByCoord.out.bam",
"SRR8360239_Aligned.sortedByCoord.out.bam"
)
inputFilesType <- "bam"
sampleLabels <- c(
"SRR8360238"
,"SRR8360239"
)
output_file <- "pombe.star.RData"
###########################
myTSSr <- new("TSSr", genomeName = genomeName
,inputFiles = inputFiles
,inputFilesType = inputFilesType
,sampleLabels = sampleLabels
,sampleLabelsMerged = organismName
,mergeIndex = mergeIndex
,organismName = organismName)
getTSS(myTSSr)
exportTSStable(myTSSr, data = "raw", merged = "FALSE")
plotCorrelation(myTSSr, samples = "all")
exportTSStoBedgraph(myTSSr, data = "raw", format = "bedGraph")
exportTSStoBedgraph(myTSSr, data = "raw", format = "BigWig")
save(TSSr, file = output_file)