[][src]Function seq_io::fastx::recognize_format

pub fn recognize_format<R, P>(
    reader: &mut BufReader<R, P>
) -> Result<Option<(SeqFormat, (usize, u64))>> where
    R: Read,
    P: BufPolicy

Returns the sequence format guess based on the first character: > for FASTA, @ for FASTA. Empty input results in None, an invalid character results in an error of kind ErrorKind::InvalidStart. The tuple at the second position contains the byte offset of the first character in the buffer and the line offset in the file. Returns None if the file is empty.