edu.cornell.med.alignments
Class ClustalwWriter

java.lang.Object
  extended by edu.cornell.med.alignments.ClustalwWriter
All Implemented Interfaces:
AlignmentWriter

public class ClustalwWriter
extends Object
implements AlignmentWriter

Writes a BiologicalAlignment in ClustalW format. Adds a line that indicates at each position whether the alignment reaches a user-specified conservation cutoff value.

Author:
luce

Constructor Summary
ClustalwWriter()
          Constructor.
 
Method Summary
 String getConservationLine()
          Gets the line indicating conservation at each position of the alignment.
 void setConservationLine(String starLine)
          Sets the line indicating conservation at each position of the alignment.
 void writeAlignment(edu.mssm.crover.representation.BiologicalAlignment aln, Writer writer)
          Writes the BiologicalAlignment to a file.
 String writeAlignmentFile(edu.mssm.crover.representation.BiologicalAlignment aln)
          Writes the BiologicalAlignment as a ClustalW formnatted alignment to a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClustalwWriter

public ClustalwWriter()
Constructor. Creates a new instance of the conservation line.

Method Detail

getConservationLine

public final String getConservationLine()
Gets the line indicating conservation at each position of the alignment.

Specified by:
getConservationLine in interface AlignmentWriter
Returns:
the conservation line

setConservationLine

public final void setConservationLine(String starLine)
Sets the line indicating conservation at each position of the alignment.

Specified by:
setConservationLine in interface AlignmentWriter
Parameters:
starLine - the conservation line

writeAlignment

public final void writeAlignment(edu.mssm.crover.representation.BiologicalAlignment aln,
                                 Writer writer)
                          throws IOException
Writes the BiologicalAlignment to a file.

Specified by:
writeAlignment in interface AlignmentWriter
Parameters:
aln - The BiologicalAlignment to be written
writer - The file to write the alignment to.
Throws:
IOException - if the file cannot be written to

writeAlignmentFile

public final String writeAlignmentFile(edu.mssm.crover.representation.BiologicalAlignment aln)
Writes the BiologicalAlignment as a ClustalW formnatted alignment to a String.

Specified by:
writeAlignmentFile in interface AlignmentWriter
Parameters:
aln - The BiologicalAlignment
Returns:
the String representation of the alignment in ClustalW format


Copyright © 2007 Institute for Computational Biomedicine, All Rights Reserved.