Skip to content

Commit

Permalink
Some cleavable cross-linker related columns are read in
Browse files Browse the repository at this point in the history
* specific grouping for these can be selected
Bugfix for spaces in ambiguous accession list
Validity check disabled by default  but still reports warning
Validity check warnings more verbose
When writing csv-files from the command line mzIdentML files get writen out as well
 * a window asking for document-owner will be displayed
decoy:psms better marked
Improved synchronisation between settings-panel
Some adaptation to forward settings from the commandline to the GUI
  • Loading branch information
Lutz Fischer committed Oct 31, 2019
1 parent 8547731 commit 5e06093
Show file tree
Hide file tree
Showing 32 changed files with 2,632 additions and 751 deletions.
92 changes: 46 additions & 46 deletions nbactions-release-profile.xml
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<actionName>run</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-classpath %classpath org.rappsilber.fdr.gui.FDRGUI</exec.args>
<exec.executable>java</exec.executable>
</properties>
</action>
<action>
<actionName>debug</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath org.rappsilber.fdr.gui.FDRGUI</exec.args>
<exec.executable>java</exec.executable>
<jpda.listen>true</jpda.listen>
</properties>
</action>
<action>
<actionName>profile</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-classpath %classpath org.rappsilber.fdr.gui.FDRGUI</exec.args>
<exec.executable>java</exec.executable>
</properties>
</action>
</actions>
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<actionName>run</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-classpath %classpath org.rappsilber.fdr.CommandLine</exec.args>
<exec.executable>java</exec.executable>
</properties>
</action>
<action>
<actionName>debug</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath org.rappsilber.fdr.CommandLine</exec.args>
<exec.executable>java</exec.executable>
<jpda.listen>true</jpda.listen>
</properties>
</action>
<action>
<actionName>profile</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-classpath %classpath org.rappsilber.fdr.CommandLine</exec.args>
<exec.executable>java</exec.executable>
</properties>
</action>
</actions>
6 changes: 3 additions & 3 deletions nbactions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-classpath %classpath org.rappsilber.fdr.CommandLine --pepfdr=5.0 --boost=link --csvOutDir=/home/lfischer/temp/test --csvBaseName=test_XiVersion1.7.754.RC1_2 --xiconfig=/home/lfischer/temp/test/test_XiVersion1.7.754.RC1.csv.config --fasta=/Users/salman/xi_data/xi/sequenceDB/pool8_BSCL-17_46_41-12_Sep_2019/DATABASE.fasta /home/lfischer/temp/test/test_XiVersion1.7.754.RC1.csv --gui</exec.args>
<exec.args>-classpath %classpath org.rappsilber.fdr.CommandLine --linkfdr=5.0 --boost=link --csvOutDir=/home/lfischer/temp/test/FDR_rpfdr5.0 --csvBaseName=4pm_dsso_Xi1.7.0.RC1_grouped --xiconfig=/home/lfischer/temp/test/4pm_dsso_Xi1.7.0.RC1.csv.config --fasta=/Users/salman/xi_data/xi/sequenceDB/4_protein_mix-17_59_11-19_Jan_2018/4ProtMix.fasta /home/lfischer/temp/test/4pm_dsso_Xi1.7.0.RC1.csv --gui</exec.args>
<exec.executable>java</exec.executable>
<exec.workingdir>/home/lfischer</exec.workingdir>
</properties>
Expand All @@ -25,7 +25,7 @@
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath org.rappsilber.fdr.CommandLine --pepfdr=5.0 --boost=link --csvOutDir=/home/lfischer/temp/test --csvBaseName=test_XiVersion1.7.754.RC1_2 --xiconfig=/home/lfischer/temp/test/test_XiVersion1.7.754.RC1.csv.config --fasta=/Users/salman/xi_data/xi/sequenceDB/pool8_BSCL-17_46_41-12_Sep_2019/DATABASE.fasta /home/lfischer/temp/test/test_XiVersion1.7.754.RC1.csv --gui</exec.args>
<exec.args>-agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath org.rappsilber.fdr.CommandLine --linkfdr=5.0 --boost=link --csvOutDir=/home/lfischer/temp/test/FDR_rpfdr5.0 --csvBaseName=4pm_dsso_Xi1.7.0.RC1_grouped --xiconfig=/home/lfischer/temp/test/4pm_dsso_Xi1.7.0.RC1.csv.config --fasta=/Users/salman/xi_data/xi/sequenceDB/4_protein_mix-17_59_11-19_Jan_2018/4ProtMix.fasta /home/lfischer/temp/test/4pm_dsso_Xi1.7.0.RC1.csv --gui</exec.args>
<exec.executable>java</exec.executable>
<jpda.listen>true</jpda.listen>
<exec.workingdir>/home/lfischer</exec.workingdir>
Expand All @@ -41,7 +41,7 @@
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-classpath %classpath org.rappsilber.fdr.CommandLine --pepfdr=5.0 --boost=link --csvOutDir=/home/lfischer/temp/test --csvBaseName=test_XiVersion1.7.754.RC1_2 --xiconfig=/home/lfischer/temp/test/test_XiVersion1.7.754.RC1.csv.config --fasta=/Users/salman/xi_data/xi/sequenceDB/pool8_BSCL-17_46_41-12_Sep_2019/DATABASE.fasta /home/lfischer/temp/test/test_XiVersion1.7.754.RC1.csv --gui</exec.args>
<exec.args>-classpath %classpath org.rappsilber.fdr.CommandLine --linkfdr=5.0 --boost=link --csvOutDir=/home/lfischer/temp/test/FDR_rpfdr5.0 --csvBaseName=4pm_dsso_Xi1.7.0.RC1_grouped --xiconfig=/home/lfischer/temp/test/4pm_dsso_Xi1.7.0.RC1.csv.config --fasta=/Users/salman/xi_data/xi/sequenceDB/4_protein_mix-17_59_11-19_Jan_2018/4ProtMix.fasta /home/lfischer/temp/test/4pm_dsso_Xi1.7.0.RC1.csv --gui</exec.args>
<exec.executable>java</exec.executable>
<exec.workingdir>/home/lfischer</exec.workingdir>
</properties>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.rappsilberlab</groupId>
<artifactId>xiFDR</artifactId>
<version>1.3.37</version>
<version>1.4.0</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
Expand Down Expand Up @@ -145,5 +145,5 @@
</properties>
<description>Application for FDR estimation cross-linking massspectrometry data
</description>
<name>xiFDR-1.3.37</name>
<name>xiFDR-1.4.0</name>
</project>
33 changes: 26 additions & 7 deletions src/main/java/org/rappsilber/fdr/CSVinFDR.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ public class CSVinFDR extends OfflineFDR {
{"peptide coverage2", "peptide2 unique matched non lossy coverage", "unique_peak_primary_coverage_p2"},
{"peptide1 fragments", "peptide1 unique matched conservative", "conservative_fragsites_p1"},
{"peptide2 fragments", "peptide2 unique matched conservative", "conservative_fragsites_p2"},
{"peptides with stubs", "fragment CCPepFragment"},
{"peptides with doublets", "fragment CCPepDoubletFound"},
{"minimum peptide coverage", "min coverage pp"},
{"delta", "delta score", "dscore"},
};
Expand Down Expand Up @@ -193,6 +195,8 @@ public void readCSV(CsvParser csv, CsvCondition filter) throws FileNotFoundExcep
Integer cDelta = getColumn(csv,"delta",true);
Integer cPep1Coverage = getColumn(csv,"peptide coverage1",true);
Integer cPep2Coverage = getColumn(csv,"peptide coverage1",true);
Integer cPepStubs = getColumn(csv,"peptides with stubs",true);
Integer cPepDoublets = getColumn(csv,"peptides with doublets",true);
Integer cPepMinCoverage = getColumn(csv,"minimum peptide coverage",true);
Integer cRank = getColumn(csv,"rank",true);

