All Downloads are FREE. Search and download functionalities are using the official Maven repository.

spring.jobs.jobPanther-context.xml Maven / Gradle / Ivy

The newest version!
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans-4.2.xsd">

    <import resource="classpath:/spring/persistence/persistence-config-context.xml"/>

    <!-- ######################## JOB: PANTHER ############################  -->

    <bean id="jobPanther" class="uk.ac.ebi.interpro.scan.management.model.Job">
        <property name="description"
                  value="The PANTHER (Protein ANalysis THrough Evolutionary Relationships) Classification System is a unique resource that classifies genes by their functions, using published scientific experimental evidence and evolutionary relationships to predict function even in the absence of direct experimental evidence."/>
        <property name="analysis" value="true"/>
        <property name="libraryRelease" ref="signatureLibraryReleasePanther"/>
        <property name="nonEmptyPaths">
            <list value-type="java.lang.String">
                <ref bean="hmmerBinariesPath"/>
                <ref bean="pantherHMMPath"/>
                <ref bean="pantherNamesTab"/>
            </list>
        </property>
        <property name="mandatoryParameters">
            <map key-type="java.lang.String" value-type="java.lang.String">
                <entry key="binary.hmmer3.hmmsearch.path" value-ref="hmmerBinariesPath"/>
                <entry key="panther.hmm.path" value-ref="pantherHMMPath"/>
                <entry key="panther.names.tab" value-ref="pantherNamesTab"/>
            </map>
        </property>
    </bean>

    <!--Add path to (H)mmsearch binary-->
    <bean id="hmmerBinariesPath" class="java.lang.String">
        <constructor-arg value="${binary.hmmer3.path}"/>
    </bean>
    <bean id="pantherHMMPath" class="java.lang.String">
        <constructor-arg value="${panther.hmm.path}"/>
    </bean>
    <bean id="pantherNamesTab" class="java.lang.String">
        <constructor-arg value="${panther.names.tab}"/>
    </bean>

    <bean id="abstractPantherStep" abstract="true" class="uk.ac.ebi.interpro.scan.management.model.Step">
        <property name="job" ref="jobPanther"/>
        <property name="maxProteins" value="${analysis.max.sequence.count.PANTHER}"/>
        <property name="createStepInstancesForNewProteins" value="true"/>
        <property name="retries" value="0"/>
        <property name="nfsDelayMilliseconds" value="${nfs.delay.milliseconds}"/>
    </bean>

    <!-- STEP 1: Write FASTA file -->
    <bean id="stepPantherWriteFastaFile"
          class="uk.ac.ebi.interpro.scan.management.model.implementations.WriteFastaFileStep"
          parent="abstractPantherStep">
        <!-- This step has no dependencies, so will be scheduled first for its associated job. -->
        <property name="stepDescription" value="Create FASTA file."/>
        <property name="fastaFileNameTemplate" ref="fastaFileNameTemplate"/>
        <!--<property name="serialGroup"        value="WRITE_FASTA_FILE"/>-->
        <property name="proteinDAO" ref="proteinDAO"/>
    </bean>

    <!-- STEP 2 -->
    <bean id="stepPantherRunHmmer3"
          class="uk.ac.ebi.interpro.scan.management.model.implementations.hmmer.RunHmmerBinaryStep"
          parent="abstractPantherStep">
        <property name="dependsUpon" ref="stepPantherWriteFastaFile"/>
        <property name="stepDescription" value="Run HMMER 3 Binary for selected proteins"/>
        <property name="forceHmmsearch" value="${panther.hmmsearch.force}"/>
        <property name="fullPathToHmmScanBinary" value="${binary.hmmer3.hmmscan.path}"/>
        <property name="fullPathToHmmsearchBinary" value="${binary.hmmer3.hmmsearch.path}"/>
        <property name="binarySwitches" value="${hmmer3.hmmsearch.switches.panther} ${hmmer3.hmmsearch.cpu.switch.panther}"/>
        <property name="fullPathToHmmFile" value="${panther.hmm.path}"/>
        <property name="fastaFileNameTemplate" ref="fastaFileNameTemplate"/>
        <property name="retries" value="3"/>
        <property name="usesFileOutputSwitch" value="true"/>
        <property name="outputFileNameTemplate" ref="rawAnalaysisOutputFileTemplate"/>
        <property name="useTbloutFormat" value="false"/>
        <property name="useDomTbloutFormat" value="true"/>
        <property name="outputFileNameDomTbloutTemplate" ref="rawAnalaysisOutputDomTbloutFileTemplate"/>
        <property name="requiresDatabaseAccess" value="false"/>
    </bean>

    <!-- STEP 2: Run binary -->
    <bean id="stepPantherRunBinary"
          class="uk.ac.ebi.interpro.scan.management.model.implementations.panther.RunPantherScoreStep"
          parent="abstractPantherStep">
        <property name="dependsUpon" ref="stepPantherRunHmmer3"/>
        <property name="stepDescription" value="Run PANTHER binary for selected proteins"/>
        <property name="forceHmmsearch" value="${panther.hmmsearch.force}"/>
        <!--Add Perl command-->
        <property name="fullPathToPython" value="${python3.command}"/>
        <!--PantherScore python script-->
        <property name="fullPathToBinary" value="${binary.pantherscore.path}"/>
        <property name="binarySwitches" value="${pantherscore.binary.switches}"/>
        <property name="usesFileOutputSwitch" value="true"/>
        <property name="inputFilePantherFamilyNames" value="${panther.names.tab}"/>
        <property name="outputFileNameTemplate" ref="rawAnalaysisOutputOneFileTemplate"/>
        <property name="inputFileNameDomTbloutTemplate" ref="rawAnalaysisOutputDomTbloutFileTemplate"/>
        <property name="retries" value="3"/>
        <property name="requiresDatabaseAccess" value="false"/>

    </bean>

    <bean id="stepPantherDeleteFastaFile"
          class="uk.ac.ebi.interpro.scan.management.model.implementations.DeleteFileStep" parent="abstractPantherStep">
        <property name="dependsUpon" ref="stepPantherRunBinary"/>
        <property name="stepDescription" value="Delete the FASTA file following successful run"/>
        <property name="fileNameTemplate" ref="fastaFileNameTemplate"/>
        <property name="deleteWorkingDirectoryOnCompletion" value="${delete.temporary.directory.on.completion}"/>
    </bean>

    <!-- STEP 3: Parse and persist raw results -->
    <bean id="stepPantherParseOutput"
          class="uk.ac.ebi.interpro.scan.management.model.implementations.panther.PantherParseStep"
          parent="abstractPantherStep">
        <property name="dependsUpon" ref="stepPantherRunBinary"/>
        <property name="stepDescription" value="Parse the output from Panther"/>
        <property name="outputFileTemplate" ref="rawAnalaysisOutputOneFileTemplate"/>
        <property name="parser">
            <bean class="uk.ac.ebi.interpro.scan.io.match.panther.PantherMatchParser">
                <!--TODO: Figure out how to handle signature library release-->
                <constructor-arg ref="latestPantherSignatureLibraryRelease"/>
            </bean>
        </property>
        <property name="rawMatchDAO" ref="pantherRawMatchDAO"/>
        <property name="serialGroup" value="PARSE_PANTHER"/>
        <property name="retries" value="3"/>
    </bean>

    <bean id="stepPantherDeleteRawOutput"
          class="uk.ac.ebi.interpro.scan.management.model.implementations.DeleteFileStep"
          parent="abstractPantherStep">
        <property name="dependsUpon" ref="stepPantherParseOutput"/>
        <property name="stepDescription" value="Delete the analysis output file following successful parsing"/>
        <property name="fileNameTemplate" ref="rawAnalaysisOutputFileTemplate"/>
        <property name="deleteWorkingDirectoryOnCompletion" value="${delete.temporary.directory.on.completion}"/>
    </bean>

    <!-- STEP 4: Filter and persist filtered results -->
    <bean id="stepPantherPostProcessing"
          class="uk.ac.ebi.interpro.scan.management.model.implementations.panther.PantherPostProcessingStep"
          parent="abstractPantherStep">
        <property name="dependsUpon" ref="stepPantherParseOutput"/>
        <property name="stepDescription" value="Performs post processing and match persistence on Panther data"/>
        <property name="serialGroup" value="PANTHER_POST_PROCESSING"/>
        <property name="signatureLibraryRelease" ref="latestPantherSignatureLibraryRelease"/>
        <property name="postProcessor">
            <bean class="uk.ac.ebi.interpro.scan.business.postprocessing.panther.PantherPostProcessor">
                <!--TODO: Figure out how to handle this cut-off evalue-->
                <constructor-arg value="1e-11"/>
            </bean>
        </property>
        <property name="rawMatchDAO" ref="pantherRawMatchDAO"/>
        <property name="filteredMatchDAO">
            <bean class="uk.ac.ebi.interpro.scan.persistence.PantherFilteredMatchDAOImpl"/>
        </property>
        <property name="retries" value="3"/>
    </bean>

    <!-- ######################## Dependencies ############################  -->
    <bean id="pantherRawMatchDAO" class="uk.ac.ebi.interpro.scan.persistence.raw.PantherRawMatchDAOImpl"/>

    <bean id="signatureLibraryReleasePanther" class="uk.ac.ebi.interpro.scan.model.SignatureLibraryRelease">
        <constructor-arg type="uk.ac.ebi.interpro.scan.model.SignatureLibrary" value="PANTHER"/>
        <constructor-arg type="java.lang.String" ref="latestPantherSignatureLibraryRelease"/>
    </bean>

    <bean id="latestPantherSignatureLibraryRelease" class="java.lang.String">
        <constructor-arg value="${panther.signature.library.release}"/>
    </bean>
    <!-- !!!!!!!!!!!!!!!!!!!!! Dependencies-END !!!!!!!!!!!!!!!!!!!!!!!!!!!!  -->
</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy