Reads all FASTA files (genome bins) in a folder and returns all unique scaffold names. This is useful to get an overview of which scaffolds are already extracted from the metagenome by for example highlighting them in plots.

mmscanbins(binfolder, namesOnly = TRUE)

Arguments

binfolder

(required) Path to the folder to scan.

namesOnly

Return only the scaffold names (TRUE) or a complete list with the DNA sequences of the scaffolds in each file (FALSE). (Default: TRUE)

Value

A character vector (if namesOnly = TRUE) or a list (if namesOnly = FALSE).

Examples

if (FALSE) { # Use mmextract and mmexport to extract scaffolds from the assembly and # write their sequences to a FASTA file per bin. Then the mmscanbins() function # can be used to retrieve the names of all scaffolds already extracted, and # then for example highlight them in a plot: binned_scaffolds <- mmscanbins("path/to/folder", namesOnly = TRUE) binned_scaffolds mmplot(mmgenome2, min_length = 10000, x = "cov_C13.11.25", y = "cov_C14.01.09", color_by = "taxonomy", highlight_scaffolds = binned_scaffolds, highlight_color = "darkred", x_scale = "log10", y_scale = "log10" ) }