# #——回声= FALSE ------------------------------------------------------------ dataDir < -系统。WTpileupFile ('extdata', package = 'MMAPPR2data')MTpileupFile <- file. path(dataDir, 'exwt.plp')路径(dataDir exmut.plp) samtoolsScript < -文件(“/ tmp / samtools”,“一个”)writeline (c(如果 [[ ${@:$#} == *" wt。bam"*]];', 'then', paste('cat', WTpileupFile), 'else', paste('cat', MTpileupFile), 'fi'), samtoolsScript) close(samtoolsScript) origPath <- Sys.getenv('PATH') Sys。setenv(路径=粘贴(origPath, / tmp, 9月 = ':')) ## ---- installVEP eval = FALSE --------------------------------------------------- # git克隆https://github.com/Ensembl/ensembl-vep.git cd ensembl-vep # perl INSTALL.pl——ac - s {my_species } ## ---- eval = FALSE ------------------------------------------------------------ # Sys。setenv(PATH=paste("/ PATH /to/Perlbrew", Sys.getenv("PATH"), sep=":")) ## ----param-------------------------------------------------------------------- BiocParallel::register(BiocParallel::MulticoreParam()) ##参见下面对BiocParallel库(MMAPPR2, quiet = TRUE) library(MMAPPR2data, quiet = TRUE) library(Rsamtools, quiet = TRUE) #这通常是自动配置的:vepFlags < - ensemblVEP: vepFlags(旗帜=列表(格式=“已”,# <——这是必要的vcf = FALSE, # <——以及这一物种= danio_rerio,数据库= FALSE, # <——这三个参数允许我们VEP脱机运行,fasta = goldenFasta(), # < -╯|你可能不需要人造石铺地面= goldenGFF (), # <------ ╯filter_common = TRUE, coding_only = TRUE #假设RNA-seq数据))参数< MmapprParam (refFasta = goldenFasta (), wtFiles = exampleWTbam (), mutFiles = exampleMutBam (),物种= danio_rerio, vepFlags = vepFlags, # #可选outputFolder = tempOutputFolder()可选)# # # #——mmappr ------------------------------------------------------------------- mmapprData < - mmappr(参数)# #——mmappr-steps ------------------------------------------------------------- md < -新(“MmapprData”,param = param) ## calculateDistance()取一个MmapprData对象postCalcDistMD <- calculateDistance(md) postLoessMD <- loessFit(postCalcDistMD) postPrePeakMD <- prePeak(postLoessMD) postPeakRefMD <- peakRefinement(postPrePeakMD) postCandidatesMD <- generateCandidates(postPeakRefMD) outputMmapprData(postCandidatesMD) ## ----recover-md--------------------------------------------------------------- ##输出文件夹内容:猫(粘贴(系统2(“ls”,outputFolder(参数(mmapprData)), stdout = TRUE)), 9 = ' \ n ') mdFile < - file.path (outputFolder(参数(mmapprData)), mmappr_data.RDS) md < - readRDS (mdFile) md # #——的结果 ------------------------------------------------------------------ (候选人(mmapprData)的18美元,n = 2) outputTsv < - file.path (outputFolder(参数(mmapprData)), 18. tsv)猫(粘贴(系统2(‘头’,outputTsv stdout = TRUE)),sep = '\n') ## ----vepFlags----------------------------------------------------------------- library(ensemblVEP, quiet = TRUE) vepFlags <- vepFlags (flags = list(###默认设置格式= 'vcf', # <——这是必要的vcf = FALSE, # <——以及this species = 'danio_rerio', database = FALSE, cache = TRUE, filter_common = TRUE, coding_only = TRUE #假设RNA-seq数据###你可能会发现这些有趣: # everything = TRUE # enables many optional analyses, such as Polyphen and SIFT # per_gene = TRUE # will output only the most severe variant per gene # pick = TRUE # will output only one consequence per variant )) ## ----bpparam------------------------------------------------------------------ library(BiocParallel, quietly = TRUE) register(SerialParam()) register(MulticoreParam(progressbar=TRUE)) registered() ## ----refGenome, eval=FALSE---------------------------------------------------- # refGenome <- gmapR::GmapGenome(goldenFasta(), name='slc24a5', create=TRUE) ## ----sessionInfo-------------------------------------------------------------- sessionInfo() ## ---- echo = FALSE------------------------------------------------------------ Sys.setenv(PATH=origPath)