Class SequenceWriter

java.lang.Object
ubic.gemma.core.analysis.sequence.SequenceWriter

public class SequenceWriter extends Object
Tools for writing biosequences to files so they can be analyzed by external tools, and then read back into Gemma.
Author:
paul
  • Field Details

    • SPACE_REPLACEMENT

      public static final String SPACE_REPLACEMENT
      Spaces in the sequence name will cause problems when converting back from some formats (e.g. PSL), so they are replaced.
      See Also:
  • Constructor Details

    • SequenceWriter

      public SequenceWriter()
  • Method Details

    • writeSequencesToFile

      public static int writeSequencesToFile(Collection<BioSequence> sequences, File outputFile) throws IOException
      Write a collection of sequences in FASTA format
      Parameters:
      sequences - sequences
      outputFile - file
      Returns:
      number of sequences written, excluding blanks and duplicates.
      Throws:
      IOException - io problems
    • getIdentifier

      public static String getIdentifier(BioSequence b)
      Modify the identifier for the purposes of using in temporary Fasta files. WARNING There is a faint possibility that this could cause problems in identifying the sequences later.
      Parameters:
      b - b
      Returns:
      string