# Path: q2_types/plugin_setup.py

# 
# Path: q2_types/distance_matrix/_format.py
# class LSMatFormat(model.TextFileFormat):
#     def sniff(self):
#         sniffer = skbio.io.io_registry.get_sniffer('lsmat')
#         return sniffer(str(self))[0]


import skbio
from ..plugin_setup import plugin
from . import LSMatFormat
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------




@plugin.register_transformer
def _1(data: skbio.DistanceMatrix) -> LSMatFormat:
    ff = LSMatFormat()
    with ff.open() as fh:
        data.write(fh, format='lsmat')
    return ff



# Path: q2_types/plugin_setup.py

# 
# Path: q2_types/distance_matrix/_format.py
# class LSMatFormat(model.TextFileFormat):
#     def sniff(self):
#         sniffer = skbio.io.io_registry.get_sniffer('lsmat')
#         return sniffer(str(self))[0]


# Path: q2_types/distance_matrix/_transformer.py
import skbio
from ..plugin_setup import plugin
from . import LSMatFormat

# ----------------------------------------------------------------------------
# Copyright (c) 2016-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------




@plugin.register_transformer
def _1(data: skbio.DistanceMatrix) -> LSMatFormat:
    ff = LSMatFormat()
    with ff.open() as fh:
        data.write(fh, format='lsmat')
    return ff



@plugin.register_transformer