-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1548 from Mailaender/rdes
Add write support for RDES
- Loading branch information
Showing
29 changed files
with
623 additions
and
3 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
chemclipse/features/org.eclipse.chemclipse.pcr.converter.supplier.rdes.feature/.project
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,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>org.eclipse.chemclipse.pcr.converter.supplier.rdes.feature</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.pde.FeatureBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.pde.FeatureNature</nature> | ||
</natures> | ||
</projectDescription> |
2 changes: 2 additions & 0 deletions
2
...chemclipse.pcr.converter.supplier.rdes.feature/.settings/org.eclipse.core.resources.prefs
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,2 @@ | ||
eclipse.preferences.version=1 | ||
encoding/<project>=utf8 |
1 change: 1 addition & 0 deletions
1
...ipse/features/org.eclipse.chemclipse.pcr.converter.supplier.rdes.feature/build.properties
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 @@ | ||
bin.includes = feature.xml |
34 changes: 34 additions & 0 deletions
34
chemclipse/features/org.eclipse.chemclipse.pcr.converter.supplier.rdes.feature/feature.xml
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,34 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<feature | ||
id="org.eclipse.chemclipse.pcr.converter.supplier.rdes.feature" | ||
label="RDES Converter" | ||
version="0.9.0.qualifier" | ||
provider-name="ChemClipse" | ||
plugin="org.eclipse.chemclipse.feature.branding" | ||
license-feature="org.eclipse.license" | ||
license-feature-version="1.0.0.qualifier"> | ||
|
||
<description url="http://www.chemclipse.net/"> | ||
This is the The Real-time PCR Data Essential Spreadsheet Format (RDES) converter. | ||
</description> | ||
|
||
<copyright url="http://www.chemclipse.net/"> | ||
Copyright (c) 2023 Lablicate GmbH. | ||
</copyright> | ||
|
||
<license url="%licenseURL"> | ||
%license | ||
</license> | ||
|
||
<url> | ||
<discovery label="RDES" url="https://rdml.org/rdes.html"/> | ||
</url> | ||
|
||
<plugin | ||
id="org.eclipse.chemclipse.pcr.converter.supplier.rdes" | ||
download-size="0" | ||
install-size="0" | ||
version="0.0.0" | ||
unpack="false"/> | ||
|
||
</feature> |
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
7 changes: 7 additions & 0 deletions
7
chemclipse/plugins/org.eclipse.chemclipse.pcr.converter.supplier.rdes/.classpath
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,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/> | ||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
1 change: 1 addition & 0 deletions
1
chemclipse/plugins/org.eclipse.chemclipse.pcr.converter.supplier.rdes/.gitignore
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 @@ | ||
/bin/ |
28 changes: 28 additions & 0 deletions
28
chemclipse/plugins/org.eclipse.chemclipse.pcr.converter.supplier.rdes/.project
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,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>org.eclipse.chemclipse.pcr.converter.supplier.rdes</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.ManifestBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.SchemaBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.pde.PluginNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
2 changes: 2 additions & 0 deletions
2
...eclipse.chemclipse.pcr.converter.supplier.rdes/.settings/org.eclipse.core.resources.prefs
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,2 @@ | ||
eclipse.preferences.version=1 | ||
encoding/<project>=utf8 |
7 changes: 7 additions & 0 deletions
7
...s/org.eclipse.chemclipse.pcr.converter.supplier.rdes/.settings/org.eclipse.jdt.core.prefs
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,7 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 | ||
org.eclipse.jdt.core.compiler.compliance=17 | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.source=17 |
18 changes: 18 additions & 0 deletions
18
chemclipse/plugins/org.eclipse.chemclipse.pcr.converter.supplier.rdes/META-INF/MANIFEST.MF
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,18 @@ | ||
Manifest-Version: 1.0 | ||
Automatic-Module-Name: org.eclipse.chemclipse.pcr.converter.supplier.rdml | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: RDES PCR Converter | ||
Bundle-SymbolicName: org.eclipse.chemclipse.pcr.converter.supplier.rdes;singleton:=true | ||
Bundle-Version: 0.9.0.qualifier | ||
Bundle-Activator: org.eclipse.chemclipse.pcr.converter.supplier.rdes.Activator | ||
Bundle-Vendor: ChemClipse | ||
Require-Bundle: org.eclipse.core.runtime, | ||
org.eclipse.chemclipse.converter;bundle-version="0.8.0", | ||
org.eclipse.chemclipse.pcr.converter;bundle-version="0.8.0", | ||
org.eclipse.chemclipse.model;bundle-version="0.8.0", | ||
org.eclipse.chemclipse.pcr.model;bundle-version="0.8.0", | ||
org.eclipse.chemclipse.logging;bundle-version="0.8.0", | ||
org.eclipse.chemclipse.processing;bundle-version="0.8.0", | ||
org.eclipse.chemclipse.support;bundle-version="0.8.0" | ||
Bundle-RequiredExecutionEnvironment: JavaSE-17 | ||
Bundle-ActivationPolicy: lazy |
1 change: 1 addition & 0 deletions
1
...ins/org.eclipse.chemclipse.pcr.converter.supplier.rdes/OSGI-INF/l10n/bundle_en.properties
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 @@ | ||
#Properties file |
6 changes: 6 additions & 0 deletions
6
chemclipse/plugins/org.eclipse.chemclipse.pcr.converter.supplier.rdes/build.properties
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,6 @@ | ||
source.. = src/ | ||
output.. = bin/ | ||
bin.includes = META-INF/,\ | ||
.,\ | ||
OSGI-INF/,\ | ||
plugin.xml |
19 changes: 19 additions & 0 deletions
19
chemclipse/plugins/org.eclipse.chemclipse.pcr.converter.supplier.rdes/plugin.xml
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,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?eclipse version="3.4"?> | ||
<plugin> | ||
<extension | ||
point="org.eclipse.chemclipse.pcr.converter.plateSupplier"> | ||
<PlateSupplier | ||
description="Writes Real-time PCR Data Essential Spreadsheet Format (RDES) qPCR experiments." | ||
exportConverter="org.eclipse.chemclipse.pcr.converter.supplier.rdes.core.PCRExportConverter" | ||
fileExtension=".tsv" | ||
fileName="" | ||
filterName="RDES (*.tsv)" | ||
id="org.eclipse.chemclipse.pcr.converter.supplier.rdes" | ||
importConverter="org.eclipse.chemclipse.pcr.converter.supplier.rdes.core.PCRImportConverter" | ||
importMagicNumberMatcher="org.eclipse.chemclipse.pcr.converter.supplier.rdes.core.MagicNumberMatcher" | ||
isExportable="true" | ||
isImportable="false"> | ||
</PlateSupplier> | ||
</extension> | ||
</plugin> |
37 changes: 37 additions & 0 deletions
37
...erter.supplier.rdes/src/org/eclipse/chemclipse/pcr/converter/supplier/rdes/Activator.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,37 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Lablicate GmbH. | ||
* | ||
* All rights reserved. | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v1.0 which accompanies this distribution, | ||
* and is available at http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Matthias Mailänder - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.chemclipse.pcr.converter.supplier.rdes; | ||
|
||
import org.osgi.framework.BundleActivator; | ||
import org.osgi.framework.BundleContext; | ||
|
||
public class Activator implements BundleActivator { | ||
|
||
private static BundleContext context; | ||
|
||
public static BundleContext getContext() { | ||
|
||
return context; | ||
} | ||
|
||
@Override | ||
public void start(BundleContext bundleContext) throws Exception { | ||
|
||
Activator.context = bundleContext; | ||
} | ||
|
||
@Override | ||
public void stop(BundleContext bundleContext) throws Exception { | ||
|
||
Activator.context = null; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
....rdes/src/org/eclipse/chemclipse/pcr/converter/supplier/rdes/core/MagicNumberMatcher.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,26 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Lablicate GmbH. | ||
* | ||
* All rights reserved. | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v1.0 which accompanies this distribution, | ||
* and is available at http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Matthias Mailänder - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.chemclipse.pcr.converter.supplier.rdes.core; | ||
|
||
import java.io.File; | ||
|
||
import org.eclipse.chemclipse.converter.core.AbstractMagicNumberMatcher; | ||
import org.eclipse.chemclipse.converter.core.IMagicNumberMatcher; | ||
|
||
public class MagicNumberMatcher extends AbstractMagicNumberMatcher implements IMagicNumberMatcher { | ||
|
||
@Override | ||
public boolean checkFileFormat(File file) { | ||
|
||
return checkFileExtension(file, ".tsv"); | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
....rdes/src/org/eclipse/chemclipse/pcr/converter/supplier/rdes/core/PCRExportConverter.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,54 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Lablicate GmbH. | ||
* | ||
* All rights reserved. | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v1.0 which accompanies this distribution, | ||
* and is available at http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Matthias Mailänder - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.chemclipse.pcr.converter.supplier.rdes.core; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
|
||
import org.eclipse.chemclipse.logging.core.Logger; | ||
import org.eclipse.chemclipse.pcr.converter.core.AbstractPlateExportConverter; | ||
import org.eclipse.chemclipse.pcr.converter.core.IPlateExportConverter; | ||
import org.eclipse.chemclipse.pcr.converter.supplier.rdes.io.PCRWriter; | ||
import org.eclipse.chemclipse.pcr.model.core.IPlate; | ||
import org.eclipse.chemclipse.processing.core.IProcessingInfo; | ||
import org.eclipse.chemclipse.processing.core.ProcessingInfo; | ||
import org.eclipse.core.runtime.IProgressMonitor; | ||
|
||
public class PCRExportConverter extends AbstractPlateExportConverter implements IPlateExportConverter { | ||
|
||
private static final Logger logger = Logger.getLogger(PCRExportConverter.class); | ||
private static IPlateExportConverter instance = null; | ||
private static final String DESCRIPTION = "RDES Export"; | ||
|
||
@Override | ||
public IProcessingInfo<File> convert(File file, IPlate plate, IProgressMonitor monitor) { | ||
|
||
PCRWriter qPCR = new PCRWriter(); | ||
IProcessingInfo<File> processingInfo = new ProcessingInfo<>(); | ||
try { | ||
qPCR.writePlate(file, plate); | ||
processingInfo.setProcessingResult(file); | ||
} catch(IOException e) { | ||
logger.warn(e); | ||
processingInfo.addErrorMessage(DESCRIPTION, "Failed to write file: " + file.getAbsolutePath(), e); | ||
} | ||
return processingInfo; | ||
} | ||
|
||
public static IPlateExportConverter getInstance() { | ||
|
||
if(instance == null) { | ||
instance = new PCRExportConverter(); | ||
} | ||
return instance; | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
....rdes/src/org/eclipse/chemclipse/pcr/converter/supplier/rdes/core/PCRImportConverter.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,55 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Lablicate GmbH. | ||
* | ||
* All rights reserved. | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v1.0 which accompanies this distribution, | ||
* and is available at http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Matthias Mailänder - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.chemclipse.pcr.converter.supplier.rdes.core; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
|
||
import org.eclipse.chemclipse.logging.core.Logger; | ||
import org.eclipse.chemclipse.pcr.converter.core.AbstractPlateImportConverter; | ||
import org.eclipse.chemclipse.pcr.converter.core.IPlateImportConverter; | ||
import org.eclipse.chemclipse.pcr.converter.supplier.rdes.io.PCRReader; | ||
import org.eclipse.chemclipse.pcr.model.core.IPlate; | ||
import org.eclipse.chemclipse.processing.core.IProcessingInfo; | ||
import org.eclipse.core.runtime.IProgressMonitor; | ||
|
||
public class PCRImportConverter extends AbstractPlateImportConverter implements IPlateImportConverter { | ||
|
||
private static final Logger logger = Logger.getLogger(PCRImportConverter.class); | ||
private static final String DESCRIPTION = "RDES Import"; | ||
private static IPlateImportConverter instance = null; | ||
|
||
@Override | ||
public IProcessingInfo<IPlate> convert(File file, IProgressMonitor monitor) { | ||
|
||
IProcessingInfo<IPlate> processingInfo = super.validate(file); | ||
if(!processingInfo.hasErrorMessages()) { | ||
PCRReader qPCR = new PCRReader(); | ||
try { | ||
IPlate plate = qPCR.read(file); | ||
processingInfo.setProcessingResult(plate); | ||
} catch(IOException e) { | ||
logger.warn(e); | ||
processingInfo.addErrorMessage(DESCRIPTION, "Failed to read file: " + file.getAbsolutePath(), e); | ||
} | ||
} | ||
return processingInfo; | ||
} | ||
|
||
public static IPlateImportConverter getInstance() { | ||
|
||
if(instance == null) { | ||
instance = new PCRImportConverter(); | ||
} | ||
return instance; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...er.supplier.rdes/src/org/eclipse/chemclipse/pcr/converter/supplier/rdes/io/PCRReader.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,25 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Lablicate GmbH. | ||
* | ||
* All rights reserved. | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v1.0 which accompanies this distribution, | ||
* and is available at http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Matthias Mailänder - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.chemclipse.pcr.converter.supplier.rdes.io; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
|
||
import org.eclipse.chemclipse.pcr.model.core.IPlate; | ||
|
||
public class PCRReader { | ||
|
||
public IPlate read(File file) throws IOException { | ||
|
||
return null; | ||
} | ||
} |
Oops, something went wrong.