NEXUS

Description

Reading

Schema-Specific Keyword Arguments

Supported Methods

Tree.get

(method reference)

tree = dendropy.Tree.get(
    path="tree.tre",
    schema="nexus",
    label=None,
    taxon_namespace=None,
    collection_offset=None,
    tree_offset=None,
    rooting="default-unrooted",
    edge_length_type=float,
    suppress_edge_lengths=False,
    extract_comment_metadata=True,
    store_tree_weights=False,
    encode_splits=False,
    finish_node_fn=None,
    case_sensitive_taxon_labels=False,
    preserve_underscores=False,
    suppress_internal_node_taxa=True,
    suppress_leaf_node_taxa=False,
    terminating_semicolon_required=True,
    ignore_unrecognized_keyword_arguments=False,
    )


TreeList.get

(method reference)

tree_list = dendropy.TreeList.get(
    path="path/to/file",
    schema="nexus",
    label=None,
    taxon_namespace=None,
    collection_offset=None,
    tree_offset=None,
    rooting="default-unrooted",
    edge_length_type=float,
    suppress_edge_lengths=False,
    extract_comment_metadata=True,
    store_tree_weights=False,
    encode_splits=False,
    finish_node_fn=None,
    case_sensitive_taxon_labels=False,
    preserve_underscores=False,
    suppress_internal_node_taxa=True,
    suppress_leaf_node_taxa=False,
    terminating_semicolon_required=True,
    ignore_unrecognized_keyword_arguments=False,
    )

TreeList.read

(method reference)

tree_list = dendropy.TreeList()
tree_list.read(
    path="path/to/file",
    schema="nexus",
    collection_offset=None,
    tree_offset=None,
    rooting="default-unrooted",
    edge_length_type=float,
    suppress_edge_lengths=False,
    extract_comment_metadata=True,
    store_tree_weights=False,
    encode_splits=False,
    finish_node_fn=None,
    case_sensitive_taxon_labels=False,
    preserve_underscores=False,
    suppress_internal_node_taxa=True,
    suppress_leaf_node_taxa=False,
    terminating_semicolon_required=True,
    ignore_unrecognized_keyword_arguments=False,
    )

TreeArray.read

(method reference)

tree_array = dendropy.TreeArray()
tree_array.read(
    path="path/to/file",
    schema="nexus",
    label=None,
    collection_offset=None,
    tree_offset=None,
    rooting="default-unrooted",
    edge_length_type=float,
    suppress_edge_lengths=False,
    extract_comment_metadata=True,
    store_tree_weights=False,
    encode_splits=False,
    finish_node_fn=None,
    case_sensitive_taxon_labels=False,
    preserve_underscores=False,
    suppress_internal_node_taxa=True,
    suppress_leaf_node_taxa=False,
    terminating_semicolon_required=True,
    ignore_unrecognized_keyword_arguments=False,
    )

DnaCharacterMatrix.get

(method reference)

d = dendropy.DnaCharacterMatrix.get(
        path="data.fas",
        schema="nexus",
        label=None,
        taxon_namespace=None,
        matrix_offset=None,
        ignore_unrecognized_keyword_arguments=False,
        )

RnaCharacterMatrix.get

(method reference)

d = dendropy.DnaCharacterMatrix.get(
        path="data.fas",
        schema="nexus",
        label=None,
        taxon_namespace=None,
        matrix_offset=None,
        ignore_unrecognized_keyword_arguments=False,
        )

ProteinCharacterMatrix.get

(method reference)

d = dendropy.ProteinCharacterMatrix.get(
        path="data.fas",
        schema="nexus",
        label=None,
        taxon_namespace=None,
        matrix_offset=None,
        ignore_unrecognized_keyword_arguments=False,
        )

RestrictionSitesCharacterMatrix.get

(method reference)

d = dendropy.RestrictionSitesCharacterMatrix.get(
        path="data.fas",
        schema="nexus",
        label=None,
        taxon_namespace=None,
        matrix_offset=None,
        ignore_unrecognized_keyword_arguments=False,
        )

InfiniteSitesCharacterMatrix.get

(method reference)

