The main matrix or data frame. Rows are features (genes/peaks/etc) and cols are samples (conditions/replicates)
ann_main
ann_main is a data frame that contains the genomic locations of features in mat_main. It must have the same number of rows as mat_main, and must have columns named as "chr", "start" and "end".
mat_supp
The supplementary matrix or data frame. Rows are features (genes/peaks/etc) and cols are samples (conditions/replicates)
ann_supp
ann_supp os a data frame that contains the genomic locations of features in mat_supp. It must have the same number of rows as mat_supp, and must have columns named as "chr", "start" and "end".
n_limit
The most number of closet features in the supplemenatry matrix that can be used for summarization for each feature in the main matrix
extend
The genomic features in the supplemenatry matrix that are no farther away than extend bp from the feature in question in the main matrix will be used for summarization
Value
A modified matrix with the same dimensions as the main matrix
Details
The main matrix and supplementary matrix must have the same columns corresponding to conditions or replicates. They have different features on rows that can be linked by physical location on genomes. The basic assumption is that one feature's variation in the main matrix is correlated with nearby feature(s)' principal variation in the supplementary matrix.