Expand Down Expand Up @@ -293,12 +297,12 @@ public void readCSV(CsvParser csv, CsvCondition filter) throws FileNotFoundExcep
peptide2score=score*(1-ratio);
}

String[] accessions1 =saccession1.split(";");
String[] accessions2 =saccession2.split(";");
String[] descriptions1 =sdescription1.split(";",-1);
String[] descriptions2 =sdescription2.split(";",-1);
String[] pepPositions1 =spepPosition1.split(";",-1);
String[] pepPositions2 =spepPosition2.split(";",-1);
String[] accessions1 =saccession1.split("\\s*;\\s*");
String[] accessions2 =saccession2.split("\\s*;\\s*");
String[] descriptions1 =sdescription1.split("\\s*;\\s*",-1);
String[] descriptions2 =sdescription2.split("\\s*;\\s*",-1);
String[] pepPositions1 =spepPosition1.split("\\s*;\\s*",-1);
String[] pepPositions2 =spepPosition2.split("\\s*;\\s*",-1);

if (!sdescription1.isEmpty()) {
if (descriptions1.length != accessions1.length)
Expand Down Expand Up @@ -346,7 +350,7 @@ public void readCSV(CsvParser csv, CsvCondition filter) throws FileNotFoundExcep

int[] ipeppos1 = new int[pepPositions1.length];
for (int i = 0; i<pepPositions1.length; i++) {
ipeppos1[i] = Integer.parseInt(pepPositions1[i]);
ipeppos1[i] = Integer.parseInt(pepPositions1[i].trim());
}

int[] ipeppos2 = new int[pepPositions2.length];
Expand Down Expand Up @@ -420,6 +424,21 @@ public void readCSV(CsvParser csv, CsvCondition filter) throws FileNotFoundExcep
}
if (cDelta != null)
psm.setDeltaScore(csv.getDouble(cDelta));

