This function concatenate sequences from alignments present in the working directory based on a correspondence table and saves the output in a new directory
concatipede(
df = NULL,
filename = NULL,
format = c("fasta", "nexus", "phylip"),
dir,
plotimg = FALSE,
out = NULL,
remove.gaps = TRUE,
write.outputs = TRUE,
save.partitions = TRUE,
excel.sheet = 1
)
The user-defined correspondence table, as a data frame or equivalent. This is used only if no filename
argument is provided.
Filename of input correspondence table. Alternatively, if no filename is provided, the user can provide their own correspondence table as the df
argument.
a string specifying in what formats you want the alignment
Optional, path to the directory containing the fasta files. This argument has an effect only if fasta files names are taken from the columns of the df
argument, and that df
does not have an attribute dir_name
itself. If no dir
is provided and df
does not have a dir_name
attribute, the current working directory is ued with a warning.
Logical, save a graphical representation of the alignment in pdf format. Default: FALSE.
specify outputs filenames
Logical, remove gap only columns. Useful if not using all sequences in the alignments. Default: TRUE.
Logical, save concatenated alignment, partitions position table and graphical representation. If FALSE it overrides plotimg. Default: TRUE.
Logical, save in the concatenated alignmeent directory a text file with partitions limits for the concatenated alignment. Default: TRUE.
specify what sheet from the excel spreadsheet has to be read. Either a string (the name of a sheet), or an integer (the position of the sheet).
The concatenated alignment (invisibly if out
is not NULL).
dir <- system.file("extdata", package = "concatipede")
z <- concatipede(filename = paste0(dir,"/Macrobiotidae_seqnames.xlsx"), dir = dir,
write.outputs = FALSE)
z
#> 13 DNA sequences in binary format stored in a matrix.
#>
#> All sequences of same length: 2945
#>
#> Labels:
#> Macrobiotus_hannae
#> Macrobiotus_wandae
#> Macrobiotus_caelestis
#> Macrobiotus_polonicus
#> Macrobiotus_kamilae
#> Macrobiotus_noongaris
#> ...
#>
#> Base composition:
#> a c g t
#> 0.248 0.218 0.260 0.274
#> (Total: 38.28 kb)