An Alignment Analysis is defined in a dedicated directory under plugins root/plugins/analyses.

Configuration

The Alignment Analysis configuration is an XML file named config.xml that must follow these rules:

  1. the root element is named alignmentAnalysisConfig
  2. the XML document is valid against the XML Schema at plugins root/schemas/plugins.xsd

The file config.xml contains the following:

<alignmentAnalysisConfig>
  <name>A short name for this analysis</name>
  <id>MY_ANALYSIS_ID</id>
  <help>This message will appear on the web interface when users click on the question mark next to the task name.</help>
  <version>1.0</version>
  <analysisType>DiffExp or SequenceVariants or Methylation</analysisType>
  <minimumNumberOfGroups>AN INTEGER</minimumNumberOfGroups>
  <maximumNumberOfGroups>AN INTEGER</maximumNumberOfGroups>
  <supportsTranscriptAlignments>true or false</supportsTranscriptAlignments>
  <splitProcessCombine>true or false</splitProcessCombine>
  <producesTabDelimitedOutput>true or false</producesTabDelimitedOutput>
  <supportsGobyAlignments>true or false</supportsGobyAlignments>
  <copyAlignments>true or false</copyAlignments>
  <copyWeightFiles>true or false</copyWeightFiles>
    <files>
        <file>
            <id>MY_FILE_ID</id>
            <filename>MY FILENAME</filename>
        </file>
       <!-- other files-->
    </files>
    <runtime>
        <need scope="PROCESS or GLOBAL or COMBINE or SPLIT_JVM" key="MY_KEY" value="MY_VALUE"/>
       <!-- other needs-->
    </runtime>
    <execute>
        <script phase="pre-deployment" language="groovy or java " filename="FILENAME.groovy"/>
    </execute>
    <options>
        <option>
            <id>SOME_FLAG<id>
            <name>OPTION_NAME</name>
            <help>HELP TEXT</help>
            <required>true or false</required>
            <defaultsTo>.../defaultsTo>
            <type>STRING or BOOLEAN</type>
            <flagFormat>%s</flagFormat>
            <includeSpaces>true or false</includeSpaces>
            <autoFormat>true or false</autoFormat>
        </option>
       <!-- other options-->
    </options>
    <outputSchema>
        <outputFile>
            <id>ANY_ID</id>
            <name>Description</name>
            <required>true or false</required>
            <mimeType>A_VALID_MIME_TYPE</mimeType>
            <filename>FILENAME.EXT</filename>
            <help>Some text to display</help>
        </outputFile>
        <!-- other output files-->
    </outputSchema>
</alignmentAnalysisConfig>

The first part of the configuration reports the metadata common to all the plugins types (name, id, help, version).

The various elements that follow version define the behavior of the analysis regarding its input and output.

The requires section defines the dependencies against Resource plugins on which the analysis relies on.

The Files element lists a set of files available in the plugin’s directory that needs to be copied in the execution folder when the plugin is submitted as a job (typically these files are accessed from the script using the ${JOB_DIR} variable).

Runtime defines a set of “needs” (or requirements) that the aligner poses to the execution environment. Constraints against hardware and software characteristics go here.

The set of Options that are passed as input parameters to the plugins at execution time. Values assigned to these options are available as dynamic environment variables.

Finally, the last section defines the OutputSchema, i.e. the files that the analysis will produce after its execution.

Script

Task plugins are Executable plugins. As a such, the plugin’s developer must provide a Bash shell script, named script.sh. The script drives the execution of the plugin on a compute node.

An Alignment Analysis plugin may implement 4 functions. Not all of them must be provided, depending on the plugin’s own logic. For example, an analysis may not support parallelization: in this case, splitting and combination-related functions are not needed. Another example is when an analysis only needs to combine the input alignments: here only the combine function is requested.

This is a stub script for alignment analyses:

function plugin_alignment_analysis_split {
    #function implementation
}
function plugin_alignment_analysis_num_parts {
      #function implementation
}
function plugin_alignment_analysis_process {
    #function implementation
}
function plugin_alignment_analysis_combine {
     #function implementation
}