write_partitioned_alignments2 | R Documentation |
Write alignment partitions as separate alignment files for various data types
write_partitioned_alignments2(
x,
cluster_df,
partition_file,
in_format = NULL,
in_type = NULL,
out_file,
out_type = "standard"
)
x |
concatenated alignment file in Nexus or Phyllip format read directly from local directory |
cluster_df |
cluster partitions as outputted by |
partition_file |
name of text file with user provided partitions, with names and start&end positions |
in_format |
Format of the input alignment file. One of "phylip", "interleaved", "sequential", "clustal", "fasta", or "nexus", or any unambiguous abbreviation. Passed to |
in_type |
Type of input sequences. One of "DNA", "AA", "CODON" or "USER". Passed to |
out_file |
Path to save the alignments. If |
out_type |
Output format type. One of "dna" (default), "protein", "standard", or "continuous". |
No return value. This function is called for its side effect of writing alignment files to disk.
write_partitioned_alignments
for the older version supporting morphological data only.
# Load example phylogenetic data matrix
data("characters")
# Create distance matrix
Dmatrix <- get_gower_dist(characters)
# Find optimal partitioning scheme using PAM under k=3 partitions
cluster_df <- make_clusters(Dmatrix, k = 3)
# Write morphological partitions into multiple Nexus files
## Not run: write_partitioned_alignments2(x = "characters.nex",
cluster_df = cluster_df,
out_file = "test", out_type = "standard")
## End(Not run)
# Write to molecular partitions into multiple Phyllip files
## Not run: write_partitioned_alignments2(x = "alignments.phy",
partition_file = "sorted_partitions_50genes.txt",
in_format = "phylip", in_type = "dna",
out_file = "test", out_type = "dna")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.