buildExpressionSummary: Calculates average expression levels of the results of a...

Description Usage Arguments Value Examples

View source: R/summaryBuilders.R

Description

This function takes the result of a previous call to queryEncode, splits the contained expression files by conditions (as specified by the split_by argument), then calculates average expression levels for each condition.

Usage

1
2
3
4
5
6
7
8
9
buildExpressionSummary(
  query_results,
  split_by,
  metric = NULL,
  simplify = FALSE,
  aggregate_function = mean,
  temp_dir = ".",
  force = FALSE
)

Arguments

query_results

A data.table returned by queryEncode or queryEncodeGeneric.

split_by

A vector of column names from query_results that will be used to split the average expression levels. If NULL, all elements of query_results are used in the same average expression calculation.

metric

A regular expression, indicating which column from the ENCODE data must be extracted. If NULL, ENCODExplorer data automatically detects and selects one of the TPM, FPKM or featurecount columns.

simplify

If TRUE, non-discriminatory columns are removed from the metadata, and if only one sample group is found, it is renamed "All".

aggregate_function

A function which takes a vector as input and returns a single value summarizing the whole. Used to summarize expression metrics.

temp_dir

The path to a directory where peak files will be downloaded.

force

A logical indicating whether already present files be redownloaded.

Value

An object of class ENCODEExpressionSummary.

Examples

1
2
3
4
5
6
7
8
9
query_results = queryEncodeGeneric(biosample_name="neural tube", 
                                   output_type="gene quantifications",
                                   file_type="tsv",
                                   assay="polyA plus RNA-seq",
                                   assembly="^mm10$",
                                   dataset_biosample_summary="(15.5|13.5)",
                                   fixed=FALSE)
                                   
buildExpressionSummary(query_results, split_by="dataset_biosample_summary")

CharlesJB/ENCODExplorer documentation built on Dec. 9, 2019, 10:11 a.m.