I am trying to make a co-occurrence network graph for my presence/absence data of genes per genomes but am unsure how to go about with it. I'm hoping to end up with something like the first image below,
Where each gene is linked to another gene , considering if they are both present in the same genomes, where possibly a larger circle being used to describe a higher frequency gene. I originally tried using widyr and tidygraph packages but I am unsure that my data is not compatible (see second image), as it has the BGCs as rows and the individual genomes as columns. I am examining the presence/absence pattern of the gene pair to determine if they represent a coincident relationship; basically if gene i and gene j are observed together or apart in the input genomes more often than would be expected by chance.
1) Are there any suggestions on what packages/code I could use that would work with my data set, or how I could adapt my data set to work with these packages?
2) Are there any statistical tests that would be also recommended specifically to assure that there is a coincident or not type relationship?
Example of dataset
# Example of data set # rows = genes # cols = genomes set.seed(2222) df <- matrix(sample(c(TRUE, FALSE), 50, replace = TRUE), 5) colnames(df) <- letters[1:10]
Binary Data Table Example
free all over 40 pics
Thanks in advanced