Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.ac.man.bioinf.io.parsers
Class PIRProteinAlignmentParser

    java.lang.Object
      |
      +--uk.ac.man.bioinf.io.parsers.AbstractProteinAlignmentInputParser
            |
            +--uk.ac.man.bioinf.io.parsers.PIRProteinAlignmentParser

All Implemented Interfaces:
  AlignmentInputParser, AlignmentOutputParser

public class PIRProteinAlignmentParser
extends AbstractProteinAlignmentInputParser
implements AlignmentOutputParser

A filter that reads an alignment in PIR/NBRF protein sequence format and returns a sequence alignment object. This parser has no state attached to it, and may be re-entered (ie it is thread safe). Created: Fri May 26 10:18:02 2000

Version:
  $Id: PIRProteinAlignmentParser.java,v 1.15 2001/04/11 17:04:43 lord Exp $
Author:
  J Selley

Constructor Summary
`PIRProteinAlignmentParser()`

Method Summary
`String` | `getDescription()` Returns that this is a PIR/NBRF protein sequence parser.
`SequenceAlignment` | `parse(Identifier ident, Reader r, ParserExceptionHandler eh)`
`SequenceAlignment` | `parse(Reader r, ParserExceptionHandler eh)` This function parses an input reader which contains a (set of) PIR/NBRF sequence(s), and returns an alignment containing them.
`Writer` | `write(SequenceAlignment sa, Writer writer, ParserExceptionHandler eh)` This method parses a sequence alignment and writes it out to the supplied writer.

Methods inherited from class uk.ac.man.bioinf.io.parsers.AbstractProteinAlignmentInputParser
`toSequence`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PIRProteinAlignmentParser

    public PIRProteinAlignmentParser()

Method Detail

### parse

    public SequenceAlignment parse(Reader r,
                                   ParserExceptionHandler eh)
                            throws IOException

  This function parses an input reader which contains a (set of) PIR/NBRF sequence(s), and returns an alignment containing them. It only reads the protein version of PIR/NBRF format. Any exceptions thrown up (except the IOException) are packaged up and sent to an exception handler.

  Specified by:
    `parse` in interface `AlignmentInputParser`
  Parameters:
    `r` - the input reader
    `eh` - the exception handler
  Returns:
    the sequence alignment
  Throws:
    `IOException` - if there is an error in the reader

### parse

    public SequenceAlignment parse(Identifier ident,
                                   Reader r,
                                   ParserExceptionHandler eh)
                            throws IOException

  Specified by:
    `parse` in interface `AlignmentInputParser`
    `IOException`

### write

    public Writer write(SequenceAlignment sa,
                        Writer writer,
                        ParserExceptionHandler eh)

  This method parses a sequence alignment and writes it out to the supplied writer. It formats the output to 80 characters wide.

  N.B., this method does nothing with the writer other than write output to it - i.e. it does not close the writer.

  Specified by:
    `write` in interface `AlignmentOutputParser`
  Parameters:
    `sa` - the sequence alignment to be written.
    `writer` - the writer to which the sequence is to be written
    `eh` - the exception handler to which exceptions are parsed.
  Returns:
    the writer for output

### getDescription

    public String getDescription()

  Returns that this is a PIR/NBRF protein sequence parser.

  Specified by:
    `getDescription` in interface `AlignmentOutputParser`
  Returns:
    the description of this parser

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD