alleleClusterDistr: Compute a matrix for presence of allele clusters based on...

View source: R/func__networkAnalyser__alleleClusterDistr.R

alleleClusterDistrR Documentation

Compute a matrix for presence of allele clusters based on allelic presence-absence status

Description

This function generates a matrix for co-occurrence of all alleles of each cluster in a give collection of bacterial samples. This function is particularly useful in investigating the distribution of allele clusters (such as maximal cliques) in bacterial samples. It can be considered as a simplified version of function getClusterMemberCoocurrence.

Usage

alleleClusterDistr(cls, pam)

Arguments

cls

A data frame of two columns for cluster IDs (first column) and allele contents (the second column, comma-delimited). This data frame can be generated from the output of function summariseCliques. Each cluster must consist of at least two alleles.

pam

An uncentred presence-absence matrix for alleles in the data frame cls. This is a binary matrix, where 1 denotes presence and 0 denotes absence.

Value

An n-by-m matrix, where n is the sample size and m is the cluster number.

Author(s)

Yu Wan (wanyuac@126.com)


wanyuac/GeneMates documentation built on Aug. 12, 2022, 7:37 a.m.