Skip to content
This repository has been archived by the owner on Sep 27, 2020. It is now read-only.

Commit

Permalink
Merge pull request #16 from sc13-bioinf/master
Browse files Browse the repository at this point in the history
Support EAGER version and DeDup all reads as merged
  • Loading branch information
apeltzer committed Jul 26, 2016
2 parents f12a35d + a5696e1 commit 1a6ae5a
Show file tree
Hide file tree
Showing 5 changed files with 184 additions and 0 deletions.
Binary file modified libraries/EAGERlib.jar
Binary file not shown.
107 changes: 107 additions & 0 deletions src/main/DeDupDialog.form
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="main.DeDupDialog">
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="10" left="10" bottom="10" right="10"/>
<constraints>
<xy x="20" y="20" width="1742" height="3285"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<grid id="bb831" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<grid id="3dd8e" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="2" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<grid id="8bab4" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="1befd" class="javax.swing.JButton" binding="buttonOk">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Ok"/>
</properties>
</component>
<vspacer id="50942">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
</children>
</grid>
<grid id="9eaec" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="9101f" class="javax.swing.JButton" binding="buttonCancel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Cancel"/>
</properties>
</component>
</children>
</grid>
</children>
</grid>
<grid id="5cf0e" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="2de1" class="javax.swing.JCheckBox" binding="checkBox_allReadsAsMerged">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Treat all reads as merged"/>
</properties>
</component>
<component id="c8733" class="javax.swing.JTextArea" binding="textArea_allReadsAsDescription">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="150" height="50"/>
</grid>
</constraints>
<properties>
<editable value="false"/>
<enabled value="true"/>
<lineWrap value="true"/>
<rows value="6"/>
<text value="This option applies if you are using the DeDup tool:&#10;&#10;Check this box unless your read names have prefixes indicating merged, forward or reverse (M_,F_,R_).&#10;&#10;If your reads are NOT from ClipAndMerge then you will probably want to check this box."/>
<wrapStyleWord value="true"/>
</properties>
</component>
</children>
</grid>
</children>
</grid>
</children>
</grid>
</form>
50 changes: 50 additions & 0 deletions src/main/DeDupDialog.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package main;

import javax.swing.*;
import IO.Communicator;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
* Created by clayton on 25/07/16.
*/
public class DeDupDialog extends JDialog {

private JPanel contentPane;
private JButton buttonOk;
private JButton buttonCancel;
private JCheckBox checkBox_allReadsAsMerged;
private JTextArea textArea_allReadsAsDescription;

public DeDupDialog (final Communicator c) {
setValues(c);
setContentPane(contentPane);
setModal(true);

buttonOk.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
onOk(c);
}
});

buttonCancel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
onCancel();
}
});
}

private void setValues(Communicator c) {
checkBox_allReadsAsMerged.setSelected(c.isRmdup_allReadsAsMerged());
}

private void onOk (Communicator c) {
c.setRmdup_allReadsAsMerged(checkBox_allReadsAsMerged.isSelected());
dispose();
}

private void onCancel () {
dispose();
}
}
8 changes: 8 additions & 0 deletions src/main/EAGER.form
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,14 @@
<text value="Use system tmp dir"/>
</properties>
</component>
<component id="7fe59" class="javax.swing.JButton" binding="dedup_advanced_button">
<constraints>
<grid row="10" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Advanced"/>
</properties>
</component>
</children>
</grid>
<component id="b04e5" class="javax.swing.JButton" binding="selectInputFqFilesButton" default-binding="true">
Expand Down
19 changes: 19 additions & 0 deletions src/main/EAGER.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
* To change this template use File | Settings | File Templates.
*/
public class EAGER {
private final String EAGER_VERSION = "1.92.12";

private String filepath;
private JCheckBox fastQCAnalysisCheckBox;
private JCheckBox qualityFilteringCheckBox;
Expand Down Expand Up @@ -81,6 +83,7 @@ public class EAGER {
private JCheckBox schmutzi_checkbox;
private JButton schmutzi_advanced_button;
private JCheckBox useSystemTmpDirCheckBox;
private JButton dedup_advanced_button;
private JMenuBar jmenubar;
private JMenu jmenu;
public Image icon;
Expand Down Expand Up @@ -628,6 +631,17 @@ public void actionPerformed(ActionEvent e) {

}
});

dedup_advanced_button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
DeDupDialog deDupDialog = new DeDupDialog(communicator);
setWindowPosition(deDupDialog);
deDupDialog.setSize(650, 650);
deDupDialog.setVisible(true);
}
});

schmutzi_advanced_button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Expand Down Expand Up @@ -724,6 +738,7 @@ private void generateConfiguration(Communicator c) throws IOException {
* tasks of the pipeline, to generate the appropriate configuration files
*/
private void generateConfiguration(Communicator c, String resultspath) throws IOException {
generateEagerVersionConfiguration(communicator);
generateRGConfiguration(communicator);

ConfigGenerator cg = new ConfigGenerator(communicator, resultspath, this, this.runReportGenerator.isSelected());
Expand All @@ -742,6 +757,10 @@ public static void setWindowPosition(java.awt.Window window) {

}

private void generateEagerVersionConfiguration(Communicator communicator) {
this.communicator.setEager_verison(EAGER_VERSION);
}

private void generateRGConfiguration(Communicator communicator) {
String filenames = Files.getNameWithoutExtension(this.communicator.getGUI_inputfiles().get(0));
String readgroup = "@RG" + "\\t" + "ID:ILLUMINA-" + filenames + "\\t" + "SM:" + filenames + "\\t" + "PL:illumina";
Expand Down

0 comments on commit 1a6ae5a

Please sign in to comment.