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

spring.jobs.jobMobiDBLite-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="../persistence/persistence-config-context.xml"/>


    <!-- ######################## JOB: MobiDB ############################  -->

    <bean id="pathToMobiDBLiteBinary" class="java.lang.String">
        <constructor-arg value="${binary.mobidb.path}"/>
    </bean>

    <bean id="jobMobiDBLite" class="uk.ac.ebi.interpro.scan.management.model.Job">
        <property name="description" value="Prediction of disordered domains Regions in Proteins"/>
        <property name="analysis" value="true"/>
        <property name="libraryRelease" ref="signatureLibraryReleaseMobiDB"/>
        <!--Check mechanism for licensed binaries-->
        <property name="nonEmptyPaths">
            <list value-type="java.lang.String">
                <ref bean="pathToMobiDBLiteBinary"/>
            </list>
        </property>
        <property name="mandatoryParameters">
            <map key-type="java.lang.String" value-type="java.lang.String">
                <entry key="binary.mobidb.path" value-ref="pathToMobiDBLiteBinary"/>
            </map>
        </property>
        <property name="doRunLocally" value="false"/>
        <property name="active" value="true" />
    </bean>

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

    <!-- STEP 1 -->
    <bean id="stepMobiDBWriteFastaFile"
          class="uk.ac.ebi.interpro.scan.management.model.implementations.WriteFastaFileStep"
          parent="abstractMobiDBStep">
        <!-- 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="proteinDAO" ref="proteinDAO"/>
        <property name="serialGroup" value="WRITE_FASTA_MOBIDB"/>
    </bean>

    <!-- STEP 2 -->
    <bean id="stepMobiDBRunBinary"
          class="uk.ac.ebi.interpro.scan.management.model.implementations.mobidb.RunMobiDBBinaryStep"
          parent="abstractMobiDBStep">
        <!-- /ebi/sp/pro1/interpro/binaries/32_bit_Linux/nMobiDB -c -m /ebi/sp/pro1/interpro/data/members/MobiDB/2.2/new_coil.mat <  -->
        <property name="dependsUpon" ref="stepMobiDBWriteFastaFile"/>
        <property name="stepDescription" value="Run mobi-db Binary for selected proteins"/>
        <property name="fullPathToPython" value="${python3.command}"/>
        <property name="fullPathToBinary" value="${binary.mobidb.path}"/>
        <property name="fullPathToBinDirectory" value="${binary.mobidb.binx.path}"/>
        <property name="binarySwitches" value="${mobidb.binary.switches} ${mobidb.binary.cpu.switches}"/>
        <property name="outputFileNameTemplate" ref="rawAnalaysisOutputFileTemplate"/>
        <property name="fastaFileNameTemplate" ref="fastaFileNameTemplate"/>
        <property name="retries" value="3"/>
        <property name="requiresDatabaseAccess" value="false"/>

    </bean>

    <!-- STEP 3 -->

    <bean id="stepMobiDBStoreFilteredMatches"
          class="uk.ac.ebi.interpro.scan.management.model.implementations.mobidb.ParseMobiDBOutputStepV2"
          parent="abstractMobiDBStep">
        <property name="dependsUpon" ref="stepMobiDBRunBinary"/>
        <property name="stepDescription" value="Parse the MobiDB binary output and store as Filtered matches."/>

        <property name="outputFileTemplate" ref="rawAnalaysisOutputFileTemplate"/>
        <property name="filteredMatchDAO" ref="mobidbFilteredMatchDAO"/>
        <property name="parser">
            <bean class="uk.ac.ebi.interpro.scan.io.match.mobidb.MobiDBMatchParser">
                <property name="signatureLibraryRelease" ref="latestMobiDBSignatureLibraryRelease"/>
            </bean>
        </property>
        <property name="serialGroup" value="PARSE_MOBIDB"/>
    </bean>

    <!-- STEP 4 -->
    <bean id="stepMobiDBJobFiles"
          class="uk.ac.ebi.interpro.scan.management.model.implementations.DeleteFileStep"
          parent="abstractMobiDBStep">
        <property name="dependsUpon" ref="stepMobiDBStoreFilteredMatches"/>
        <property name="stepDescription"
                  value="Delete the fasta file and the raw output file following successful parsing and persistence"/>
        <property name="fileNameTemplate">
            <list>
                <ref bean="fastaFileNameTemplate"/>
                <ref bean="rawAnalaysisOutputFileTemplate"/>
            </list>
        </property>

    </bean>

    <!-- !!!!!!!!!!!!!!!!!!!!! JOB-END: MobiDB !!!!!!!!!!!!!!!!!!!!!!!!!!!!  -->
    <!-- ######################## Dependencies ############################  -->
    <bean id="mobidbFilteredMatchDAO" class="uk.ac.ebi.interpro.scan.persistence.MobiDBFilteredMatchDAO">
        <constructor-arg type="uk.ac.ebi.interpro.scan.model.SignatureLibraryRelease" ref="signatureLibraryReleaseMobiDB"/>
    </bean>

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

    <bean id="latestMobiDBSignatureLibraryRelease" class="java.lang.String">
        <constructor-arg value="${mobidb.signature.library.release}"/>
    </bean>

    <!-- !!!!!!!!!!!!!!!!!!!!! Dependencies-END !!!!!!!!!!!!!!!!!!!!!!!!!!!!  -->
</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy