viRome包
功能介绍:
We have developed code in R to analyse short-read next-generation sequencing data from virus-infection studies where the siRNA or piRNA pathways have been implicated. The package provides a range of functions to help scientists visualise the results of such experiments.
结果展示:
官方网址:
http://www.arkgenomics.org/bioinformatics/virome
运行手册:
1、安装
# get the necessary Bioconductor packages
source("http://www.bioconductor.org/biocLite.R")
biocLite("Rsamtools")
# install optional Bioconductor packages
# biocLite("seqLogo")
# biocLite("motifStack")
# install the necessary R packages
install.packages(c("plyr","gsubfn","seqinr","reshape2"))
# install optional R packages
# install.packages("ggplot2")
2、使用
# load the library
# find example data
library(viRome)
infile <- system.file("data/SRR389184_vs_SINV_sorted.bam", package="viRome")
# minimal commands
bam <- read.bam(infile, chr="SINV") # requires the full path to a bam file, and the name of the reference the data are aligned to
bamc <- clip.bam(bam) # requires only the output of read.bam()
bpl <- barplot.bam(bamc) # requires only the output of clip.bam()
ssp <- size.strand.bias.plot(bpl) # requires only the output of barplot.bam()
dm <- summarise.by.length(bamc) # requires only the output of clip.bam()
sph <- size.position.heatmap(dm) # requires only the output of summarise.by.length()
sbp <- stacked.barplot(dm) # requires only the output of summarise.by.length()
sir <- position.barplot(bamc)
# requires only the output of clip.bam(), though one should alter minlen, maxlen and reflen
sr <- sequence.report(bamc) # requires only the output of clip.bam()
pwm <- make.pwm(bamc) # requires only the output of clip.bam()
pmh <- pwm.heatmap(pwm) # requires only the output of make.pwm()
rdp <- read.dist.plot(sr) # requires only the output of sequence.report()
3、注意事项
读入数据的时候,system.file输入的是包内部的路径。
1、可以不用system.file方法,自己写路径
2、或者用system.file()找到路径,把自己的数据拷贝进去
infile <- system.file("data/SRR389184_vs_SINV_sorted.bam", package="viRome")
bam <- read.bam(infile, chr="SINV")
# requires the full path to a bam file, and the name of the reference the data are aligned to
3、需要为bam文件排序建索引,然后全都拷贝到路径里
samtools view -bS result.sam -o result.bam
#sam转bam文件
samtools sort result.bam -o result.sorted
#排序
samtools index result.sorted
#建立索引
具体详情:
参考官网优先:
http://www.arkgenomics.org/bioinformatics/virome
在R中用 ?方法名 查看具体用法