Skip to content
Snippets Groups Projects
Commit 6e986cbf authored by valot's avatar valot
Browse files

Debugging peptide order!!!

git-svn-id: https://subversion.renater.fr/xtandempipeline/trunk@80 b8ef2a07-7df7-436f-90b9-41648038564b
parent 63fb28a6
No related branches found
No related tags found
No related merge requests found
Showing
with 42 additions and 26 deletions
......@@ -36,17 +36,17 @@ public class XtandemPipelineMain {
public static void main(String[] args) {
//Chargement en debug mode
PropertyConfigurator.configure(XtandemPipelineMain.class.getResource("/conf/log4j.properties"));
// PropertyConfigurator.configure(XtandemPipelineMain.class.getResource("/conf/log4j.properties"));
//Chargement en release mode
// if(System.getProperty("os.name").contains("Linux")){
// PropertyConfigurator.configure(XtandemPipelineMain.class.getResource("/conf/log4j.linux.properties"));
// logger.info("Linux logging");
// System.out.print("Linux logging");
// }else{
// PropertyConfigurator.configure(XtandemPipelineMain.class.getResource("/conf/log4j.windows.properties"));
// logger.info("Window logging");
// System.out.print("Linux logging");
// }
if(System.getProperty("os.name").contains("Linux")){
PropertyConfigurator.configure(XtandemPipelineMain.class.getResource("/conf/log4j.linux.properties"));
logger.info("Linux logging");
System.out.print("Linux logging");
}else{
PropertyConfigurator.configure(XtandemPipelineMain.class.getResource("/conf/log4j.windows.properties"));
logger.info("Window logging");
System.out.print("Linux logging");
}
logger.info("Starting new main");
new Main_Windows();
......
......@@ -5,6 +5,7 @@ import java.util.ArrayList;
import java.util.Collections;
import org.apache.log4j.Logger;
import fr.inra.pappso.xtandempipeline.MsException.MSMSException;
import fr.inra.pappso.xtandempipeline.filter_print.filter_base;
import fr.inra.pappso.xtandempipeline.filter_print.print_base;
import fr.inra.pappso.xtandempipeline.filter_print.swt_table_base;
......@@ -102,7 +103,7 @@ public class Identification {
}
}
public void filtered_match(filter_base filter) {
public void filtered_match(filter_base filter) throws MSMSException {
int valid = filter.execute(this.protein_liste);
logger.info("Number of Valid Match " + valid);
}
......
......@@ -7,6 +7,7 @@ import java.util.HashSet;
import org.apache.log4j.Logger;
import fr.inra.pappso.xtandempipeline.MsException.MSMSException;
import fr.inra.pappso.xtandempipeline.grouping.HashProtein;
import fr.inra.pappso.xtandempipeline.grouping.HashSampleScan;
import fr.inra.pappso.xtandempipeline.grouping.HashSampleScanSetPhospho;
......@@ -53,12 +54,17 @@ public class Match implements Comparable<Match> {
this.peptides_order.add(P);
}
public void IndexAndOrderPeptideListe() {
public void IndexAndOrderPeptideListe() throws MSMSException {
this.peptides_match.clear();
Collections.sort(peptides_order);
for (Peptide pep : peptides_order) {
if (!this.peptides_match.containsKey(pep.getHashSampleScan()))
if (!this.peptides_match.containsKey(pep.getHashSampleScan())){
this.peptides_match.put(pep.getHashSampleScan(), pep);
}else{
if(this.peptides_match.get(pep.getHashSampleScan()).get_evalue()>pep.get_evalue()){
throw new MSMSException("OUPS problems of peptide order"+pep.get_sample_scan_sequencepeptide_cle());
}
}
}
}
......@@ -250,7 +256,7 @@ public class Match implements Comparable<Match> {
return phosphoSiteList;
}
public Peptide getBestPeptideToHashSampleScan(HashSampleScan hash) {
public Peptide getBestPeptideToHashSampleScan(HashSampleScan hash) throws MSMSException {
Peptide pep = this.peptides_match.get(hash);
if(pep == null){
logger.error("Hastable of peptide is not indexed");
......
......@@ -56,7 +56,14 @@ public class Peptide implements Comparable<Peptide> {
int i = this.hashSampleScan.compareTo(p.getSampleScan());
if (i != 0)
return (i);
return (int) (this.evalue - p.get_evalue());
float delta = this.evalue - p.get_evalue();
if(delta>0){
return(1);
}else if(delta<0){
return(-1);
}else{
return(0);
}
}
// constructeur
......
......@@ -9,7 +9,7 @@ import org.apache.log4j.Logger;
import fr.inra.pappso.xtandempipeline.XtandemPipelineSession;
import fr.inra.pappso.xtandempipeline.grouping.HashProtein;
public class Protein {
public class Protein implements Comparable<Protein>{
private static final Logger logger = Logger.getLogger(Protein.class);
private float mw;
......@@ -285,7 +285,8 @@ public class Protein {
public void set_peptide_number(int peptide_number) {
this.peptide_numbers = peptide_number;
}
@Override
public int compareTo(Protein prot) {
return (this.get_cle_accession().compareTo(prot.get_cle_accession()));
}
......
......@@ -2,6 +2,7 @@ package fr.inra.pappso.xtandempipeline.filter_print;
import org.apache.log4j.Logger;
import fr.inra.pappso.xtandempipeline.MsException.MSMSException;
import fr.inra.pappso.xtandempipeline.class_msms.MatchList;
public abstract class filter_base {
......@@ -13,7 +14,7 @@ public abstract class filter_base {
public filter_base(){
}
public int execute(MatchList m){
public int execute(MatchList m) throws MSMSException{
//processing de la match_list
return(numberOfValidMatch);
}
......
package fr.inra.pappso.xtandempipeline.filter_print;
import fr.inra.pappso.xtandempipeline.MsException.MSMSException;
import fr.inra.pappso.xtandempipeline.class_msms.Match;
import fr.inra.pappso.xtandempipeline.class_msms.MatchList;
......@@ -10,7 +11,7 @@ public class filter_index_and_order_match_scan extends filter_base {
logger.info("Index and order peptide liste in match");
}
public int execute(MatchList ms) {
public int execute(MatchList ms) throws MSMSException{
// processing de la match_list
for(Match m : ms.getMatchListes()){
m.IndexAndOrderPeptideListe();
......
......@@ -4,6 +4,7 @@ import java.util.HashSet;
import org.apache.log4j.Logger;
import fr.inra.pappso.xtandempipeline.MsException.MSMSException;
import fr.inra.pappso.xtandempipeline.class_msms.MsRun;
public class Group extends HashKey4GroupsSet implements Comparable<Group> {
......@@ -294,7 +295,7 @@ public class Group extends HashKey4GroupsSet implements Comparable<Group> {
}
public int getNumberOfSpecificUniquePeptideInSubGroup(
HashSampleScanSetProt hashProt) {
HashSampleScanSetProt hashProt) throws MSMSException {
HashSet<String> sequences = new HashSet<String>();
for (HashSampleScan hash : hashProt) {
int view = 0;
......
package fr.inra.pappso.xtandempipeline.grouping;
import java.util.HashMap;
import java.util.HashSet;
import java.util.TreeSet;
import org.apache.log4j.Logger;
......
......@@ -5,6 +5,7 @@ import java.util.TreeSet;
import org.apache.log4j.Logger;
import fr.inra.pappso.xtandempipeline.MsException.MSMSException;
import fr.inra.pappso.xtandempipeline.class_msms.Match;
import fr.inra.pappso.xtandempipeline.class_msms.Modifs;
import fr.inra.pappso.xtandempipeline.class_msms.Peptide;
......@@ -71,7 +72,7 @@ public class HashSampleScanSetPhospho extends HashSampleScanSetProt {
return(S);
}
public boolean haveMultiPhosphoPeptide(){
public boolean haveMultiPhosphoPeptide() throws MSMSException{
boolean multi = false;
for(HashSampleScan hash: this){
if(this.match.getBestPeptideToHashSampleScan(hash).get_phospho_Modifs().size()>1)
......
package fr.inra.pappso.xtandempipeline.grouping;
import java.util.HashMap;
import java.util.HashSet;
import org.apache.log4j.Logger;
......@@ -107,7 +106,7 @@ public class HashSampleScanSetProt extends HashSampleScanSet {
return hashPeptideSet;
}
public int getUniquePeptideHashSampleScan() {
public int getUniquePeptideHashSampleScan() throws MSMSException {
HashSet<String> sequence = new HashSet<String>();
for (HashSampleScan hash : this) {
Peptide pep = this.match.getBestPeptideToHashSampleScan(hash);
......@@ -129,7 +128,7 @@ public class HashSampleScanSetProt extends HashSampleScanSet {
return (count);
}
public int getUniqueHashPeptideSampleScantoMsRun(MsRun sample) {
public int getUniqueHashPeptideSampleScantoMsRun(MsRun sample) throws MSMSException {
HashSet<String> sequence = new HashSet<String>();
for (HashSampleScan hash : this) {
Peptide pep = this.match.getBestPeptideToHashSampleScan(hash);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment