1 / 9

An application of GGplot

An application of GGplot. Eitan Halper-Stromberg. Getting Started. https://github.com/Eitan177/targetSeqView R CMD build targetSeqView.zip R CMD INSTALL targetSeqView_1.0.tar.gz Open the vignette Look at/do the examples Apply it to your own data if applicable

aliza
Download Presentation

An application of GGplot

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. An application of GGplot Eitan Halper-Stromberg

  2. Getting Started • https://github.com/Eitan177/targetSeqView • R CMD build targetSeqView.zip • R CMD INSTALL targetSeqView_1.0.tar.gz • Open the vignette • Look at/do the examples • Apply it to your own data if applicable • Repurpose the code if you like

  3. Input files • Txt file with regions to inspect • SampleDesc Chr1 Start1 End1 LeftSideSegDup Chr2 Start2 End2 RightSideSeqDupValidationStatus Sample • LCL 14 107083256 107083431 TRUE 14 107078225 107078400 FALSE PCR Validated 1320KB0001MultAlnForVignette.bam • LCL 2 89544257 89544432 TRUE 2 89533400 89533644 TRUE PCR Validated 1320KB0001MultAlnForVignette.bam • Bam File

  4. Example 1: failed path <- system.file("extdata", package="targetSeqView”) filename=file.path(path,"twoSVJunctionsFailed.txt”) retfail=ViewAndScore(filename=filename,bamFilePath=path,estimateIndelRate=FALSE,estimateMmRate=FALSE,getReadLength=FALSE,build="hg19",verbose=TRUE)

  5. View it! Event 1: p1=formatPlot(retfail[[1]][[1]][[1]][[2]],title='Alignment supporting a structural variant') p2=formatPlot(retfail[[1]][[1]][[2]][[2]],title='supporting no SV') p3=formatPlot(retfail[[1]][[1]][[3]][[2]],title='supporting no SV') grid.newpage() pushViewport(viewport(layout = grid.layout(3, 1))) print(p1,vp = viewport(layout.pos.row = 1, layout.pos.col=1)) print(p2,vp = viewport(layout.pos.row = 2, layout.pos.col=1)) print(p3,vp = viewport(layout.pos.row = 3, layout.pos.col=1)) Event 2: p1=formatPlot(retfail[[1]][[2]][[1]][[2]],title='Alignment supporting a structural variant') p2=formatPlot(retfail[[1]][[2]][[2]][[2]],title='supporting no SV') p3=formatPlot(retfail[[1]][[2]][[3]][[2]],title='supporting no SV') grid.newpage() pushViewport(viewport(layout = grid.layout(3, 1))) print(p1,vp = viewport(layout.pos.row = 1, layout.pos.col=1)) print(p2,vp = viewport(layout.pos.row = 2, layout.pos.col=1)) print(p3,vp = viewport(layout.pos.row = 3, layout.pos.col=1))

  6. Example 2: Passed filename=file.path(path,"twoSVJunctionsPassed.txt") retpass=ViewAndScore(filename=filename,bamFilePath=path,estimateIndelRate=FALSE, estimateMmRate=FALSE,getReadLength=FALSE,build="hg19",refexpansion=c(0,0),verbose=TRUE)

  7. View it! p1=formatPlot(retpass[[1]][[1]][[1]][[2]],title='Alignment supporting a structural variant', mismatchcolor='red') p2=formatPlot(retpass[[1]][[1]][[2]][[2]],title='supporting no SV', mismatchcolor='red') p3=formatPlot(retpass[[1]][[1]][[3]][[2]],title='supporting no SV', mismatchcolor='red') grid.newpage() pushViewport(viewport(layout = grid.layout(3, 1))) print(p1,vp = viewport(layout.pos.row = 1, layout.pos.col=1)) print(p2,vp = viewport(layout.pos.row = 2, layout.pos.col=1)) print(p3,vp = viewport(layout.pos.row = 3, layout.pos.col=1)) p1=formatPlot(retpass[[1]][[2]][[1]][[2]],title='Alignment supporting a structural variant', mismatchcolor='red') p2=formatPlot(retpass[[1]][[2]][[2]][[2]],title='supporting no SV', mismatchcolor='red') p3=formatPlot(retpass[[1]][[2]][[3]][[2]],title='supporting no SV', mismatchcolor='red') grid.newpage() pushViewport(viewport(layout = grid.layout(3, 1))) print(p1,vp = viewport(layout.pos.row = 1, layout.pos.col=1)) print(p2,vp = viewport(layout.pos.row = 2, layout.pos.col=1)) print(p3,vp = viewport(layout.pos.row = 3, layout.pos.col=1))

  8. The data frame head(retpass[[1]][[1]][[2]][[2]]) afvec2 posvec2 ref ypostailrefname 1 M 107082761 107082756 1 HWI-ST619_61:3:2108:13668:175483:ATCACG 2 M 107082762 107082756 1 HWI-ST619_61:3:2108:13668:175483:ATCACG 3 A 107082763 107082756 1 HWI-ST619_61:3:2108:13668:175483:ATCACG 4 M 107082764 107082756 1 HWI-ST619_61:3:2108:13668:175483:ATCACG 5 C 107082765 107082756 1 HWI-ST619_61:3:2108:13668:175483:ATCACG 6 M 107082766 107082756 1 HWI-ST619_61:3:2108:13668:175483:ATCACG The call to ggplot dtailA <- ggplot(dftailA, aes(x = posvec2, y = ypostail, fill = factor(afvec2, levels = get("l")), height = 0.85)) + geom_tile() + facet_grid(. ~ ref, scales = "free")

  9. More data • https://github.com/Eitan177/targetSeqViewFigureReproduction

More Related