Skip to content

Constructors

taxidTools.factories.read_taxdump(nodes, rankedlineage, merged=None, skip_synth=False, skip_env=False, skip_nodiv=True)

Read a Taxonomy from the NCBI`s taxdump files

Parameters:

  • nodes (str) –

    Path to the nodes.dmp file

  • rankedlineage (str) –

    Path to the rankedlineage.dmp file

  • merged (Optional[str], default: None ) –

    Path to the merged.mp file

  • skip_synth (Optional[bool], default: False ) –

    Skip taxa in the 'Synthetic and Chimeric' division

  • skip_env (Optional[bool], default: False ) –

    Skip taxa in the 'Environmental samples' division

  • skip_nodiv (Optional[bool], default: True ) –

    Skip taxa in the 'Unassigned' division

Returns:

  • Taxonomy

Examples:

>>> tax = read_taxdump("nodes.dmp', 'rankedlineage.dmp')
>>> tax = read_taxdump("nodes.dmp', 'rankedlineage.dmp', merged='merged.dmp', skip_env=True, skip_synth=True)
See Also

read_json

taxidTools.factories.read_json(path)

Load a Taxonomy from a previously exported json file.

Parameters:

  • path (str) –

    Path of file to load

Returns:

  • Taxonomy
See Also

taxidTools.Taxonomy.write read_taxdump