d = dendropy.InfiniteSitesCharacterMatrix.get(
        path="data.fas",
        schema="nexus",
        label=None,
        taxon_namespace=None,
        matrix_offset=None,
        ignore_unrecognized_keyword_arguments=False,
        )

StandardCharacterMatrix.get

(method reference)

d = dendropy.StandardCharacterMatrix.get(
        path="data.fas",
        schema="nexus",
        label=None,
        taxon_namespace=None,
        matrix_offset=None,
        ignore_unrecognized_keyword_arguments=False,
        default_state_alphabet=None,
        )

d = dendropy.StandardCharacterMatrix.get(
        path="data.fas",
        schema="nexus",
        label=None,
        taxon_namespace=None,
        matrix_offset=None,
        ignore_unrecognized_keyword_arguments=False,
        default_state_alphabet=dendropy.new_standard_state_alphabet("0123456789"),
        )

DataSet.get

(method reference)

data_set = dendropy.DataSet.get(
    path="path/to/file",
    schema="nexus",
    label=None,
    taxon_namespace=None,
    exclude_chars=False,
    exclude_trees=False,
    rooting="default-unrooted",
    edge_length_type=float,
    suppress_edge_lengths=False,
    extract_comment_metadata=True,
    store_tree_weights=False,
    encode_splits=False,
    finish_node_fn=None,
    case_sensitive_taxon_labels=False,
    preserve_underscores=False,
    suppress_internal_node_taxa=True,
    suppress_leaf_node_taxa=False,
    terminating_semicolon_required=True,
    ignore_unrecognized_keyword_arguments=False,
    )



DataSet.read

(method reference)

data_set = dendropy.DataSet()
data_set.read(
    path="path/to/file",
    schema="nexus",
    exclude_chars=False,
    exclude_trees=False,
    rooting="default-unrooted",
    edge_length_type=float,
    suppress_edge_lengths=False,
    extract_comment_metadata=True,
    store_tree_weights=False,
    encode_splits=False,
    finish_node_fn=None,
    case_sensitive_taxon_labels=False,
    preserve_underscores=False,
    suppress_internal_node_taxa=True,
    suppress_leaf_node_taxa=False,
    terminating_semicolon_required=True,
    ignore_unrecognized_keyword_arguments=False,
    )



Writing

Schema-Specific Keyword Arguments

Supported Methods

Tree.write

(method reference)

d.write(
        path='trees.nex',
        schema='nexus',
        suppress_taxa_blocks=None,
        suppress_block_titles=None,
        file_comments=[],
        preamble_blocks=[],
        supplemental_blocks=[],
        allow_multiline_comments=True,
        suppress_leaf_taxon_labels=False,
        suppress_leaf_node_labels=True,
        suppress_internal_taxon_labels=False,
        suppress_internal_node_labels=False,
        suppress_rooting=False,
        suppress_edge_lengths=False,
        unquoted_underscores=False,
        preserve_spaces=False,
        store_tree_weights=False,
        translate_tree_taxa=None,
        suppress_annotations=False,
        annotations_as_nhx=False,
        suppress_item_comments=False,
        node_label_element_separator=' ',
        node_label_compose_fn=None,
        edge_label_compose_fn=None,
        real_value_format_specifier='',
        ignore_unrecognized_keyword_arguments=False,
        )

Tree.as_string

(method reference)

s = d.as_string(
        schema='nexus',
        suppress_taxa_blocks=None,
        suppress_block_titles=None,
        file_comments=[],
        preamble_blocks=[],
        supplemental_blocks=[],
        allow_multiline_comments=True,
        suppress_leaf_taxon_labels=False,
        suppress_leaf_node_labels=True,
        suppress_internal_taxon_labels=False,
        suppress_internal_node_labels=False,
        suppress_rooting=False,
        suppress_edge_lengths=False,
        unquoted_underscores=False,
        preserve_spaces=False,
        store_tree_weights=False,
        translate_tree_taxa=None,
        suppress_annotations=False,
        annotations_as_nhx=False,
        suppress_item_comments=False,
        node_label_element_separator=' ',
        node_label_compose_fn=None,
        edge_label_compose_fn=None,
        real_value_format_specifier='',
        ignore_unrecognized_keyword_arguments=False,
        )

