<?xml version="1.0" encoding="UTF-8"?>
<plugin
  name="%pluginName"
  id="ru.biosoft.analysis"
  version="0.8.6"  
  provider-name="%providerName"
>
  
  <requires>
    <import plugin="com.beanexplorer"/>
    <import plugin="org.apache.log4j"/>
    <import plugin="ru.biosoft.access"/>
    <import plugin="ru.biosoft.table"/>
    <import plugin="ru.biosoft.math"/>
    <import plugin="ru.biosoft.workbench"/>
    <import plugin="com.developmentontheedge.util"/>
    <import plugin="org.mozilla.javascript"/>
    <import plugin="ru.biosoft.plugins.javascript"/>
    <import plugin="jama"/> 
    <import plugin="edu.uah.math"/>
  </requires>
  
  <runtime>
    <library name="analysis.jar">
      <export name="*"/>
    </library>
  </runtime>
  
  <extension point="ru.biosoft.workbench.visiblePlugin">
  <visiblePlugin name="Methods" class="ru.biosoft.analysis.AnalysisMethodRegistry" displayName="methods" description="" /> 
  </extension>
  
  <!--<extension id="microarray view" point="biouml.workbench.diagramViewPart"> 
      <diagramViewPart 
        class="biouml.plugins.microarray.MicroarrayViewPart"
        Name="Microarray"
        ShortDescription="Microarray pane"
      /> 
  </extension> 
  
  <extension id="microarray columns" point="biouml.workbench.diagramViewPart"> 
      <diagramEditorPart 
        class="biouml.plugins.microarray.editors.ColumnsViewPart" 
        Name="Columns"
        ShortDescription="Columns"
        Priority = "1.1"
      /> 
  </extension>
  
  <extension id="microarray filters" point="biouml.workbench.diagramViewPart"> 
      <diagramEditorPart 
        class="biouml.plugins.microarray.editors.FilterViewPart" 
        Name="Filters"
        ShortDescription="Filters"
        Priority = "1.4"
      /> 
  </extension>
  
  <extension id="microarray samples" point="biouml.workbench.diagramViewPart"> 
      <diagramEditorPart 
        class="biouml.plugins.microarray.editors.SamplesViewPart" 
        Name="Samples"
        ShortDescription="Samples"
        Priority = "1.2"
      /> 
  </extension>
  
  <extension id="microarray sample groups" point="biouml.workbench.diagramViewPart"> 
      <diagramEditorPart 
        class="biouml.plugins.microarray.editors.GroupsViewPart" 
        Name="Groups"
        ShortDescription="Groups"
        Priority = "1.3"
      /> 
  </extension>

  <extension id="SifImporter" point="biouml.workbench.diagramImport"> 
     <import 
        format="SIF"
        importer="biouml.plugins.microarray.SifImporter"
        description="Import SIF diagram"
     /> 
  </extension>

  <extension id="table document factory" point="ru.biosoft.workbench.documentFactory"> 
      <documentFactory 
        class="biouml.plugins.microarray.document.TableFactory"
        key="TableFactory"
      /> 
  </extension>-->
  
  <extension id="microarray" point="ru.biosoft.plugins.javascript.hostObject"> 
    <hostObject name="microarray" class=" ru.biosoft.analysis.javascript.JavaScriptAnalysis" >
        <doc description="Facade for data-manipulations">
        <function name="hypergeom" description="Performs hypergemotrical analysis of TableDataCollectiont">
            <argument name="experiment" type="ru.biosoft.access.TableDataCollectiont" obligatory="true" description="experiment for analysis" /> 
            <argument name="outputName" type="String" obligatory="true" description="name for output TableExperiment" /> 
            <argument name="outputType" type="String" obligatory="true" description="type for output data. Can be 'up', 'down' and 'all' " /> 
            <argument name="columns" type="String" obligatory="true" description="columns to include in analysis. Example of usage: '1,3,5,6-8,Column10,Groupname5'" /> 
            <argument name="control" type="String" obligatory="true" description="control group, will be avereged. Example of usage: '1,3,5,6-8,Column10,Groupname5'" /> 
            <argument name="pvalue" type="double" obligatory="true" description="threshold for output data (will be outputed only scores with lesser P-value)" /> 
            <argument name="bv" type="int" obligatory="true" description="boundary value, analysis checks if genes expressions deviates from bv because of random reasons" /> 
            <argument name="isDetailed" type="boolean" obligatory="true" description="if true output detalied information about clones else output brief information about genes" /> 
             <argument name="threshold" type = "double" obligatory="true" description = "threshold for values in input table. Values which are smaller then threshold vill be replaced by it"/>
            <argument name="isCalculatedFDR" type="boolean" obligatory="true" description="if true also calculates False Discovery Rate" />
            <returns type="TableDataCollectiont" description="Contains scores for genes (positive scores means up regulated genes, negative - down)" /> 
         </function>
         
         <function name="hypergeom1" description="Performs hypergemotrical analysis of TableExperiment. Most parameters are set by default: P-value=0.01, bv=1, outputType='all', isDetailed=false, isCalculatingFDR=false, threshold=-9999">
            <argument name="experiment" type="ru.biosoft.access.TableDataCollectiont" obligatory="true" description="experiment for analysis" /> 
            <argument name="outputName" type="String" obligatory="true" description="name for output TableExperiment" /> 
            <returns type="TableExperiment" description="Contains scores" /> 
         </function>

        <function name="meta" description="Performs meta-analysis of TableDataCollection">
            <argument name="outputName" type="String" obligatory="true" description="name for output TableDataCollectiont" /> 
            <argument name="outputType" type="String" obligatory="true" description="type for genes in output. Can be 'up', 'down' and 'all' " /> 
            <argument name="pvalue" type="double" obligatory="true" description="threshold for output data (will be outputed only scores with lesser P-value)" />
             <argument name="threshold" type = "double" obligatory="true" description = "threshold for values in input table. Values which are smaller then threshold vill be replaced by it"/>
            <argument name="tableDataCollections" type="TableDataCollection..." obligatory="true" description="list of tables for analysis can be of any length. Example: Table1,Table2,Table3" />  
            <returns type="TableDataCollectiont" description="TableDataCOllection which contains metascores" /> 
         </function>
         
         <function name="meta1" description="Performs meta-analysis of TableDataCollection with default P-value 0.01 and threshold=-9999" >
            <argument name="outputName" type="String" obligatory="true" description="name for output TableDataCollectiont" /> 
            <argument name="outputType" type="String" obligatory="true" description="type for genes in output. Can be 'up', 'down' and 'all' " /> 
            <argument name="pvalue" type="double" obligatory="true" description="threshold for output data (will be outputed only scores with lesser P-value)" />
            <argument name="tableDataCollections" type="TableDataCollection..." obligatory="true" description="list of tables for analysis can be of any length. Example: Table1,Table2,Table3" />  
            <returns type="TableDataCollectiont" description="TableDataCOllection which contains metascores" /> 
         </function>
         
         <function name="twoSample" description="Performs degenerate hypergeometric analysis of only one column from TableExperiment">
             <argument name="experiment" type="ru.biosoft.access.TableDataCollectiont" obligatory="true" description="experiment for analysis" /> 
            <argument name="outputName" type="String" obligatory="true" description="name for output TableExperiment" /> 
            <argument name="outputType" type="String" obligatory="true" description="Type for genes in output. Can be 'up', 'down' and 'all' " /> 
            <argument name="column" type="String" obligatory="true" description="column to include in analysis. Must contain only one column. Examples of usage: '1','Column10','Groupname5'" /> 
            <argument name="control" type="String" obligatory="true" description="control group for analysis. Example of usage: '1,3,5,6-8,Column10,Groupname5'" /> 
            <argument name="pvalue" type="double" obligatory="true" description="threshold for output data (will be outputed only scores with lesser P-value)" />  
             <argument name="threshold" type = "double" obligatory="true" description = "threshold for values in input table. Values which are smaller then threshold vill be replaced by it"/>
            <argument name="isCalculatedFDR" type="boolean" obligatory="true" description="if true also calculates False Discovery Rate" /> 
            <returns type="TableExperiment" description="contains scores" /> 
         </function>
         
          <function name="twoSample1" description="Performs degenerate hypergeometric analysis of TableDataCollection (only one column) with P-value 0.01">
             <argument name="experiment" type="ru.biosoft.access.TableDataCollectiont" obligatory="true" description="experiment for analysis" /> 
            <argument name="outputName" type="String" obligatory="true" description="name for output TableExperiment" /> 
            <argument name="outputType" type="String" obligatory="true" description="type for genes in output. Can be 'up', 'down' and 'all' " /> 
            <returns type="TableExperiment" description="contains scores" /> 
         </function>

         <function name="polynomRegress" description="Performs polynomial regression analysis of TableDataCollection">
             <argument name="experiment" type="ru.biosoft.access.TableDataCollectiont" obligatory="true" description="experiment for analysis" /> 
            <argument name="outputName" type="String" obligatory="true" description="name for output TableExperiment" /> 
            <argument name="columns" type="String" obligatory="true" description="columns to include in analysis. Example of usage: '1,3,5,6-8,Column10,Groupname5'" /> 
            <argument name="timePoints" type="String" obligatory="true" description="time points for regression. Amount of time points must be equal to amount of columns. Example: '2,4,6,8,10,12'" />]
            <argument name="regressionPower" type="int" obligatory="true" description="power of calculated regression must be positive integer" /> 
            <argument name="pvalue" type="double" obligatory="true" description="threshold for output data (will be outputed only scores with lesser P-value)" />  
            <argument name="threshold" type = "double" obligatory="true" description = "threshold for values in input table. Values which are smaller then threshold vill be replaced by it"/>
            <argument name="isCalculatedFDR" type="boolean" obligatory="true" description="if true also calculates False Discovery Rate" /> 
            <returns type="TableExperiment" description="contains scores and regression parameters" /> 
         </function>
         
          <function name="shiftedRegress" description="Performs shifted linear regression analysis of TableDataCollection. Building regression: Y(t) = a+b*X(t+shift) where X is regulator">
             <argument name="experiment" type="ru.biosoft.access.TableDataCollectiont" obligatory="true" description="experiment for analysis" /> 
            <argument name="outputName" type="String" obligatory="true" description="name for output TableExperiment" /> 
            <argument name="columns" type="String" obligatory="true" description="columns to include in analysis. Example of usage: '1,3,5,6-8,Column10,Groupname5'" /> 
            <argument name="timePoints" type="String" obligatory="true" description="time points for regression. Amount of time points must be equal to amount of columns. Example: '2,4,6,8,10,12'" />
            <argument name="regulatorColumns" type="String" obligatory="true" description="columns for regulator element to include in analysis. Example of usage: '1,3,5,6-8,Column10,Groupname5'" /> 
            <argument name="regulatorTimePoints" type="String" obligatory="true" description="time points for regulator. Amount of time points must be equal to amount of columns for regulator. Example: '2,4,6,8,10,12'" />
             <argument name="regulatorID" type="String" obligatory="true" description="ID from table for regulator. This element will be used as regulator" />
            <argument name="pvalue" type="double" obligatory="true" description="threshold for output data (will be outputed only scores with lesser P-value)" />  
             <argument name="threshold" type = "double" obligatory="true" description = "threshold for values in input table. Values which are smaller then threshold vill be replaced by it"/>
            <argument name="isCalculatedFDR" type="boolean" obligatory="true" description="if true also calculates False Discovery Rate" /> 
            <returns type="TableExperiment" description="contains scores,regression parameters and optimal shift" /> 
         </function>

         
          <function name="student" description="Performs student analysis of TableDataCollection">
             <argument name="experiment" type="ru.biosoft.access.TableDataCollectiont" obligatory="true" description="experiment for analysis" /> 
            <argument name="outputName" type="String" obligatory="true" description="name for output TableExperiment" /> 
            <argument name="columns1" type="String" obligatory="true" description="first group of columns to include in analysis. Example of usage: '1,3,5,6-8,Column10,Groupname5'" /> 
            <argument name="columns1" type="String" obligatory="true" description="second group of columns to include in analysis. Example of usage: '1,3,5,6-8,Column10,Groupname5'" /> 
            <argument name="pvalue" type="double" obligatory="true" description="threshold for output data (will be outputed only scores with lesser P-value)" />  
             <argument name="threshold" type = "double" obligatory="true" description = "threshold for values in input table. Values which are smaller then threshold vill be replaced by it"/>
            <argument name="isCalculatedFDR" type="boolean" obligatory="true" description="If true also calculates False Discovery Rate" /> 
            <returns type="TableExperiment" description="Contains scores" /> 
         </function>
         
         <function name="student1" description="Performs student analysis of TableDataCollection with P-value 0.01 and threshold -9999">
             <argument name="experiment" type="ru.biosoft.access.TableDataCollectiont" obligatory="true" description="experiment for analysis" /> 
            <argument name="outputName" type="String" obligatory="true" description="name for output TableExperiment" /> 
            <argument name="columns1" type="String" obligatory="true" description="first group of columns to include in analysis. Example of usage: '1,3,5,6-8,Column10,Groupname5'" /> 
            <argument name="columns1" type="String" obligatory="true" description="second group of columns to include in analysis. Example of usage: '1,3,5,6-8,Column10,Groupname5'" /> 
            <returns type="TableExperiment" description="Contains scores" /> 
         </function>
 
        <function name="simple" description="Calculates simple statistics such as mean value, variance and correlation of columns">
             <argument name="experiment" type="ru.biosoft.access.TableDataCollectiont" obligatory="true" description="experiment for analysis" /> 
           <argument name="outputName" type="String" obligatory="true" description="name for output TableExperiment" /> 
            <argument name="columns" type="String" obligatory="true" description="columns for analysis. Example of usage: '1,3,5,6-8,Column10,Groupname5'" /> 
            <returns type="TableExperiment" description="Contains scores" /> 
         </function>
          </doc>
      </hostObject>
  </extension>  
  
  <extension-point name="method" id="method"/>
  
  <extension id="HypergeometricAnalysis" point="ru.biosoft.analysis.method"> 
      <analysisClass class="ru.biosoft.analysis.HypergeometricAnalysis" group="Statistics" name="Hypergeometric analysis" description="ru/biosoft/analysis/resources/Hyper.html"/> 
  </extension>
  
  <extension id="Meta analysis" point="ru.biosoft.analysis.method"> 
      <analysisClass class="ru.biosoft.analysis.MetaAnalysis" group="Statistics" name="Meta analysis"  description="%meta.descr"/> 
  </extension>
  
  <extension id="TwoSamples analysis" point="ru.biosoft.analysis.method"> 
      <analysisClass class="ru.biosoft.analysis.TwoSamplesAnalysis" group="Statistics" name="TwoSamples analysis"  description="%twosamples.descr"/> 
  </extension>
  
  <extension id="Polynomial Regression analysis" point="ru.biosoft.analysis.method"> 
      <analysisClass class="ru.biosoft.analysis.PolynomialRegressionAnalysis" group="Statistics" name="Polynomial Regression analysis"  description="ru/biosoft/analysis/resources/Poly.html"/> 
  </extension>
  
    <extension id="Shifted Regression analysis" point="ru.biosoft.analysis.method"> 
      <analysisClass class="ru.biosoft.analysis.ShiftedRegressionAnalysis" group="Statistics" name="Shifted Regression analysis"  description="ru/biosoft/analysis/resources/ShiftedRegress.html"/> 
  </extension>
  
  <extension id="Student analysis" point="ru.biosoft.analysis.method"> 
      <analysisClass class="ru.biosoft.analysis.StudentAnalysis" group="Statistics" name="Student analysis"  description="ru/biosoft/analysis/resources/Student.html"/> 
  </extension>
  
    <extension id="Wilkokson analysis" point="ru.biosoft.analysis.method"> 
      <analysisClass class="ru.biosoft.analysis.WilkoksonAnalysis" group="Statistics" name="Wilkokson analysis"  description="ru/biosoft/analysis/resources/Wilkokson.html"/> 
  </extension>
  
  <extension id="Kolmogorov analysis" point="ru.biosoft.analysis.method"> 
      <analysisClass class="ru.biosoft.analysis.KolmogorovAnalysis" group="Statistics" name="Kolmogorov analysis"  description="ru/biosoft/analysis/resources/Kolmogorov.html"/> 
  </extension>
  
  <extension id="Correlation analysis" point="ru.biosoft.analysis.method"> 
      <analysisClass class="ru.biosoft.analysis.SimpleStatisticsAnalysis" group="Statistics" name="Simple Statistics Analysis"  description="%simple.descr"/> 
  </extension>
  
  <extension id="LehmannRosenblatt analysis" point="ru.biosoft.analysis.method"> 
      <analysisClass class="ru.biosoft.analysis.LehmannRosenblattAnalysis" group="Statistics" name="LehmannRosenblatt analysis"  description="ru/biosoft/analysis/resources/LehmannRosenblatt.html"/> 
  </extension>
  
    <extension id="Join table" point="ru.biosoft.analysis.method"> 
      <analysisClass class="ru.biosoft.analysis.JoinTable" group="Data" name="Join table"  description="%join.descr"/> 
  </extension>
   
</plugin>