if (cPepStubs != null) {
double s = csv.getDouble(cPepStubs);
psm.addOtherInfo("PeptidesWithStubs", s);
if (s >0) {
stubsFound(true);
}

}
if (cPepDoublets != null) {

psm.addOtherInfo("PeptidesWithDoublets", csv.getDouble(cPepDoublets));

}

if (cPepMinCoverage != null) {

psm.addOtherInfo("minPepCoverage", csv.getDouble(cPepMinCoverage));
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/rappsilber/fdr/FDRSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,7 @@ public interface FDRSettings {
public void ignoreValidityChecks(boolean ignore);
// public double getSubScoreCutOff();
// public void setSubScoreCutOff(double localfdr);
public void setGroupByCrosslinkerStubs(boolean group);
public boolean getGroupByCrosslinkerStubs();

}
16 changes: 14 additions & 2 deletions src/main/java/org/rappsilber/fdr/FDRSettingsImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class FDRSettingsImpl implements FDRSettings {
double ProteinGroupFDR;
double ProteinGroupLinkFDR;
double ProteinGroupPairFDR;
int BoostingSteps;
int BoostingSteps = 4;
boolean BoostBetween;
boolean LinkDirectional;
boolean PPIDirectional;
Expand Down Expand Up @@ -61,7 +61,8 @@ public class FDRSettingsImpl implements FDRSettings {
private boolean combineScoreAndDelta;
private int minFragments;
private boolean boostMinFragments = false;
private boolean ignoreValidityChecks;
private boolean ignoreValidityChecks = true;
private boolean groubByCrosslinkerStubs;

@Override
public void addCalcListener(ActionListener al) {
Expand Down Expand Up @@ -320,6 +321,7 @@ public static void transferSettings(FDRSettings from, FDRSettings to) {
to.boostDeltaScore(from.boostDeltaScore());
to.combineScoreAndDelta(from.combineScoreAndDelta());
to.ignoreValidityChecks(from.ignoreValidityChecks());
to.setGroupByCrosslinkerStubs(from.getGroupByCrosslinkerStubs());
}

public boolean combineScoreAndDelta() {
Expand Down Expand Up @@ -528,6 +530,16 @@ public boolean ignoreValidityChecks() {
public void ignoreValidityChecks(boolean ignore) {
this.ignoreValidityChecks = ignore;
}

@Override
public void setGroupByCrosslinkerStubs(boolean group) {
this.groubByCrosslinkerStubs = group;
}

@Override
public boolean getGroupByCrosslinkerStubs() {
return this.groubByCrosslinkerStubs;
}


}
Loading

0 comments on commit 5e06093

Please sign in to comment.