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

11 thoughts on “Sushi package drawing bed map

  1. I was curious if you ever considered changing the
    structure of your site? Its very well written;
    I love what youve got to say. But maybe you could a little more in the
    way of content so people could connect with it better.
    Youve got an awful lot of text for only having 1 or two
    pictures. Maybe you could space it out better?

  2. Howdy! I could have sworn I’ve been to this site before but after going through a few of
    the posts I realized it’s new to me. Anyways, I’m certainly pleased
    I stumbled upon it and I’ll be book-marking
    it and checking back frequently!

  3. It is in reality a nice and useful piece of information. I am happy that
    you shared this helpful info with us. Please stay us up to date
    like this. Thank you for sharing.

  4. I am extremely inspired along with your writing talents and also with the
    format to your weblog. Is that this a paid theme or did you
    customize it your self? Anyway keep up the nice high quality writing, it’s
    rare to look a great weblog like this one these days..

Leave a Reply

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