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 Summary
Fields Modifier and Type Field Description static String
SPACE_REPLACEMENT
Spaces in the sequence name will cause problems when converting back from some formats (e.g.
-
Constructor Summary
Constructors Constructor Description SequenceWriter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getIdentifier(BioSequence b)
Modify the identifier for the purposes of using in temporary Fasta files.static int
writeSequencesToFile(Collection<BioSequence> sequences, File outputFile)
Write a collection of sequences in FASTA format
-
-
-
Field Detail
-
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:
- Constant Field Values
-
-
Method Detail
-
writeSequencesToFile
public static int writeSequencesToFile(Collection<BioSequence> sequences, File outputFile) throws IOException
Write a collection of sequences in FASTA format- Parameters:
sequences
- sequencesoutputFile
- 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
-
-