TreeList.write

(method reference)

d.write(
        path='trees.nex',
        schema='nexus',
        suppress_taxa_blocks=None,
        suppress_block_titles=None,
        file_comments=[],
        preamble_blocks=[],
        supplemental_blocks=[],
        allow_multiline_comments=True,
        suppress_leaf_taxon_labels=False,
        suppress_leaf_node_labels=True,
        suppress_internal_taxon_labels=False,
        suppress_internal_node_labels=False,
        suppress_rooting=False,
        suppress_edge_lengths=False,
        unquoted_underscores=False,
        preserve_spaces=False,
        store_tree_weights=False,
        translate_tree_taxa=None,
        suppress_annotations=False,
        annotations_as_nhx=False,
        suppress_item_comments=False,
        node_label_element_separator=' ',
        node_label_compose_fn=None,
        edge_label_compose_fn=None,
        real_value_format_specifier='',
        ignore_unrecognized_keyword_arguments=False,
        )

TreeList.as_string

(method reference)

s = d.as_string(
        schema='nexus',
        suppress_taxa_blocks=None,
        suppress_block_titles=None,
        file_comments=[],
        preamble_blocks=[],
        supplemental_blocks=[],
        allow_multiline_comments=True,
        suppress_leaf_taxon_labels=False,
        suppress_leaf_node_labels=True,
        suppress_internal_taxon_labels=False,
        suppress_internal_node_labels=False,
        suppress_rooting=False,
        suppress_edge_lengths=False,
        unquoted_underscores=False,
        preserve_spaces=False,
        store_tree_weights=False,
        translate_tree_taxa=None,
        suppress_annotations=False,
        annotations_as_nhx=False,
        suppress_item_comments=False,
        node_label_element_separator=' ',
        node_label_compose_fn=None,
        edge_label_compose_fn=None,
        real_value_format_specifier='',
        ignore_unrecognized_keyword_arguments=False,
        )

DnaCharacterMatrix.write

(method reference)

d.write(
        path='chars.nex',
        schema='nexus',
        simple=False,
        suppress_taxa_blocks=None,
        suppress_block_titles=None,
        file_comments=[],
        preamble_blocks=[],
        supplemental_blocks=[],
        allow_multiline_comments=True,
        continuous_character_state_value_format_fn=None,
        discrete_character_state_value_format_fn=None,
        unquoted_underscores=False,
        preserve_spaces=False,
        suppress_annotations=False,
        annotations_as_nhx=False,
        suppress_item_comments=False,
        real_value_format_specifier='',
        ignore_unrecognized_keyword_arguments=False,
        )

DnaCharacterMatrix.as_string

(method reference)

s = d.as_string(
        schema='nexus',
        simple=False,
        suppress_taxa_blocks=None,
        suppress_block_titles=None,
        file_comments=[],
        preamble_blocks=[],
        supplemental_blocks=[],
        allow_multiline_comments=True,
        continuous_character_state_value_format_fn=None,
        discrete_character_state_value_format_fn=None,
        unquoted_underscores=False,
        preserve_spaces=False,
        suppress_annotations=False,
        annotations_as_nhx=False,
        suppress_item_comments=False,
        real_value_format_specifier='',
        ignore_unrecognized_keyword_arguments=False,
        )

RnaCharacterMatrix.write

(method reference)

d.write(
        path='chars.nex',
        schema='nexus',
        simple=False,
        suppress_taxa_blocks=None,
        suppress_block_titles=None,
        file_comments=[],
        preamble_blocks=[],
        supplemental_blocks=[],
        allow_multiline_comments=True,
        continuous_character_state_value_format_fn=None,
        discrete_character_state_value_format_fn=None,
        unquoted_underscores=False,
        preserve_spaces=False,
        suppress_annotations=False,
        annotations_as_nhx=False,
        suppress_item_comments=False,
        real_value_format_specifier='',
        ignore_unrecognized_keyword_arguments=False,
        )

RnaCharacterMatrix.as_string

(method reference)

