get_foreground_seq_to_motifs: Get motifs and their corresponding aligned sequences form...

View source: R/get_foreground_seq_to_motifs.R

get_foreground_seq_to_motifsR Documentation

Get motifs and their corresponding aligned sequences form from foreground.

Description

Get motifs and their corresponding aligned sequences form from foreground.

Usage

get_foreground_seq_to_motifs(motifs_list, foreground)

Arguments

motifs_list

A list from motif enrichment analysis.

foreground

A vector for aligned sequences.

Value

A list containing motifs and the corresponding sequences from foreground.

Author(s)

Dongdong Zhan and Mengsha Tong

References

Hadley Wickham (2018). stringr: Simple, Consistent Wrappers for Common String Operations. R package version 1.3.0.\ https://CRAN.R-project.org/package=stringr.

Examples

## The process needs to load data from PhosMap datasets stored into FTP server and perform large computation.
## It may take a few minutes.
if(FALSE){
    ftp_url <- "ftp://111.198.139.72:4000/pub/PhosMap_datasets/function_demo_data/get_foreground_seq_to_motifs.RData"
    load_data <- load_data_with_ftp(ftp_url, 'RData')
    writeBin(load_data, "get_foreground_seq_to_motifs.RData")
    load("get_foreground_seq_to_motifs.RData")

    foreground_sequences_mapped_to_motifs <- get_foreground_seq_to_motifs(
      motifs_list,
      foreground
    )
    head(foreground_sequences_mapped_to_motifs)
    require(ggseqlogo)
    ggseqlogo(foreground_sequences_mapped_to_motifs[[15]])
}


ecnuzdd/PhosMap documentation built on Dec. 7, 2022, 4:09 a.m.