library("RnaSeqTutorial")
library(BSgenome.Dmelanogaster.UCSC.dm3)
## creating a count table from 4 bam files
count.table <- easyRNASeq(filesDirectory=
system.file(
"extdata",
package="RnaSeqTutorial"),
pattern="[A,C,T,G]{6}\\.bam$",
format="bam",
readLength=36L,
organism="Dmelanogaster",
chr.sizes=as.list(seqlengths(Dmelanogaster)),
annotationMethod="rda",
annotationFile=system.file(
"data",
"gAnnot.rda",
package="RnaSeqTutorial"),
count="exons")
## an example of a chr.map
chr.map <- data.frame(from=c("2L","2R","MT"),to=c("chr2L","chr2R","chrMT"))
## an example of a RangedData annotation
gAnnot <- RangedData(
IRanges(
start=c(10,30,100),
end=c(21,53,123)),
space=c("chr01","chr01","chr02"),
strand=c("+","+","-"),
transcript=c("trA1","trA2","trB"),
gene=c("gA","gA","gB"),
exon=c("e1","e2","e3"),
universe = "Hs19"
)
## an example of a GRangesList annotation
grngs <- as(gAnnot,"GRanges")
grngsList<-split(grngs,seqnames(grngs))
Run the code above in your browser using DataLab