'Returns data provider matching parameter values. For standalone data
sources, source parameter is ignored.'

def get_data_provider(self, trans, name=None, source='data', raw=False, original_dataset=None):

    data_provider = None
    if raw:
        if isinstance(original_dataset.datatype, Gff):
            data_provider_class = genome.RawGFFDataProvider
        elif isinstance(original_dataset.datatype, Bed):
            data_provider_class = genome.RawBedDataProvider
        elif isinstance(original_dataset.datatype, Vcf):
            data_provider_class = genome.RawVcfDataProvider
        elif isinstance(original_dataset.datatype, Tabular):
            data_provider_class = ColumnDataProvider
        elif isinstance(original_dataset.datatype, (Nexus, Newick, Phyloxml)):
            data_provider_class = PhylovizDataProvider
        data_provider = data_provider_class(original_dataset=original_dataset)
    elif name:
        value = self.dataset_type_name_to_data_provider[name]
        if isinstance(value, dict):
            data_provider_class = value.get(original_dataset.datatype.__class__, value.get('default'))
        else:
            data_provider_class = value
        if (name == original_dataset.ext):
            data_provider = data_provider_class(original_dataset=original_dataset)
        else:
            converted_dataset = original_dataset.get_converted_dataset(trans, name)
            deps = original_dataset.get_converted_dataset_deps(trans, name)
            data_provider = data_provider_class(original_dataset=original_dataset, converted_dataset=converted_dataset, dependencies=deps)
    elif original_dataset:
        if (not original_dataset.datatype.data_sources):
            return None
        data_provider_mapping = original_dataset.datatype.data_sources
        if ('data_standalone' in data_provider_mapping):
            data_provider = self.get_data_provider(trans, name=data_provider_mapping['data_standalone'], original_dataset=original_dataset)
        else:
            source_list = data_provider_mapping[source]
            if isinstance(source_list, string_types):
                source_list = [source_list]
            for source in source_list:
                try:
                    data_provider = self.get_data_provider(trans, name=source, original_dataset=original_dataset)
                    break
                except NoConverterException:
                    pass
    return data_provider
