blrevcomp
Class BioSeq

java.lang.Object
  extended by blrevcomp.BioSeq

public class BioSeq
extends java.lang.Object

Biological sequence


Nested Class Summary
 class BioSeq.Nuchar
          Nuchar.INuc.get() returns the character to be written if the sequence is being printed from the input strand.
Nuchar.CNuc.get() returns the character to be written if the sequence is being printed from the complementary strand.
The case of nucleotides in the input sequence is preserved in the output sequence.
 
Field Summary
 int LEN
          Length of sequence
 int MAXSEQ
          Maximum number of sequence elements
 java.lang.String Name
          Sequence name
 char[] seq
          Sequence
 char SFlag
          Flag character that indicates beginning of a sequence
 
Constructor Summary
BioSeq()
           
 
Method Summary
 boolean readFasta(BufferedTextInputFile In)
          Read a sequence in Pearson format:
 void writeFasta(BufferedTextOutputFile Out, java.lang.String SUFFIX, char STRAND, int SENSE, int WIDTH)
          Write sequence in Pearson/FASTA format
 void writeRAW(BufferedTextOutputFile Out, char STRAND, int SENSE, java.util.HashMap N, int WIDTH)
          Write sequence in raw format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAXSEQ

public int MAXSEQ
Maximum number of sequence elements


Name

public java.lang.String Name
Sequence name


SFlag

public char SFlag
Flag character that indicates beginning of a sequence


seq

public char[] seq
Sequence


LEN

public int LEN
Length of sequence

Constructor Detail

BioSeq

public BioSeq()
Method Detail

readFasta

public boolean readFasta(BufferedTextInputFile In)
Read a sequence in Pearson format:
    >name
    sequence
    sequence
    ...
    

Parameters:
In - Input file

writeRAW

public void writeRAW(BufferedTextOutputFile Out,
                     char STRAND,
                     int SENSE,
                     java.util.HashMap N,
                     int WIDTH)
Write sequence in raw format.

Parameters:
Out - BufferedTextOutputFile
STRAND - 'i': input strand 'c': complimentary strand
SENSE - 1 : original direction, -1 : reverse direction
N - - Nuchar.INuc for input strand; Nuchar.CNuc for complimentary strand
WIDTH - number of characters in output line

writeFasta

public void writeFasta(BufferedTextOutputFile Out,
                       java.lang.String SUFFIX,
                       char STRAND,
                       int SENSE,
                       int WIDTH)
Write sequence in Pearson/FASTA format

Parameters:
Out - - Output fie
SUFFIX - - Add SUFFIX to name of sequence:
  • inverse complement - .opp
  • complement - .comp
  • reverse strand - .flip
STRAND - - 'i' - input; 'c' - complement
SENSE - 1 - forward direction; -1 reverse direction
WIDTH - - number of nucleotides to print per line