LoadIGVSession | R Documentation |
Load IGV Session in a format that fits to seqNdisplayR (see documentation or examples for details)
LoadIGVSession(
igvsession_fname,
group_by = "autoscalegroups",
strand_regex = c(`+` = "plus", `-` = "minus"),
load_annotations = FALSE
)
igvsession_fname |
path to igv session xml file |
group_by |
group tracks info string: 'common_prefix', 'autoscalegroups', 'do_not_group', default = 'autoscalegroups' |
strand_regex |
for stranded files a regex distinguishing plus and minus strand file names |
load_annotations |
load annotations as GRanges? default=FALSE |
This is experimental as IGV and seqNdisplayR have very different approach. In IGV each track is considered a separate entity wheres seqNdisplayR shines when it comes to combination of different kind of track groups etc. This function is therefore a first guess, may be used in combination with Session2Df, which then allows to specify better the grouping on the resulting data.frame (see examples). group_by: autoscalegroups assumes that all samples within one autoscalegroup are one experiment and will consider these a separate group. Group name will be guessed from a common prefix present in all track names. If no common prefix is found, uses grp and an unique index. group_by: common_prefix assumes that all samples with a shared prefix are from one sample group. ie if your igv session track names are RNAseq wt; RNAseq ko1; RNAseq ko2; ChIPSeq a; ChIPseq b etc this will create a group RNAseq and a group ChIPseq. If group_by is none of the above will simply not assign datasets. Uses strand_regex to assign strand information, if strand_regex = NULL, will not try to assign strand information and treat all tracks as + strand tracks. This last version is the most robust. Parameters returned are essentially defaults except that if autoscale groups are found all samples within one group are considered the same batch. UPS: annotations are imported correct, except the default RefSeq/NCBI used in IGV is not implemented. Better set these by hand afterwards.
A named list with entries samples, colors, bigwig_dirs, bigwigs, parameters and annotations
MS
igvsession_fname = system.file('extdata','example_igv_session.xml',package='seqNdisplayR')
igvtbl = LoadIGVSession( igvsession_fname, group_by = 'autoscalegroups' )
igvtbl$samples
igvtbl$colors
igvtbl$bigwigs
igvtbl$bigwig_dirs
igvtbl$parameters
igvtbl$annotations
Session2Df(igvtbl$samples, igvtbl$colors, igvtbl$bigwigs, igvtbl$bigwig_dirs,strand_regex = c('+'='plus', '-'='minus'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.