学习文件:https://github.com/lcalviell/ORFquant,数据也是这篇文章里面的。
1.安装软件
library(devtools)
install_github(repo = "lcalviell/ORFquant")
library(ORFquant)
library(RiboseQC)
conda install -c conda-forge pandoc
安装过程由于是在linux里面安装的R,所以有很多附属的R包没有安装进去,可以用bioconductor也可以用conda进行安装。
2.prepare_annotation_files
?prepare_annotation_files
在R中运行,会出现所需要准备的文件并且会有相应的要求,例如:
因此
根据要求,写进去自己的数据
(1)设置文件夹
getwd()##获取现在所在的位置
dir.create("1.my_ORFquant_dir")###创建一个新的文件夹
setwd("1.my_ORFquant_dir")###进入这个新创建的文件夹
(2)把fasta转换成2bit格式
用conda下载这三个软件faToTwoBit, twoBitInfo, and twoBitToFa
在genecode里面下载GTF和FASTA文件
faToTwoBit GRCh38.p13.genome.fa GRCh38.p13.genome.2bit
(3)赋值文件
my_riboseq_bam <- "./SRR2433794.bam"
my_gtf_file <- "./gencode.v40.annotation.gtf"
my_fasta_file <- "./GRCh38.primary_assembly.genome.2bit"
####查看是否负值成功
stopifnot(
file.exists(my_riboseq_bam)&
file.exists(my_gtf_file)&
file.exists(my_fasta_file)
)
(4)生成annotation_files
orfquant_anno_file <-prepare_annotation_files(
annotation_directory = "annotation_directory/",
twobit_file = my_fasta_file,
gtf_file =