Class AbstractCsvInteractionEvidenceParser<T extends InteractionEvidence>
- java.lang.Object
-
- psidev.psi.mi.jami.crosslink.io.parser.AbstractCsvInteractionEvidenceParser<T>
-
- All Implemented Interfaces:
com.googlecode.jcsv.reader.CSVEntryParser<T>
- Direct Known Subclasses:
CsvBinaryInteractionEvidenceParser
,CsvInteractionEvidenceParser
public abstract class AbstractCsvInteractionEvidenceParser<T extends InteractionEvidence> extends Object implements com.googlecode.jcsv.reader.CSVEntryParser<T>
Abstract class for crosslink CSV parser- Since:
22/08/14
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description AbstractCsvInteractionEvidenceParser()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected CsvFeatureEvidence
createCrossLinkFeatureEvidence(CsvRange range)
createCrossLinkFeatureEvidence.protected CsvExperimentalParticipantPool
createExperimentalParticipantPool(List<CsvProtein> csvProteins, int lineNumber, int columnNumber, List<CsvRange> csvRanges)
createExperimentalParticipantPool.protected ParticipantEvidence
createParticipantEvidence(String protein1, int protein1Index, String pepPos, int pepPos1Index, String linkedPos, int linkedPosIndex)
createParticipantEvidence.protected CsvParticipantEvidence
createParticipantEvidence(CsvProtein csvProtein, int lineNumber, int columnNumber, CsvRange range)
createParticipantEvidence.protected CsvProtein
createProteinFromNameAndIdentifier(String protein, int lineNumber, int columnNumber)
createProteinFromNameAndIdentifier.protected List<CsvProtein>
createProteinsFromString(String protein1, int lineNumber, int columnNumber)
createProteinsFromString.CsvParserListener
getParserListener()
Getter for the fieldparserListener
.void
initialiseColumnNames(List<String> data)
initialiseColumnNames.protected abstract T
instantiateInteractionEvidence(int linePosition, String bait)
instantiateInteractionEvidence.boolean
isStarted()
isStarted.protected List<CsvRange>
parseCrossLinkingFeatures(String pepPos, String linkedPos, int lineNumber, int pepColumnNumber, int linkedColumnNumber)
parseCrossLinkingFeatures.T
parseEntry(String... data)
parseEntry.protected List<CsvRange>
parsePositions(String pos, int lineNumber, int colNumber)
parsePositions.protected void
processInvalidPosition(String message, FileSourceContext context)
processInvalidPosition.protected void
processMismatchPeptidePositions(List<CsvRange> peptidePositions, List<CsvRange> linkedPositions)
processMismatchPeptidePositions.protected void
processMismatchProteinPositions(List<CsvRange> rangePositions, List<CsvProtein> proteins)
processMismatchProteinPositions.protected void
processNoProtein1Error(int lineNumber)
processNoProtein1Error.protected void
processProteinIdentifiersError(String[] identifiers, int lineNumber, int columnNumber)
processProteinIdentifiersError.void
setParserListener(CsvParserListener parserListener)
Setter for the fieldparserListener
.
-
-
-
Method Detail
-
parseEntry
public T parseEntry(String... data)
parseEntry.
- Specified by:
parseEntry
in interfacecom.googlecode.jcsv.reader.CSVEntryParser<T extends InteractionEvidence>
- Parameters:
data
- aString
object.- Returns:
- a T object.
-
getParserListener
public CsvParserListener getParserListener()
Getter for the field
parserListener
.- Returns:
- a
CsvParserListener
object.
-
setParserListener
public void setParserListener(CsvParserListener parserListener)
Setter for the field
parserListener
.- Parameters:
parserListener
- aCsvParserListener
object.
-
isStarted
public boolean isStarted()
isStarted.
- Returns:
- a boolean.
-
createParticipantEvidence
protected ParticipantEvidence createParticipantEvidence(String protein1, int protein1Index, String pepPos, int pepPos1Index, String linkedPos, int linkedPosIndex)
createParticipantEvidence.
- Parameters:
protein1
- aString
object.protein1Index
- a int.pepPos
- aString
object.pepPos1Index
- a int.linkedPos
- aString
object.linkedPosIndex
- a int.- Returns:
- a
ParticipantEvidence
object.
-
parseCrossLinkingFeatures
protected List<CsvRange> parseCrossLinkingFeatures(String pepPos, String linkedPos, int lineNumber, int pepColumnNumber, int linkedColumnNumber)
parseCrossLinkingFeatures.
-
parsePositions
protected List<CsvRange> parsePositions(String pos, int lineNumber, int colNumber)
parsePositions.
-
createParticipantEvidence
protected CsvParticipantEvidence createParticipantEvidence(CsvProtein csvProtein, int lineNumber, int columnNumber, CsvRange range)
createParticipantEvidence.
- Parameters:
csvProtein
- aCsvProtein
object.lineNumber
- a int.columnNumber
- a int.range
- aCsvRange
object.- Returns:
- a
CsvParticipantEvidence
object.
-
createCrossLinkFeatureEvidence
protected CsvFeatureEvidence createCrossLinkFeatureEvidence(CsvRange range)
createCrossLinkFeatureEvidence.
- Parameters:
range
- aCsvRange
object.- Returns:
- a
CsvFeatureEvidence
object.
-
createExperimentalParticipantPool
protected CsvExperimentalParticipantPool createExperimentalParticipantPool(List<CsvProtein> csvProteins, int lineNumber, int columnNumber, List<CsvRange> csvRanges)
createExperimentalParticipantPool.
- Parameters:
csvProteins
- aList
object.lineNumber
- a int.columnNumber
- a int.csvRanges
- aList
object.- Returns:
- a
CsvExperimentalParticipantPool
object.
-
createProteinsFromString
protected List<CsvProtein> createProteinsFromString(String protein1, int lineNumber, int columnNumber)
createProteinsFromString.
-
createProteinFromNameAndIdentifier
protected CsvProtein createProteinFromNameAndIdentifier(String protein, int lineNumber, int columnNumber)
createProteinFromNameAndIdentifier.
- Parameters:
protein
- aString
object.lineNumber
- a int.columnNumber
- a int.- Returns:
- a
CsvProtein
object.
-
instantiateInteractionEvidence
protected abstract T instantiateInteractionEvidence(int linePosition, String bait)
instantiateInteractionEvidence.
- Parameters:
linePosition
- a int.bait
- aString
object.- Returns:
- a T object.
-
processMismatchPeptidePositions
protected void processMismatchPeptidePositions(List<CsvRange> peptidePositions, List<CsvRange> linkedPositions)
processMismatchPeptidePositions.
-
processMismatchProteinPositions
protected void processMismatchProteinPositions(List<CsvRange> rangePositions, List<CsvProtein> proteins)
processMismatchProteinPositions.
-
processInvalidPosition
protected void processInvalidPosition(String message, FileSourceContext context)
processInvalidPosition.
- Parameters:
message
- aString
object.context
- aFileSourceContext
object.
-
processProteinIdentifiersError
protected void processProteinIdentifiersError(String[] identifiers, int lineNumber, int columnNumber)
processProteinIdentifiersError.
- Parameters:
identifiers
- an array ofString
objects.lineNumber
- a int.columnNumber
- a int.
-
processNoProtein1Error
protected void processNoProtein1Error(int lineNumber)
processNoProtein1Error.
- Parameters:
lineNumber
- a int.
-
-