rulesGen {TFARM} | R Documentation |
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.
rulesGen(data, TF, minsupp, minconf, type)
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 |
A data frame with the association rules extracted and their quality measures of support, confidence and lift.
# 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)