## ----设置,eval = false --------------------------------------------------------------------------------------------------------------------------------------------------------------#if(!sireseenamespace(“ biocmanager”,悄悄= true))#install.packages(“ biocmanager”)#biocmanager :: install(“ seqsqc”))## ----加载软件包-----------------------------------------------------------------------------------------------------------------------库(SEQSQC)## -------------------------------------------------------------------------------------------------------------------------------------- ifile <-System.File(“ Extdata”,“example_sub.vcf“,package =“ seqsqc”)sample.annot <-system.file(“ extdata”,“ sampleannotation.txt”,package =“ seqsqc”)cr <-system.file(“ extdata”,“ extdata”,“ ccds”。hs37.3.37.37.bed“,package =“ seqsqc”)oftdir <-empdir()outfile <-file.path(oftdir,“ testWrapup”)## ----------------------------------------------------------------------------------------------------------------------------------------------------------#sampleqc(vfile = infile,output = outfile,capture.region = cr,sample.annot = sample.annot,format.data =“ ngs”,format.file =“ vcf”,qcreport = false)#save(seqfile,seqfile,file,file,file=“ seqfile.rdata”)## ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # load(system.file("extdata", "example.seqfile.Rdata", package="SeqSQC")) # gfile <- system.file("extdata", "example.gds", package="SeqSQC") # seqfile <- SeqSQC(gdsfile = gfile, QCresult = QCresult(seqfile)) # # seqfile <- sampleQC(vfile = seqfile, output = "testWrapUp", QCreport = TRUE) # save(seqfile, file="seqfile.Rdata") ## ----loadVfile, eval=TRUE, message=FALSE-------------------------------------- seqfile <- LoadVfile(vfile = infile, output = outfile, capture.region = cr, sample.annot = sample.annot) ## ----show--------------------------------------------------------------------- load(system.file("extdata", "example.seqfile.Rdata", package="SeqSQC")) gfile <- system.file("extdata", "example.gds", package="SeqSQC") seqfile <- SeqSQC(gdsfile = gfile, QCresult = QCresult(seqfile)) slotNames(seqfile) ## ----class-------------------------------------------------------------------- gdsfile(seqfile) ## ----class2------------------------------------------------------------------- QCresult(seqfile) head(QCresult(seqfile)$sample.annot) ## ----gds---------------------------------------------------------------------- showfile.gds(closeall=TRUE) dat <- SeqOpen(seqfile) dat closefn.gds(dat) ## ----missingrate, eval=FALSE-------------------------------------------------- # seqfile <- MissingRate(seqfile, remove.samples=NULL) ## ----mrresult, eval=TRUE------------------------------------------------------ res.mr <- QCresult(seqfile)$MissingRate tail(res.mr) ## ----plot.mr------------------------------------------------------------------ plotQC(seqfile, QCstep = "MissingRate") ## ----sexcheck, eval=FALSE----------------------------------------------------- # seqfile <- SexCheck(seqfile, remove.samples=NULL) ## ----scresult, eval=TRUE------------------------------------------------------ res.sexc <- QCresult(seqfile)$SexCheck tail(res.sexc) ## ----plot.sexc---------------------------------------------------------------- plotQC(seqfile, QCstep = "SexCheck") ## ----inbreeding, eval=FALSE--------------------------------------------------- # seqfile <- Inbreeding(seqfile, remove.samples=NULL) ## ----inbresult, eval=TRUE----------------------------------------------------- res.inb <- QCresult(seqfile)$Inbreeding tail(res.inb) ## ----plot.inb----------------------------------------------------------------- plotQC(seqfile, QCstep = "Inbreeding") ## ----ibd, eval=FALSE---------------------------------------------------------- # seqfile <- IBD(seqfile, remove.samples=NULL) ## ----ibdresult, eval=TRUE----------------------------------------------------- res.ibd <- QCresult(seqfile)$IBD head(res.ibd) ## ----plot.ibd----------------------------------------------------------------- plotQC(seqfile, QCstep = "IBD") ## ----pca, eval=FALSE---------------------------------------------------------- # seqfile <- PCA(seqfile, remove.samples=NULL) ## ----pcaresult, eval=TRUE----------------------------------------------------- res.pca <- QCresult(seqfile)$PCA tail(res.pca) ## ----plot.pca----------------------------------------------------------------- plotQC(seqfile, QCstep = "PCA") ## ----plot.pca.inter, eval=TRUE, warning=FALSE--------------------------------- plotQC(seqfile, QCstep = "PCA", interactive=TRUE) ## ----problist----------------------------------------------------------------- problemList(seqfile) save(seqfile, file="seqfile.Rdata") ## ----report, eval=FALSE------------------------------------------------------- # RenderReport(seqfile, output="report.html", interactive=TRUE) ## ----------------------------------------------------------------------------- sessionInfo()