Class AbstractCsvInteractionEvidenceParser<T extends InteractionEvidence>

  • 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 Detail

      • AbstractCsvInteractionEvidenceParser

        public AbstractCsvInteractionEvidenceParser()
    • Method Detail

      • parseEntry

        public T parseEntry​(String... data)

        parseEntry.

        Specified by:
        parseEntry in interface com.googlecode.jcsv.reader.CSVEntryParser<T extends InteractionEvidence>
        Parameters:
        data - a String object.
        Returns:
        a T object.
      • setParserListener

        public void setParserListener​(CsvParserListener parserListener)

        Setter for the field parserListener.

        Parameters:
        parserListener - a CsvParserListener 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 - a String object.
        protein1Index - a int.
        pepPos - a String object.
        pepPos1Index - a int.
        linkedPos - a String object.
        linkedPosIndex - a int.
        Returns:
        a ParticipantEvidence object.
      • parseCrossLinkingFeatures

        protected List<CsvRange> parseCrossLinkingFeatures​(String pepPos,
                                                           String linkedPos,
                                                           int lineNumber,
                                                           int pepColumnNumber,
                                                           int linkedColumnNumber)

        parseCrossLinkingFeatures.

        Parameters:
        pepPos - a String object.
        linkedPos - a String object.
        lineNumber - a int.
        pepColumnNumber - a int.
        linkedColumnNumber - a int.
        Returns:
        a List object.
      • parsePositions

        protected List<CsvRange> parsePositions​(String pos,
                                                int lineNumber,
                                                int colNumber)

        parsePositions.

        Parameters:
        pos - a String object.
        lineNumber - a int.
        colNumber - a int.
        Returns:
        a List object.
      • createProteinsFromString

        protected List<CsvProtein> createProteinsFromString​(String protein1,
                                                            int lineNumber,
                                                            int columnNumber)

        createProteinsFromString.

        Parameters:
        protein1 - a String object.
        lineNumber - a int.
        columnNumber - a int.
        Returns:
        a List object.
      • createProteinFromNameAndIdentifier

        protected CsvProtein createProteinFromNameAndIdentifier​(String protein,
                                                                int lineNumber,
                                                                int columnNumber)

        createProteinFromNameAndIdentifier.

        Parameters:
        protein - a String 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 - a String object.
        Returns:
        a T object.
      • processMismatchPeptidePositions

        protected void processMismatchPeptidePositions​(List<CsvRange> peptidePositions,
                                                       List<CsvRange> linkedPositions)

        processMismatchPeptidePositions.

        Parameters:
        peptidePositions - a List object.
        linkedPositions - a List object.
      • processMismatchProteinPositions

        protected void processMismatchProteinPositions​(List<CsvRange> rangePositions,
                                                       List<CsvProtein> proteins)

        processMismatchProteinPositions.

        Parameters:
        rangePositions - a List object.
        proteins - a List object.
      • processProteinIdentifiersError

        protected void processProteinIdentifiersError​(String[] identifiers,
                                                      int lineNumber,
                                                      int columnNumber)

        processProteinIdentifiersError.

        Parameters:
        identifiers - an array of String objects.
        lineNumber - a int.
        columnNumber - a int.
      • processNoProtein1Error

        protected void processNoProtein1Error​(int lineNumber)

        processNoProtein1Error.

        Parameters:
        lineNumber - a int.
      • initialiseColumnNames

        public void initialiseColumnNames​(List<String> data)

        initialiseColumnNames.

        Parameters:
        data - a List object.