rulesGen: Exctracts relevant association rules.

Description Usage Arguments Value See Also Examples

Description

From the dataset in data, the function extracts a set of association rules, with a certain item in their right-hand-side. Each rule extracted has support greater than minsupp and confidence greater than minconf. The extraction is made using the apriori function implemented in the arules package. minsupp and minconf thresholds are set by the user in order to extract a limited number of most relevant association rules.

Usage

1
rulesGen(data, TF, minsupp, minconf, type)

Arguments

data

a GRanges object in which the metadata columns contain the Indicator of presence matrix i.e., a matrix with 1 and 0 values representing presence or absence, respectively (in case other values different from 0 are present, all of them are considered as representing presence).

TF

a string with the name of the trancription factor wanted in the right-hand-side of the extracted rules.

minsupp

an integer, the minimal support of the extracted rules.

minconf

an integer, the minimal confidence of the extracted rules.

type

a logical parameter; if type = TRUE, only rules with all present transcription factor in the left-hand-side are extracted (i.e., the left-hand-side of the extracted rules is of the type TF1=1, TF2=1, TF3=1). If type = FALSE, also rules with absent transcription factors in the left-hand-side are extracted (i.e., the left-hand-side of the extracted rules can be of the type TF1=1, TF2=0, TF3=1 or TF1=0, TF2=0, TF3=0).

Value

A data frame with the association rules extracted and their quality measures of support, confidence and lift.

See Also

apriori

Examples

1
2
3
4
5
6
7
8
9
# Load the dataset:
data('MCF7_chr1')

# To extract association rules from data, with TEAD4=1 in the right-hand-side
# and support greater than 0.005 and confidence greater than 0.62:
# r_TEAD4 <- rulesGen(data, 'TEAD4=1', minsupp=0.005, minconf=0.62,
#                     type=TRUE)

r_TEAD4 <- rulesGen(MCF7_chr1, 'TEAD4=1', 0.005, 0.62, TRUE)

TFARM documentation built on Nov. 8, 2020, 7:01 p.m.