-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
378 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
.idea | ||
target | ||
*.iml | ||
/.classpath | ||
/.project | ||
/.settings | ||
/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,89 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>ca.tom</groupId> | ||
<artifactId>testPlugin</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<groupId>ca.tom</groupId> | ||
<artifactId>example-plugin</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>ca.corefacility.bioinformatics</groupId> | ||
<artifactId>irida</artifactId> | ||
<version>0.23.0-SNAPSHOT</version> | ||
<classifier>classes</classifier> | ||
</dependency> | ||
<!-- Please fill out these properties with information about your particular plugin --> | ||
<properties> | ||
<plugin.id>example-plugin</plugin.id> | ||
<plugin.class>ca.corefacility.bioinformatics.irida.plugins.ExamplePlugin</plugin.class> | ||
<plugin.version>0.1.0</plugin.version> | ||
<plugin.provider>Aaron Petkau</plugin.provider> | ||
<plugin.dependencies></plugin.dependencies> | ||
<plugin.requires>1.0.0</plugin.requires> | ||
|
||
<dependency> | ||
<groupId>org.pf4j</groupId> | ||
<artifactId>pf4j</artifactId> | ||
<version>2.3.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
<!-- The version of IRIDA your plugin must be compiled against. --> | ||
<irida.version>0.23.0-SNAPSHOT</irida.version> | ||
|
||
<!-- Version of the pf4j dependency --> | ||
<pf4j.version>2.4.0</pf4j.version> | ||
|
||
<build> | ||
<plugins> | ||
<!-- Maven compiler plugin --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.1</version> | ||
<configuration> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
<forceJavacCompilerUse>true</forceJavacCompilerUse> | ||
</configuration> | ||
</plugin> | ||
<!-- Version of Java to target for this plugin --> | ||
<java.version>1.8</java.version> | ||
</properties> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<dependencies> | ||
<dependency> | ||
<groupId>ca.corefacility.bioinformatics</groupId> | ||
<artifactId>irida</artifactId> | ||
<version>${irida.version}</version> | ||
<classifier>classes</classifier> | ||
</dependency> | ||
|
||
<configuration> | ||
<archive> | ||
<manifestEntries> | ||
<Plugin-Class>ca.corefacility.bioinformatics.irida.ExamplePlugin</Plugin-Class> | ||
<Plugin-Dependencies></Plugin-Dependencies> | ||
<Plugin-Id>plugin-example</Plugin-Id> | ||
<Plugin-Provider>Tom Matthews</Plugin-Provider> | ||
<Plugin-Version>0.0.1</Plugin-Version> | ||
</manifestEntries> | ||
</archive> | ||
</configuration> | ||
</plugin> | ||
<dependency> | ||
<groupId>org.pf4j</groupId> | ||
<artifactId>pf4j</artifactId> | ||
<version>${pf4j.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<version>2.6</version> | ||
<configuration> | ||
<descriptorRefs> | ||
<descriptorRef>jar-with-dependencies</descriptorRef> | ||
</descriptorRefs> | ||
</configuration> | ||
</plugin> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.1</version> | ||
<configuration> | ||
<source>${java.version}</source> | ||
<target>${java.version}</target> | ||
<forceJavacCompilerUse>true</forceJavacCompilerUse> | ||
</configuration> | ||
</plugin> | ||
|
||
</plugins> | ||
|
||
|
||
</build> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
|
||
<configuration> | ||
<archive> | ||
<manifestEntries> | ||
<Plugin-Class>${plugin.class}</Plugin-Class> | ||
<Plugin-Dependencies>${plugin.dependencies}</Plugin-Dependencies> | ||
<Plugin-Id>${plugin.id}</Plugin-Id> | ||
<Plugin-Provider>${plugin.provider}</Plugin-Provider> | ||
<Plugin-Version>${plugin.version}</Plugin-Version> | ||
<Plugin-Requires>${plugin.requires}</Plugin-Requires> | ||
</manifestEntries> | ||
</archive> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<version>2.6</version> | ||
<configuration> | ||
<descriptorRefs> | ||
<descriptorRef>jar-with-dependencies</descriptorRef> | ||
</descriptorRefs> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
58 changes: 0 additions & 58 deletions
58
src/main/java/ca/corefacility/bioinformatics/irida/ExamplePlugin.java
This file was deleted.
Oops, something went wrong.
76 changes: 76 additions & 0 deletions
76
src/main/java/ca/corefacility/bioinformatics/irida/plugins/ExamplePlugin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
package ca.corefacility.bioinformatics.irida.plugins; | ||
|
||
import java.awt.Color; | ||
import java.util.Optional; | ||
import java.util.UUID; | ||
|
||
import org.pf4j.Extension; | ||
import org.pf4j.Plugin; | ||
import org.pf4j.PluginWrapper; | ||
|
||
import ca.corefacility.bioinformatics.irida.model.workflow.analysis.type.AnalysisType; | ||
import ca.corefacility.bioinformatics.irida.plugins.IridaPlugin; | ||
|
||
/** | ||
* An example {@link IridaPlugin} implementation | ||
*/ | ||
public class ExamplePlugin extends Plugin { | ||
|
||
public ExamplePlugin(PluginWrapper wrapper) { | ||
super(wrapper); | ||
} | ||
|
||
@Extension | ||
public static class PluginInfo implements IridaPlugin { | ||
|
||
/*************************************************************************************** | ||
* Required methods | ||
* | ||
* These methods are required to be overridden when implementing a pipeline as a plugin. | ||
***************************************************************************************/ | ||
|
||
/** | ||
* Gets the particular {@link AnalysisType} object for this workflow. | ||
* This should correspond to the <strong>analysisType</strong> entry in the <strong>irida_workflow.xml</strong> file. | ||
* | ||
* <pre>{@code <analysisType>FIRST_LINES</analysisType>}</pre> | ||
*/ | ||
@Override | ||
public AnalysisType getAnalysisType() { | ||
return new AnalysisType("FIRST_LINES"); | ||
} | ||
|
||
/** | ||
* Gets the particular workflow id. | ||
* This should correspond to the <strong>id</strong> entry in the <strong>irida_workflow.xml</strong> file. | ||
* | ||
* <pre>{@code <id>c07a0d4c-fb53-4183-8ded-298f8a4decca</id>}</pre> | ||
*/ | ||
@Override | ||
public UUID getDefaultWorkflowUUID() { | ||
return UUID.fromString("c07a0d4c-fb53-4183-8ded-298f8a4decca"); | ||
} | ||
|
||
/********************************************************************************************************************* | ||
* Optional methods. | ||
* | ||
* These methods are not required to be overridden but can be used to adjust the appearance/behaviour of the pipeline. | ||
*********************************************************************************************************************/ | ||
|
||
/** | ||
* Defines the background color in the IRIDA UI corresponding to this pipeline. | ||
*/ | ||
@Override | ||
public Optional<Color> getBackgroundColor() { | ||
return Optional.of(Color.decode("#7fcdbb")); | ||
} | ||
|
||
/** | ||
* Defines the text color in the IRIDA UI corresponding to this pipeline. | ||
*/ | ||
@Override | ||
public Optional<Color> getTextColor() { | ||
return Optional.of(Color.BLACK); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<iridaWorkflow> | ||
<id>c07a0d4c-fb53-4183-8ded-298f8a4decca</id> | ||
<name>FirstLines</name> | ||
<version>0.1.0</version> | ||
<analysisType>FIRST_LINES</analysisType> | ||
<inputs> | ||
<sequenceReadsPaired>fastq_paired</sequenceReadsPaired> | ||
<requiresSingleSample>true</requiresSingleSample> | ||
</inputs> | ||
<parameters> | ||
<parameter name="show-beginning1-1-lineNum" defaultValue="4"> | ||
<toolParameter toolId="Show beginning1" parameterName="lineNum"/> | ||
</parameter> | ||
</parameters> | ||
<outputs> | ||
<output name="first-lines.txt" fileName="first-lines.txt"/> | ||
</outputs> | ||
<toolRepositories/> | ||
</iridaWorkflow> |
Oops, something went wrong.