def from_dir(cls, ID, path,
                 parser='name',
                 position_mapper=None, pattern='*.fcs', recursive=False,
                 readdata_kwargs={}, readmeta_kwargs={}, ID_kwargs={}, **kwargs):
        """
        Create a Collection of measurements from data files contained in a directory.

        Parameters
        ----------
        {_bases_ID}
        datadir : str
            Path of directory containing the data files.
        pattern : str
            Only files matching the pattern will be used to create measurements.
        recursive : bool
            Recursively look for files matching pattern in subdirectories.
        {_bases_filename_parser}
        {_bases_position_mapper}
        {_bases_ID_kwargs}
        kwargs : dict
            Additional key word arguments to be passed to constructor.
        """
        datafiles = get_files(path, pattern, recursive)
        return cls.from_files(ID, datafiles, parser=parser, position_mapper=position_mapper,
                              readdata_kwargs=readdata_kwargs, readmeta_kwargs=readmeta_kwargs,
                              ID_kwargs=ID_kwargs, **kwargs)
Esempio n. 2
0
    def from_dir(cls,
                 ID,
                 datadir,
                 parser,
                 pattern='*.fcs',
                 recursive=False,
                 readdata_kwargs={},
                 readmeta_kwargs={},
                 **ID_kwargs):
        """
        Create a Collection of measurements from data files contained in a directory.

        Parameters
        ----------
        ID : hashable
            Collection ID
        datadir : str
            Path of directory containing the data files.
        pattern : str
            Only files matching the pattern will be used to create measurements.
        recursive : bool
            Recursively look for files matching pattern in subdirectories.
        {_bases_filename_parser}
        {_bases_ID_kwargs}
        """
        datafiles = get_files(datadir, pattern, recursive)
        return cls.from_files(ID,
                              datafiles,
                              parser,
                              readdata_kwargs=readdata_kwargs,
                              readmeta_kwargs=readmeta_kwargs,
                              **ID_kwargs)
    def from_dir(cls, ID, datadir, parser, pattern='*.fcs', recursive=False,
                 readdata_kwargs={}, readmeta_kwargs={}, **ID_kwargs):
        """
        Create a Collection of measurements from data files contained in a directory.

        Parameters
        ----------
        ID : hashable
            Collection ID
        datadir : str
            Path of directory containing the data files.
        pattern : str
            Only files matching the pattern will be used to create measurements.
        recursive : bool
            Recursively look for files matching pattern in subdirectories.
        {_bases_filename_parser}
        {_bases_ID_kwargs}
        """
        datafiles = get_files(datadir, pattern, recursive)
        return cls.from_files(ID, datafiles, parser,
                              readdata_kwargs=readdata_kwargs, readmeta_kwargs=readmeta_kwargs,
                              **ID_kwargs)
Esempio n. 4
0
    def from_dir(cls,
                 ID,
                 path,
                 parser='name',
                 position_mapper=None,
                 pattern='*.fcs',
                 recursive=False,
                 readdata_kwargs={},
                 readmeta_kwargs={},
                 ID_kwargs={},
                 **kwargs):
        """
        Create a Collection of measurements from data files contained in a directory.

        Parameters
        ----------
        {_bases_ID}
        datadir : str
            Path of directory containing the data files.
        pattern : str
            Only files matching the pattern will be used to create measurements.
        recursive : bool
            Recursively look for files matching pattern in subdirectories.
        {_bases_filename_parser}
        {_bases_position_mapper}
        {_bases_ID_kwargs}
        kwargs : dict
            Additional key word arguments to be passed to constructor.
        """
        datafiles = get_files(path, pattern, recursive)
        return cls.from_files(ID,
                              datafiles,
                              parser=parser,
                              position_mapper=position_mapper,
                              readdata_kwargs=readdata_kwargs,
                              readmeta_kwargs=readmeta_kwargs,
                              ID_kwargs=ID_kwargs,
                              **kwargs)