Learn R Programming

coMET (version 1.2.0)

chromatinHMMAll: Creating multiple chromHMM tracks from the UCSC genome browser

Description

Create multiple chromHMM Broad tracks by connecting to the UCSC genome browser using the GViz bioconductor package

Usage

chromatinHMMAll(gen, chr, start, end, mySession, track.name = "Broad ChromHMM", pattern = NULL, table.name = NULL)

Arguments

gen
the name of the genome
chr
the chromosome of interest
start
the first position in region of interest (the smallest value)
end
the last position in region of interest (the biggest value)
mySession
the object session from the function browserSession of rtracklayer
track.name
the name of the track, for example : Broad ChromHMM
pattern
the pattern of the track to visualise
table.name
the name of the table from the track

Value

list of AnnotationTrack objects of GViz

References

http://bioconductor.org/packages/release/bioc/html/Gviz.html

http://genome-euro.ucsc.edu/cgi-bin/hgTrackUi?hgsid=202839739_2hYQ1BAOuBMAR620GjrtdrFAy6dn&c=chr6&g=wgEncodeHistoneSuper

See Also

chromatinHMMOne

Examples

Run this code
    library("Gviz")
    gen <- "hg19"
    chr <- "chr2"
    start <- 38290160
    end <- 38313219
    if(interactive()){
        BROWSER.SESSION="UCSC"
        mySession <- browserSession(BROWSER.SESSION)
        genome(mySession) <- gen
        track.name="Broad ChromHMM"
        tablestrack<-tableNames(ucscTableQuery(mySession, track=track.name))
        table.name<-tablestrack[1]
        PATTERN.REGULATION<-"GM12878"
        
        chromhmmPattern<-chromatinHMMAll(gen,chr,start,end,mySession,track.name,PATTERN.REGULATION)
        plotTracks(chromhmmPattern, from = start, to =end)

        chromhmmNoPattern<-chromatinHMMAll(gen,chr,start,end,mySession,track.name)
        plotTracks(chromhmmNoPattern, from = start, to =end)
    } else {

        data(chromhmmPattern)
        plotTracks(chromhmmPattern, from = start, to =end)

        data(chromhmmNoPattern)
        plotTracks(chromhmmNoPattern, from = start, to =end)
    }

Run the code above in your browser using DataLab