library(seqinr)
library(zoo)
dat <- read.fasta(file="chrI.fa.gz")
dat2 <- unlist(dat, use.names=FALSE)
dat2f <- as.factor(dat2)
barplot(table(dat2))
dat2_gc <- rep(0, length(dat2))
dat2_gc[dat2 %in% c("g","c")] <- 1
gc_means <- rollapply(dat2_gc, FUN=mean, width=1000, by=1000)
plot(gc_means, type='p', cex=0.1)
hist(gc_means)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.