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

spring.jobs.jobSignalP_EUK-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: SignalP ############################  -->
    <bean id="jobSignalP_EUK" class="uk.ac.ebi.interpro.scan.management.model.Job">
        <property name="description"
                  value="SignalP (organism type eukaryotes) predicts the presence and location of signal peptide cleavage sites in amino acid sequences for eukaryotes."/>
        <property name="analysis" value="true"/>
        <property name="libraryRelease" ref="signatureLibraryReleaseSignalp_EUK"/>
        <property name="nonEmptyPaths">
            <list value-type="java.lang.String">
                <ref bean="fullPathToSignalPBinary"/>
            </list>
        </property>
        <property name="mandatoryParameters">
            <map key-type="java.lang.String" value-type="java.lang.String">
                <entry key="binary.signalp.path" value-ref="fullPathToSignalPBinary"/>
            </map>
        </property>
        <property name="doRunLocally" value="false"/>
    </bean>

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

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

    <!-- STEP: Prepare FASTA file for SignalP binary -->
    <bean id="stepSignalPEukWriteFastaFile"
          class="uk.ac.ebi.interpro.scan.management.model.implementations.WriteFastaFileStep"
          parent="abstractSignalPEukStep">
        <!-- 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"/>
        <property name="serialGroup" value="WRITE_FASTA_SIGNALP_EUK"/>
    </bean>

    <!--
    Note:
    SignalP can be ran in one of 3 modes, depending on whether we are dealing with Gram-positive prokaryotes,
    Gram-negative prokaryotes or eukaryotes. If the user doesn't know the organism type of the input FASTA sequence(s)
    it would be advisable to run SignalP in all 3 modes and analyse the results.

    Example command line:
    ./signalp -t euk -f summary -c 70 test/euk10.fsa
    -->

    <!-- STEP: Runs the SignalP Perl script to check if the -T option is available or unknown-->
    <bean id="stepSignalPEukTempOptionCheck"
          class="uk.ac.ebi.interpro.scan.management.model.implementations.signalp.RunSignalPTempOptionCheckStep"
          parent="abstractSignalPEukStep">
        <property name="dependsUpon" ref="stepSignalPEukWriteFastaFile"/>
        <property name="stepDescription"
                  value="Runs SignalP Perl script with the -T option to check if it is an unknown option"/>
        <property name="retries" value="3"/>
        <property name="perlCommand" value="${perl.command}"/>
        <property name="outputFileNameTemplate" ref="tempOptionCheckOutputFileTemplate"/>
        <property name="fullPathToSignalPBinary" ref="fullPathToSignalPBinary"/>
        <property name="requiresDatabaseAccess" value="false"/>
    </bean>

    <!-- STEP: Run the SignalP binary in eukaryote mode -->
    <bean id="stepSignalPEukRunBinary"
          class="uk.ac.ebi.interpro.scan.management.model.implementations.signalp.RunSignalPBinaryStep"
          parent="abstractSignalPEukStep">
        <property name="dependsUpon" ref="stepSignalPEukTempOptionCheck"/>
        <property name="stepDescription"
                  value="Run SignalP binary for selected proteins with organism type set to euk"/>
        <property name="binarySwitches" value="${signalp.euk.binary.switches}"/>
        <property name="retries" value="3"/>
        <property name="perlCommand" value="${perl.command}"/>
        <property name="outputFileNameTemplate" ref="rawAnalaysisOutputFileTemplate"/>
        <property name="fastaFileNameTemplate" ref="fastaFileNameTemplate"/>
        <property name="fullPathToSignalPBinary" ref="fullPathToSignalPBinary"/>
        <!--Path to a Perl library directory (in this case a Perl library provided by SignalP which is necessary to run the script)-->
        <property name="perlLibrary" value="${signalp.perl.library.dir}"/>
        <property name="tempOptionCheckOutputFileTemplate" ref="tempOptionCheckOutputFileTemplate"/>
        <property name="parser">
            <bean class="uk.ac.ebi.interpro.scan.io.signalp.SignalPTempOptionParser">
                <property name="tempOptionLine" value="-T   Specify temporary file directory. Default: /tmp"/>
            </bean>
        </property>
        <property name="requiresDatabaseAccess" value="false"/>
    </bean>

    <!-- STEP: Parse the SignalP binary output and persist the results in the database. No post processing required. -->
    <bean id="stepSignalPEukParseAndPersistOutput"
          class="uk.ac.ebi.interpro.scan.management.model.implementations.signalp.ParseAndPersistBinaryOutputStep"
          parent="abstractSignalPEukStep">
        <property name="dependsUpon" ref="stepSignalPEukRunBinary"/>
        <property name="stepDescription"
                  value="Parse the output from the SignalP binary and persist as filtered matches"/>
        <property name="serialGroup" value="PARSE_SIGNALP"/>
        <property name="retries" value="3"/>
        <property name="signalPBinaryOutputFileName" ref="rawAnalaysisOutputFileTemplate"/>
        <property name="rawMatchDAO">
            <bean class="uk.ac.ebi.interpro.scan.persistence.SignalPFilteredMatchDAOImpl">
                <constructor-arg ref="latestSignalPEukSignatureLibraryRelease"/>
            </bean>
        </property>
        <property name="parser">
            <bean class="uk.ac.ebi.interpro.scan.io.signalp.match.SignalPMatchParser">
                <constructor-arg value="euk"/>
                <constructor-arg ref="signatureLibraryReleaseSignalp_EUK"/>
            </bean>
        </property>
    </bean>

    <!-- STEP: Remove temporary files (CAN'T remove temporary directory as there could be multiple threads
               writing to the directory at the same time) -->
    <bean id="stepSignalPEukDeleteTempFiles"
          class="uk.ac.ebi.interpro.scan.management.model.implementations.DeleteFileStep"
          parent="abstractSignalPEukStep">
        <property name="dependsUpon" ref="stepSignalPEukParseAndPersistOutput"/>
        <property name="stepDescription"
                  value="Delete the remaining temporary files following successful parsing and persistence"/>
        <property name="fileNameTemplate">
            <list>
                <ref bean="fastaFileNameTemplate"/>
                <ref bean="rawAnalaysisOutputFileTemplate"/>
                <ref bean="tempOptionCheckOutputFileTemplate"/>
            </list>
        </property>
    </bean>
    <!-- !!!!!!!!!!!!!!!!!!!!! JOB-END: SignalP !!!!!!!!!!!!!!!!!!!!!!!!!!!!  -->

    <!-- ######################## Dependencies ############################  -->

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

    <bean id="tempOptionCheckOutputFileTemplate" class="java.lang.String">
        <constructor-arg value="[PROTSTART]_[PROTEND].temp.option.check.out"/>
    </bean>

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

    <!-- !!!!!!!!!!!!!!!!!!!!! Dependencies-END !!!!!!!!!!!!!!!!!!!!!!!!!!!!  -->


</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy