Knowledge base

Sushi package drawing bed map

Introduction

The bed format is a common format for describing genomic regions. The area can be visualized through the plotBed function

Code explanation

Input

bed format data frame

head(Sushi_ChIPSeq_pol2.bed)

As follows

  chrom start end name score strand
chr11 2280543 2280570 GGGCTCTCTCCGGCTTCCCTGTCCCGT 63 -1
chr11 2288946 2288973 CCTTCCCATCCGCAGGGGCACCACATG 1000 -1
chr11 2272471 2272498 TGGGCATCAGTCAGGCTCCTTCCCCAG 1000 -1
chr11 2288939 2288966 ATCCGCAGGGGCACCACATGAGTCACC 1000 -1
chr11 2281534 2281561 TGTCCTAGTGACAAGTGGCCGGACTTG 250 -1
chr11 2286805 2286832 GGTGAGGGCCAGCAGCTCCCTGGGGGG 250 1
Code example
library('Sushi')  # Load Sushi package

Sushi_data = data(package ='Sushi') # List Sushi own data
data(list = Sushi_data$results[,3]) # Load data

chrom = "chr11"
chromstart = 2281200
chromend = 2282200

plotBed(beddata = Sushi_ChIPSeq_pol2.bed,chrom = chrom,chromstart = chromstart,
chromend =chromend,colorby = Sushi_ChIPSeq_pol2.bed$strand,
colorbycol = SushiColors(2),row = "auto",wiggle=0.001)

labelgenome(chrom,chromstart,chromend,n=2,scale="Kb")  # Add genome coordinates

legend("topright",inset=0,legend=c("reverse","forward"),fill=SushiColors(2)(2),
border=SushiColors(2)(2),text.font=2,cex=0.75)   # Add legend


splitstrand = TRUEDraw the positive and negative chains separately

chrom = "chr11"
chromstart = 2281200
chromend = 2282200

plotBed(beddata = Sushi_ChIPSeq_pol2.bed,chrom = chrom,chromstart = chromstart,
chromend =chromend,colorby = Sushi_ChIPSeq_pol2.bed$strand,
colorbycol = SushiColors(2),row = "auto",wiggle=0.001,splitstrand=TRUE)

labelgenome(chrom,chromstart,chromend,n=2,scale="Kb")

legend("topright",inset=0,legend=c("reverse","forward"),fill=SushiColors(2)(2),
border=SushiColors(2)(2),text.font=2,cex=0.75)

Reference

https://www.bioconductor.org/packages/release/bioc/vignettes/Sushi/inst/doc/Sushi.pdf

Leave a Reply

Your email address will not be published. Required fields are marked *

Close Bitnami banner
Bitnami