Class AffyProbeReader
- java.lang.Object
-
- ubic.gemma.core.loader.util.parser.BasicLineMapParser<CompositeSequence,Collection<Reporter>>
-
- ubic.gemma.core.loader.expression.arrayDesign.AffyProbeReader
-
- All Implemented Interfaces:
LineParser<Collection<Reporter>>
,Parser<Collection<Reporter>>
public class AffyProbeReader extends BasicLineMapParser<CompositeSequence,Collection<Reporter>>
Reads Affymetrix Probe files, including exon arrays.Expected format is tabbed, NOT FASTA. A one-line header starting with the word "Probe" is REQUIRED. In later versions of the format the second field of the file (column) is omitted.
For 3' arrays, here is an example:
1494_f_at 1 325 359 1118 TCCCCATGAGTTTGGCCCGCAGAGT Antisense
For exon arrays, we create the equivalent files from the GFF files provided by Affymetrix. The files are created off-line using a PERL script.- Author:
- pavlidis
-
-
Field Summary
-
Fields inherited from class ubic.gemma.core.loader.util.parser.BasicLineMapParser
COMMENT_MARK, log
-
Fields inherited from interface ubic.gemma.core.loader.util.parser.LineParser
MIN_PARSED_LINES_FOR_UPDATE, PARSE_ALERT_TIME_FREQUENCY_MS
-
Fields inherited from interface ubic.gemma.core.loader.util.parser.Parser
PARSE_ALERT_FREQUENCY
-
-
Constructor Summary
Constructors Constructor Description AffyProbeReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsKey(CompositeSequence key)
Collection<Reporter>
get(CompositeSequence key)
protected CompositeSequence
getKey(Collection<Reporter> newItem)
Collection<CompositeSequence>
getKeySet()
Collection<Collection<Reporter>>
getResults()
void
parse(InputStream is)
Parse aInputStream
.Collection<Reporter>
parseOneLine(String line)
Handle the parsing of a single line from the input.protected void
put(CompositeSequence key, Collection<Reporter> value)
void
setSequenceField(int sequenceField)
Set the index (starting from zero) of the field where the sequence is found.-
Methods inherited from class ubic.gemma.core.loader.util.parser.BasicLineMapParser
parse, parse
-
-
-
-
Method Detail
-
setSequenceField
public void setSequenceField(int sequenceField)
Set the index (starting from zero) of the field where the sequence is found. This varies in the Affymetrix-provided files.- Parameters:
sequenceField
- sequence field
-
containsKey
public boolean containsKey(CompositeSequence key)
- Specified by:
containsKey
in classBasicLineMapParser<CompositeSequence,Collection<Reporter>>
-
get
public Collection<Reporter> get(CompositeSequence key)
- Specified by:
get
in classBasicLineMapParser<CompositeSequence,Collection<Reporter>>
-
getKeySet
public Collection<CompositeSequence> getKeySet()
- Specified by:
getKeySet
in classBasicLineMapParser<CompositeSequence,Collection<Reporter>>
-
getResults
public Collection<Collection<Reporter>> getResults()
- Specified by:
getResults
in interfaceParser<Collection<Reporter>>
- Specified by:
getResults
in classBasicLineMapParser<CompositeSequence,Collection<Reporter>>
- Returns:
- the results of the parse.
-
parse
public void parse(InputStream is) throws IOException
Description copied from interface:Parser
Parse aInputStream
.- Specified by:
parse
in interfaceParser<Collection<Reporter>>
- Overrides:
parse
in classBasicLineMapParser<CompositeSequence,Collection<Reporter>>
- Parameters:
is
- input stream- Throws:
IOException
- if there is a problem while manipulating the file
-
parseOneLine
public Collection<Reporter> parseOneLine(String line)
Description copied from interface:LineParser
Handle the parsing of a single line from the input.- Specified by:
parseOneLine
in interfaceLineParser<Collection<Reporter>>
- Specified by:
parseOneLine
in classBasicLineMapParser<CompositeSequence,Collection<Reporter>>
- Parameters:
line
- line to parse- Returns:
- parsed object
-
getKey
protected CompositeSequence getKey(Collection<Reporter> newItem)
- Specified by:
getKey
in classBasicLineMapParser<CompositeSequence,Collection<Reporter>>
-
put
protected void put(CompositeSequence key, Collection<Reporter> value)
- Specified by:
put
in classBasicLineMapParser<CompositeSequence,Collection<Reporter>>
-
-