s = d.as_string(
        schema='nexus',
        simple=False,
        suppress_taxa_blocks=None,
        suppress_block_titles=None,
        file_comments=[],
        preamble_blocks=[],
        supplemental_blocks=[],
        allow_multiline_comments=True,
        continuous_character_state_value_format_fn=None,
        discrete_character_state_value_format_fn=None,
        unquoted_underscores=False,
        preserve_spaces=False,
        suppress_annotations=False,
        annotations_as_nhx=False,
        suppress_item_comments=False,
        real_value_format_specifier='',
        ignore_unrecognized_keyword_arguments=False,
        )

ProteinCharacterMatrix.write

(method reference)

d.write(
        path='chars.nex',
        schema='nexus',
        simple=False,
        suppress_taxa_blocks=None,
        suppress_block_titles=None,
        file_comments=[],
        preamble_blocks=[],
        supplemental_blocks=[],
        allow_multiline_comments=True,
        continuous_character_state_value_format_fn=None,
        discrete_character_state_value_format_fn=None,
        unquoted_underscores=False,
        preserve_spaces=False,
        suppress_annotations=False,
        annotations_as_nhx=False,
        suppress_item_comments=False,
        real_value_format_specifier='',
        ignore_unrecognized_keyword_arguments=False,
        )

ProteinCharacterMatrix.as_string

(method reference)

s = d.as_string(
        schema='nexus',
        simple=False,
        suppress_taxa_blocks=None,
        suppress_block_titles=None,
        file_comments=[],
        preamble_blocks=[],
        supplemental_blocks=[],
        allow_multiline_comments=True,
        continuous_character_state_value_format_fn=None,
        discrete_character_state_value_format_fn=None,
        unquoted_underscores=False,
        preserve_spaces=False,
        suppress_annotations=False,
        annotations_as_nhx=False,
        suppress_item_comments=False,
        real_value_format_specifier='',
        ignore_unrecognized_keyword_arguments=False,
        )

RestrictionSitesCharacterMatrix.write

(method reference)

d.write(
        path='chars.nex',
        schema='nexus',
        simple=False,
        suppress_taxa_blocks=None,
        suppress_block_titles=None,
        file_comments=[],
        preamble_blocks=[],
        supplemental_blocks=[],
        allow_multiline_comments=True,
        continuous_character_state_value_format_fn=None,
        discrete_character_state_value_format_fn=None,
        unquoted_underscores=False,
        preserve_spaces=False,
        suppress_annotations=False,
        annotations_as_nhx=False,
        suppress_item_comments=False,
        real_value_format_specifier='',
        ignore_unrecognized_keyword_arguments=False,
        )

RestrictionSitesCharacterMatrix.as_string

(method reference)

s = d.as_string(
        schema='nexus',
        simple=False,
        suppress_taxa_blocks=None,
        suppress_block_titles=None,
        file_comments=[],
        preamble_blocks=[],
        supplemental_blocks=[],
        allow_multiline_comments=True,
        continuous_character_state_value_format_fn=None,
        discrete_character_state_value_format_fn=None,
        unquoted_underscores=False,
        preserve_spaces=False,
        suppress_annotations=False,
        annotations_as_nhx=False,
        suppress_item_comments=False,
        real_value_format_specifier='',
        ignore_unrecognized_keyword_arguments=False,
        )

InfiniteSitesCharacterMatrix.write

(method reference)

d.write(
        path='chars.nex',
        schema='nexus',
        simple=False,
        suppress_taxa_blocks=None,
        suppress_block_titles=None,
        file_comments=[],
        preamble_blocks=[],
        supplemental_blocks=[],
        allow_multiline_comments=True,
        continuous_character_state_value_format_fn=None,
        discrete_character_state_value_format_fn=None,
        unquoted_underscores=False,
        preserve_spaces=False,
        suppress_annotations=False,
        annotations_as_nhx=False,
        suppress_item_comments=False,
        real_value_format_specifier='',
        ignore_unrecognized_keyword_arguments=False,
        )

InfiniteSitesCharacterMatrix.as_string

(method reference)

