Plot line-plot of each percentile for given gene-list.
lineplot_for_bw(feature_txDb, genelist, bw_file, output_name = "Sample", tss = "TRUE", expression_value = TRUE, tiles = 4, median = TRUE)
feature_txDb | A TxDb object of gene feature file, generated by
|
---|---|
genelist | A tibble with two columns |
output_name | A character vector containing name of the output
plot. |
tss | Logical, if TRUE plot 1kb up/downstream of start co-ordinate; if
FALSE plot 1kb up/downstream of gene-body |
expression_value | Logical, if TRUE percentile is calculated based on
the expression value column (ie. second column), if FALSE second column
should define the percentiles. |
tiles | Numeric, when |
median | Logical, to display median or mean line of
percentiles. |
bw_files | A character vector containing either name or names of GRanges
object of bw or bdg files. GRanges object for bw_files can be generated by: |
A line-plot of percentiles and a tibble of percentiles appended to expression data.
if (FALSE) { # Load feature file from system data, to run example data feature_txDb <- AnnotationDbi::loadDb(system.file("extdata/sqllite/an_feature_file_s10_m04_r07.sqlite" , package = "FungalSporeAnalysis")) # Or load feature file as TxDb feature_txDb <- GenomicFeatures::makeTxDbFromGFF("an_feature_file_s10_m04_r07.gff") # load list of genes to subset from all the genes genelist_dat <- system.file("extdata/genesets/an_spore_pol2_for_percentilelineplot.txt" , package = "FungalSporeAnalysis") genelist <- readr::read_delim(genelist_dat,delim="\t", col_names=FALSE) # Load bw files as GRanges object pol2_veA_wt_spore <- rtracklayer::import.bw("pol2_veA_wt_spore_mix22_CACAGTTGGT_normalized_repeat.bw") # Load GRanges object from system data, to run example data data_files <- system.file("extdata/sysdata.rda" , package = "FungalSporeAnalysis") load(data_files) ########################################### lineplot_for_bw(feature_txDb, genelist =genelist,bw_file="pol2_veA_wt_spore", output_name = "pol2_veA_wt_spore") }