skbio.io.registry.IORegistry.read#
- IORegistry.read(file, format=None, into=None, verify=True, **kwargs)[source]#
- Read a file as certain format into an object. - Parameters:
- fileopenable (filepath, URL, filehandle, etc.)
- The file to read. Something that is understood by - skbio.io.open.
- formatstr, optional
- The format of the file if known. If None, the format will be inferred from the file. 
- intotype or None, optional
- The object which will be returned. If None, a generator will be returned. 
- verifybool, optional
- When True, will double check the - formatif provided.
- kwargsdict, optional
- Keyword arguments will be passed to their respective handlers ( - skbio.io.openand the reader for- format).- newlinecannot be provided.
 
- Returns:
- object or generator
- An instance of - intoif- intois not None else generator
 
- Raises:
- ValueError
- Raised when - formatand- intoare both None.
- TypeError
- If - newlineis provided in- kwargs.
- UnrecognizedFormatError
- Raised when a reader could not be found for a given - formator the format could not be guessed.
- FormatIdentificationWarning
- Raised when - verifyis True and the sniffer of a- formatdid not agree that- fileis a member of- format
- ArgumentOverrideWarning
- Raised when - verifyis True and a user-supplied argument is overriding the suggestion provided by the sniffer of- format.