Skip to content

Commit

Permalink
Merge pull request #52 from Rappsilber-Laboratory/CandidateWriteOut
Browse files Browse the repository at this point in the history
V1.7.3
  • Loading branch information
lutzfischer authored Mar 6, 2020
2 parents 62dc0e8 + f4baf96 commit 14c637d
Show file tree
Hide file tree
Showing 25 changed files with 1,001 additions and 299 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>rappsilber</groupId>
<artifactId>xiSEARCH</artifactId>
<version>1.7.2</version>
<version>1.7.3</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -735,9 +735,13 @@ protected MatchedXlinkedPeptide evaluateMatch(Spectra sin, Peptide alphaFirst, P
if (match!= null) {
m_mgcmgxDeltaScore.setScore(match, "mgcAlpha", mgcAlphaScore);
m_mgcmgxDeltaScore.setScore(match, "mgcBeta", mgcBetaScore);
double pAlpha = Math.pow(-mgcAlphaScore, 10);
double pBeta = Math.pow(-mgcBetaScore, 10);
double pmgc = pAlpha+pBeta - pAlpha*pBeta;
double pAlpha = Math.pow(-mgcAlphaScore, Math.E);
double pBeta = pAlpha;
double pmgc = pAlpha;
if (beta != null) {
pBeta = Math.pow(-mgcBetaScore, Math.E);
pmgc = pAlpha+pBeta - pAlpha*pBeta;
}
double mgcAlphaBeta = -Math.log(pmgc);
m_mgcmgxDeltaScore.setScore(match, "mgcAlphaBeta", mgcAlphaBeta);
m_mgcmgxDeltaScore.setScore(match, "mgcScore", mgcScore);
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/rappsilber/applications/Xi.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import rappsilber.ms.dataAccess.output.CSVExportMatches;
import rappsilber.ms.dataAccess.output.PeakListWriter;
import rappsilber.ms.dataAccess.output.ResultMultiplexer;
import rappsilber.ms.sequence.AminoModification;
import rappsilber.ms.sequence.SequenceList;
import rappsilber.ui.StatusInterface;
import rappsilber.utils.ObjectWrapper;
Expand Down Expand Up @@ -389,6 +390,9 @@ public static void main(String[] args) throws IOException, FileNotFoundException
DebugFrame df = null;
int argsCount = xi.parseArgs(args, unknownArgs);

// switch to automatically change modification symbols to lower case
rappsilber.utils.Util.AutoCaseSymbols=true;

if (xi.displayLog) {
df = new DebugFrame("Xi-Version : " + XiVersion.getVersionString(), xi.m_xi_process);
final DebugFrame mdf = df;
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/rappsilber/config/AbstractRunConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;
import rappsilber.applications.SimpleXiProcessLinearIncluded;
import rappsilber.applications.XiProcess;
import rappsilber.ms.ToleranceUnit;
Expand All @@ -49,6 +50,7 @@
import rappsilber.ms.sequence.AminoLabel;
import rappsilber.ms.sequence.AminoModification;
import rappsilber.ms.sequence.NonAminoAcidModification;
import rappsilber.ms.sequence.Sequence;
import rappsilber.ms.sequence.SequenceList;
import rappsilber.ms.sequence.digest.Digestion;
import rappsilber.ms.sequence.ions.BasicCrossLinkedFragmentProducer;
Expand Down Expand Up @@ -613,6 +615,20 @@ public Collection<AminoAcid> getAllAminoAcids() {

public void addAminoAcid(AminoAcid aa) {
m_AminoAcids.put(aa.SequenceID,aa);
if (aa.SequenceID.matches(".+[A-Z].*")) {
ArrayList<String> badAA = new ArrayList<>();
for (AminoAcid baa : getAllAminoAcids()) {
if (baa.SequenceID.matches("[A-Z].*[A-Z].*")) {
badAA.add(baa.SequenceID);
}
}

if (!badAA.isEmpty()) {
badAA.add("[A-Z][^A-Z]*");
Sequence.m_sequenceSplit = Pattern.compile("("+MyArrayUtils.toString(badAA, "|") +")");
}

}
}

public void addKnownModification(AminoModification am) {
Expand Down
14 changes: 0 additions & 14 deletions src/main/java/rappsilber/data/BasicConfig.conf
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
#####################
# General settings not directly selectable in the GUI

#####################
## how many CPUs to use
## Values smaller 0 mean that all available but the mentioned number will be used.
## E.g. if the computer has 4 cores and UseCPUs is set to -1 then 3 threads are used for search.
## Additionally, buffers also use threads to decouple the input and output of the buffer.
## Each thread will also have a small buffer between itself and the input and the output queue - but the overall CPU-usage of these should be smallish
UseCPUs:-1








####################
## include linear matches
Expand Down
1 change: 1 addition & 0 deletions src/main/java/rappsilber/gui/.LCKSimpleXiGui.form~
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/home/lfischer/Dropbox/XiSearch/src/main/java/rappsilber/gui/SimpleXiGui.form
113 changes: 106 additions & 7 deletions src/main/java/rappsilber/gui/SimpleXiGui.form
Original file line number Diff line number Diff line change
Expand Up @@ -321,14 +321,19 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="rbBasicConfig" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="35" max="-2" attributes="0"/>
<Component id="rbTextConfig" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="fbLoadConfig" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="btnLoadConfig" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="btnAddConfig" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="jPanel7" max="32767" attributes="0"/>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Component id="jPanel8" min="-2" max="-2" attributes="0"/>
Expand All @@ -338,9 +343,12 @@
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="3" attributes="0">
<Component id="rbBasicConfig" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="rbTextConfig" alignment="3" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="rbTextConfig" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="rbBasicConfig" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="fbLoadConfig" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="btnLoadConfig" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="btnAddConfig" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
Expand Down Expand Up @@ -496,7 +504,7 @@
<Component id="cbBoost" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="ckBoost" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" pref="89" max="32767" attributes="0"/>
<EmptySpace type="separate" pref="83" max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="btnStartFDR" min="-2" max="-2" attributes="0"/>
<Component id="ckFDRGUI" min="-2" max="-2" attributes="0"/>
Expand Down Expand Up @@ -649,6 +657,33 @@
</Container>
</SubComponents>
</Container>
<Component class="rappsilber.gui.components.FileBrowser" name="fbLoadConfig">
<Properties>
<Property name="extensions" type="[Ljava.lang.String;" editor="org.netbeans.beaninfo.editors.StringArrayEditor">
<StringArray count="1">
<StringItem index="0" value="txt"/>
</StringArray>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="btnLoadConfig">
<Properties>
<Property name="text" type="java.lang.String" value="Load Config"/>
<Property name="enabled" type="boolean" value="false"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnLoadConfigActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="btnAddConfig">
<Properties>
<Property name="text" type="java.lang.String" value="Add Config"/>
<Property name="enabled" type="boolean" value="false"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnAddConfigActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JCheckBox" name="ckPeakAnnotations">
Expand Down Expand Up @@ -826,6 +861,70 @@
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="jPanel9">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
<JTabbedPaneConstraints tabName="About">
<Property name="tabTitle" type="java.lang.String" value="About"/>
</JTabbedPaneConstraints>
</Constraint>
</Constraints>

<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="spChangeLog" max="32767" attributes="0"/>
<Group type="102" attributes="0">
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
<Component id="txtVersion" min="-2" pref="134" max="-2" attributes="0"/>
<EmptySpace min="0" pref="649" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="txtVersion" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="spChangeLog" pref="442" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="jLabel3">
<Properties>
<Property name="text" type="java.lang.String" value="xiSEARCH Version:"/>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="txtVersion">
</Component>
<Container class="javax.swing.JScrollPane" name="spChangeLog">

<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JTextArea" name="txtChangeLog">
<Properties>
<Property name="columns" type="int" value="20"/>
<Property name="rows" type="int" value="5"/>
</Properties>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Container>
</SubComponents>
</Container>
<Component class="javax.swing.JTextField" name="txtRunState">
Expand Down
Loading

0 comments on commit 14c637d

Please sign in to comment.