(Hint: How many breaks are there? Consider both reads that overlap the break and those that span the break.)
Advanced: Can you sketch how reads might overlap translocations?
## [1] "http://www.nature.com/ncomms/2015/150401/ncomms7605/extref/ncomms7605-s1.pdf"
(Hint: switch “Show soft-clipped bases” on under Tracks -> Preferences -> Alignments)
(Hint: Use the read.table function with the parameters: header, sep, stringsAsFactors, skip and comment.char. You will also need to reformat the chromosome co-ordinates e.g. change 1 to chr1.)
SVbedpe<-read.table(gzfile("HCC1143_vs_HCC1143_BL.annot.bedpe.gz"),
header = T, sep="\t",stringsAsFactors = F, skip=69, comment.char = "")
colnames(SVbedpe)[1]<-"chr1"
SVbedpe$chr1<-paste0("chr",SVbedpe$chr1)
SVbedpe$chr2<-paste0("chr",SVbedpe$chr2)
library(ggplot2)
ggplot(SVbedpe[SVbedpe$bkdist>0,],aes(bkdist))+geom_density()+facet_grid(svclass ~ .,scales = "free_y")+xlim(0,1e6)
suppressMessages(library(circlize))
par(mar = c(1, 1, 1, 1))
circos.initializeWithIdeogram(plotType = c('axis', 'labels'))
bed1<-SVbedpe[,1:3]
bed2<-SVbedpe[,4:6]
cbbPalette <- c("#000000", "#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7")
colours<-cbbPalette[1:length(unique(SVbedpe$svclass))]
names(colours)<-unique(SVbedpe$svclass)
circos.genomicLink(bed1, bed2,col=colours[SVbedpe$svclass])
legend("topright", legend = names(colours),fill=colours,cex=0.35)
ascat.output<-readRDS("ascat.output.rds")
head(ascat.output$segments)
## sample chr startpos endpos nMajor nMinor
## 1 HCC1143 1 61735 6529823 2 2
## 2 HCC1143 1 6530189 8712280 2 1
## 3 HCC1143 1 8716357 9010627 4 1
## 4 HCC1143 1 9011627 20096288 2 1
## 5 HCC1143 1 20099109 23443472 2 2
## 6 HCC1143 1 23444113 43537981 2 1
(Hint: use the genomicTrackPlotRegion function)
totalcn<-ascat.output$segments[,c("chr","startpos","endpos")]
totalcn<-cbind(totalcn,value=ascat.output$segments$nMajor+ascat.output$segments$nMinor)
totalcn$chr<-paste0("chr",totalcn$chr)
totalcn$value[totalcn$value>10]<-10
circos.initializeWithIdeogram(plotType = c('axis', 'labels'))
circos.genomicTrackPlotRegion(totalcn,ylim=c(0,10),
panel.fun=function(region,value,...){
i=getI(...)
circos.genomicLines(region,value,type="segment",lwd=3,col="blue",...)})
circos.genomicLink(bed1, bed2,col=colours[SVbedpe$svclass])
legend("topright", legend = names(colours),fill=colours,cex=0.35)