### R代码从vignette源'proBAMr。Rnw ' ################################################### ### 代码块1号:选项 ################################################### 选项(宽度= 70 ) ################################################### ### 代码块2号:loadpkg ################################################### 库(proBAMr ) ################################################### ### 代码块3号:PrepareAnno ################################################### gtfFile < -系统。文件(“extdata”、“测试。CDSfasta <- system. gtf", package="proBAMr")文件(“extdata”、“coding_seq。, package="proBAMr") pepfasta <- system。文件(“extdata”、“pro_seq。fasta”,包= " proBAMr”)annotation_path < - tempdir () PrepareAnnotationGENCODE (gtfFile、CDSfasta pepfasta, annotation_path, dbsnp = NULL, splice_matrix = FALSE,宇宙= FALSE ) ################################################### ### 代码块数量4:PSMstab ################################################### passedPSM < read.table(系统。文件(“extdata”、“passedPSM。选项卡”,包= " proBAMr”),9 = \ t,头= TRUE) passedPSM [1:3 , ] ################################################### ### 代码块5号:PSMs2SAM ################################################### 负载(系统。文件(“extdata / GENCODE”、“exon_anno。RData", package="proBAMr"))文件(“extdata / GENCODE”、“proseq。RData", package="proBAMr"))文件(“extdata / GENCODE”、“procodingseq。RData", package="proBAMr")) options(stringsAsFactors=FALSE) passedPSM <- read.table(system. proamr);文件(“extdata”、“passedPSM。tab", package="proBAMr"), sep='\t', header=TRUE) SAM <- PSMtab2SAM(passsedpsm, XScolumn='mvh',外显子,proteinseq, procodingseq) write。table(SAM, file=paste(tempdir(), '/test. txt ')sam', sep=''), sep='\t', quote=FALSE, row.names=FALSE, col.names=FALSE) dim(SAM) SAM[20:27, ] ################################################### ### code chunk number 6: SAM2BAM ################################################### paste('cat header test.sam > test_header.sam') paste('samtools view -S -b test_header.sam > test_header.bam') paste('samtools sort test_header.bam > test_header_sort') paste('samtools index test_header_sort') ################################################### ### code chunk number 7: SessionInfo ################################################### sessionInfo()