s = d.as_string(
        schema='nexus',
        simple=False,
        suppress_taxa_blocks=None,
        suppress_block_titles=None,
        file_comments=[],
        preamble_blocks=[],
        supplemental_blocks=[],
        allow_multiline_comments=True,
        continuous_character_state_value_format_fn=None,
        discrete_character_state_value_format_fn=None,
        unquoted_underscores=False,
        preserve_spaces=False,
        suppress_annotations=False,
        annotations_as_nhx=False,
        suppress_item_comments=False,
        real_value_format_specifier='',
        ignore_unrecognized_keyword_arguments=False,
        )

StandardCharacterMatrix.write

(method reference)

d.write(
        path='chars.nex',
        schema='nexus',
        simple=False,
        suppress_taxa_blocks=None,
        suppress_block_titles=None,
        file_comments=[],
        preamble_blocks=[],
        supplemental_blocks=[],
        allow_multiline_comments=True,
        continuous_character_state_value_format_fn=None,
        discrete_character_state_value_format_fn=None,
        unquoted_underscores=False,
        preserve_spaces=False,
        suppress_annotations=False,
        annotations_as_nhx=False,
        suppress_item_comments=False,
        real_value_format_specifier='',
        ignore_unrecognized_keyword_arguments=False,
        )

StandardCharacterMatrix.as_string

(method reference)

s = d.as_string(
        schema='nexus',
        simple=False,
        suppress_taxa_blocks=None,
        suppress_block_titles=None,
        file_comments=[],
        preamble_blocks=[],
        supplemental_blocks=[],
        allow_multiline_comments=True,
        continuous_character_state_value_format_fn=None,
        discrete_character_state_value_format_fn=None,
        unquoted_underscores=False,
        preserve_spaces=False,
        suppress_annotations=False,
        annotations_as_nhx=False,
        suppress_item_comments=False,
        real_value_format_specifier='',
        ignore_unrecognized_keyword_arguments=False,
        )

DataSet.write

(method reference)

d.write(
        path='dataset.nex',
        schema='nexus',
        simple=False,
        suppress_taxa_blocks=None,
        suppress_unreferenced_taxon_namespaces=False,
        suppress_block_titles=None,
        file_comments=[],
        preamble_blocks=[],
        supplemental_blocks=[],
        allow_multiline_comments=True,
        continuous_character_state_value_format_fn=None,
        discrete_character_state_value_format_fn=None,
        suppress_leaf_taxon_labels=False,
        suppress_leaf_node_labels=True,
        suppress_internal_taxon_labels=False,
        suppress_internal_node_labels=False,
        suppress_rooting=False,
        suppress_edge_lengths=False,
        unquoted_underscores=False,
        preserve_spaces=False,
        store_tree_weights=False,
        translate_tree_taxa=None,
        suppress_annotations=False,
        annotations_as_nhx=False,
        suppress_item_comments=False,
        node_label_element_separator=' ',
        node_label_compose_fn=None,
        edge_label_compose_fn=None,
        real_value_format_specifier='',
        ignore_unrecognized_keyword_arguments=False,
        )

DataSet.as_string

(method reference)

s = d.as_string(
        schema='nexus',
        simple=False,
        suppress_taxa_blocks=None,
        suppress_unreferenced_taxon_namespaces=False,
        suppress_block_titles=None,
        file_comments=[],
        preamble_blocks=[],
        supplemental_blocks=[],
        allow_multiline_comments=True,
        continuous_character_state_value_format_fn=None,
        discrete_character_state_value_format_fn=None,
        suppress_leaf_taxon_labels=False,
        suppress_leaf_node_labels=True,
        suppress_internal_taxon_labels=False,
        suppress_internal_node_labels=False,
        suppress_rooting=False,
        suppress_edge_lengths=False,
        unquoted_underscores=False,
        preserve_spaces=False,
        store_tree_weights=False,
        translate_tree_taxa=None,
        suppress_annotations=False,
        annotations_as_nhx=False,
        suppress_item_comments=False,
        node_label_element_separator=' ',
        node_label_compose_fn=None,
        edge_label_compose_fn=None,
        real_value_format_specifier='',
        ignore_unrecognized_keyword_arguments=False,
        )