diff --git a/xtandempipeline/conf/log4j.properties b/xtandempipeline/conf/log4j.properties index 2ddcc63a162b55a2579106c0f2c6547a764955eb..32c231b3c276b415367a0999e1c3cbb1d0050f21 100644 --- a/xtandempipeline/conf/log4j.properties +++ b/xtandempipeline/conf/log4j.properties @@ -1,10 +1,9 @@ -log4j.rootLogger=warn, stdout +#log4j.rootLogger=warn, stdout log4j.logger.org=error, stdout log4j.logger.com=error, stdout #log4j.logger.fr=info, stdout, rollingFile -log4j.logger.fr.inra.pappso=rollingFile -log4j.logger.fr.inra.pappso=trace,stdout +log4j.logger.fr.inra.pappso=debug,stdout,rollingFile log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout @@ -13,7 +12,7 @@ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%-5p: [%d{yyyy-MM-dd HH:mm:ss,SSS}]-(%F:%-3L>%M): %m%n log4j.appender.rollingFile=org.apache.log4j.RollingFileAppender -log4j.appender.rollingFile.File=${user.home}/.local/log/XtandemPipeline.log +log4j.appender.rollingFile.File=${user.home}/.config/xtandempipeline/XtandemPipeline.log log4j.appender.rollingFile.MaxFileSize=1000KB # Keep one backup file diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/class_msms/Identification.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/class_msms/Identification.java index 38deabc572906e08904bb29426f64d2ebd69a98a..27cbef7b57f34ae60decabfe8deba62db071199c 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/class_msms/Identification.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/class_msms/Identification.java @@ -106,7 +106,7 @@ public class Identification { public void filtered_match(filter_base filter) { int valid = filter.execute(this.protein_liste); - logger.trace("Number of Valid Match " + valid); + logger.info("Number of Valid Match " + valid); } public void print_result(print_base print) throws Exception { @@ -124,7 +124,7 @@ public class Identification { public void setProteinListValideToGroupeSet() { // Seul les match dans le groupSet sont valides - logger.trace("Unvalide match not present in Group"); + logger.info("Unvalide match not present in Group"); for (Match m : protein_liste.getMatchListes()) { m.setIsvalidate(false); } diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/class_msms/config.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/class_msms/config.java index d7a2572810415653eb5b4544195940580d4c361d..5ddc50b99844f8ff0c49eda49a035d409ef4cebc 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/class_msms/config.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/class_msms/config.java @@ -280,10 +280,10 @@ public class config { File xml = new File(this.getRacinePath() + System.getProperty("file.separator") + "xtandempipeline.conf"); if (!xml.exists()){ - logger.trace("New configuration file"); + logger.info("New configuration file"); return (false); } - logger.trace("Load properties configuration from : "+xml.getPath()); + logger.info("Load properties configuration from : "+xml.getPath()); properties.loadFromXML(new FileInputStream(xml)); return (true); } @@ -291,7 +291,7 @@ public class config { public void savePropertiestoXml() throws Exception { File xml = new File(this.getRacinePath() + System.getProperty("file.separator") + "xtandempipeline.conf"); - logger.trace("Save properties condfiguration to : "+xml.getPath()); + logger.info("Save properties condfiguration to : "+xml.getPath()); properties.storeToXML(new FileOutputStream(xml), "Xtandem pipeline configuration file"); } diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/calculation_peptide_fdr.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/calculation_peptide_fdr.java index 425d9499de9bfa53d54642e8fbaf427824f86503..ed152a9afe1e2c99adc77f3f1dca181ab8beaae8 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/calculation_peptide_fdr.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/calculation_peptide_fdr.java @@ -21,7 +21,7 @@ public class calculation_peptide_fdr extends calculation_base_protein { this.reverse = 0; this.normal = 0; this.peptide_view = new Hashtable<Integer,String>(); - logger.trace("Calculation of peptide FDR"); + logger.info("Calculation of peptide FDR"); } protected void processing_match(Match m) { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/calculation_peptide_fdr_distribution.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/calculation_peptide_fdr_distribution.java index aec442190e4c4c60107a751c102f287117c39020..e0902424419191c94129c11acafb636bc3c9359a 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/calculation_peptide_fdr_distribution.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/calculation_peptide_fdr_distribution.java @@ -24,7 +24,7 @@ public class calculation_peptide_fdr_distribution extends databases = new HashMap<String, String>(); fdrs = new HashMap<String, fdr_count>(); this.peptide_view = new HashMap<Integer,String>(); - logger.trace("Print peptide FDR distribution"); + logger.info("Print peptide FDR distribution"); } protected void processing_match(Match m) { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/calculation_peptide_mh_deviation.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/calculation_peptide_mh_deviation.java index d120a90992d39eee2526cff43ad169f0cbb001af..f2b7e211f3f32eadfcf9772e49d1c805fa08893b 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/calculation_peptide_mh_deviation.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/calculation_peptide_mh_deviation.java @@ -18,7 +18,7 @@ public class calculation_peptide_mh_deviation extends calculation_base_peptide { this.is_ppm = is_ppm; list_value_diff = new ArrayList<Float>(); sum = 0; - logger.trace("Calculation of peptide mass deviation"); + logger.info("Calculation of peptide mass deviation"); } protected void processing_peptide(Peptide pep) { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/calculation_protein_fdr.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/calculation_protein_fdr.java index b6ed8f4cbf77224cd3ca58938dcf9d02cccb8244..8c20fa53078560cecfe6df25838d332e5e17564c 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/calculation_protein_fdr.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/calculation_protein_fdr.java @@ -21,7 +21,7 @@ public class calculation_protein_fdr extends calculation_base_protein{ this.reverse = 0; this.normal = 0; this.peptide_view = new HashMap<Integer,String>(); - logger.trace("Calculation of protein fdr"); + logger.info("Calculation of protein fdr"); } protected void processing_match(Match m) { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/calculation_protein_fdr_distribution.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/calculation_protein_fdr_distribution.java index e6bb1cbef112a1961ea03ec50a1ec63e25e99321..8eb27be37c676001100244db6c26fb30e0f146d9 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/calculation_protein_fdr_distribution.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/calculation_protein_fdr_distribution.java @@ -23,7 +23,7 @@ public class calculation_protein_fdr_distribution extends databases = new HashMap<String, String>(); fdrs = new HashMap<String, fdr_count>(); this.peptide_view = new HashMap<Integer, String>(); - logger.trace("Print of protein fdr distribution"); + logger.info("Print of protein fdr distribution"); } protected void processing_match(Match m) { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_index_and_order_match_scan.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_index_and_order_match_scan.java index 5f3f95e95fc329c8dd4f49e5d0589d9be99d36c7..856ded525773fce88a64f703b3091fefb6d95425 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_index_and_order_match_scan.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_index_and_order_match_scan.java @@ -7,7 +7,7 @@ public class filter_index_and_order_match_scan extends filter_base { public filter_index_and_order_match_scan() { super(); - logger.trace("Index and order peptide liste in match"); + logger.info("Index and order peptide liste in match"); } public int execute(MatchList ms) { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_isotopic_modifs.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_isotopic_modifs.java index ac88d9ba39e124a5f3a33b2d79423a6d483aba2e..3a54464298abed7712ca7e566aac6b38434a46c3 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_isotopic_modifs.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_isotopic_modifs.java @@ -14,7 +14,7 @@ public class filter_isotopic_modifs extends filter_base { public filter_isotopic_modifs(ModifsList l) { super(); this.list = l; - logger.trace("Set isotopic modifs"); + logger.info("Set isotopic modifs"); } public int execute(MatchList m) { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_peptide_evalue.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_peptide_evalue.java index 99621a0e75be23ed964029fc1e6e48277280ab98..e596a1ac77d5ac9c04b6babf5e90301a39132aaf 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_peptide_evalue.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_peptide_evalue.java @@ -13,7 +13,7 @@ public class filter_peptide_evalue extends filter_base { public filter_peptide_evalue(float evalue){ super(); this.peptide_evalue = evalue; - logger.trace("Filter peptide on Evalue : "+evalue); + logger.info("Filter peptide on Evalue : "+evalue); } public int execute(MatchList m){ diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_phospho_peptide.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_phospho_peptide.java index 0b5728947259c17dc6b65f8b80fa687ee45d4194..d83efe4928a3f74ed6a3490e81a22f99058bc83c 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_phospho_peptide.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_phospho_peptide.java @@ -10,7 +10,7 @@ public class filter_phospho_peptide extends filter_base { public filter_phospho_peptide() { super(); - logger.trace("Unvalidate match without phosphopeptide and non phosphopeptide"); + logger.info("Unvalidate match without phosphopeptide and non phosphopeptide"); } public int execute(MatchList m) { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_protein_evalue.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_protein_evalue.java index 19848fc9739b57ec8ef6aaccd43a0c2f1b479064..800814049db4be87f750fc76f661b825767d593f 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_protein_evalue.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_protein_evalue.java @@ -10,7 +10,7 @@ public class filter_protein_evalue extends filter_base { public filter_protein_evalue(float evalue) { super(); this.protein_evalue = evalue; - logger.trace("Filter by Evalue protein < " + evalue); + logger.info("Filter by Evalue protein < " + evalue); } public int execute(MatchList m) { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_protein_evalue_to.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_protein_evalue_to.java index fad7fa919de9197a21cba6461443a8032a818420..887de601b2258fb5d25aedfa054f2625c9ec6a2a 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_protein_evalue_to.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_protein_evalue_to.java @@ -12,7 +12,7 @@ public class filter_protein_evalue_to extends filter_base { public filter_protein_evalue_to(float evalue){ super(); this.protein_evalue = evalue; - logger.trace("Filter by Evalue protein on sample < "+evalue); + logger.info("Filter by Evalue protein on sample < "+evalue); } public int execute(MatchList m){ diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_recalcul_protein_evalue.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_recalcul_protein_evalue.java index 6854247ca44bd0b8d77a28c7d7ee834389ac69b3..4893e770cdb59a1bbc607ff01e6696a5a8e88a9f 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_recalcul_protein_evalue.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_recalcul_protein_evalue.java @@ -13,7 +13,7 @@ public class filter_recalcul_protein_evalue extends filter_base { public filter_recalcul_protein_evalue() { super(); - logger.trace("Recalcul protein evalue by product of unique valid peptide"); + logger.info("Recalcul protein evalue by product of unique valid peptide"); } public int execute(MatchList m) { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_unique_peptide_number_to.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_unique_peptide_number_to.java index d50faa7c0143eb3a5b7eaf66629ce02a081fa15c..75522280651e6e703c9bcef5aeea89891db5d7e9 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_unique_peptide_number_to.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/filter_unique_peptide_number_to.java @@ -12,7 +12,7 @@ public class filter_unique_peptide_number_to extends filter_base { public filter_unique_peptide_number_to(int pep_number) { super(); this.peptide_number = pep_number; - logger.trace("Unvalidate match with less than "+pep_number+" peptide number in at leat one sample"); + logger.info("Unvalidate match with less than "+pep_number+" peptide number in at leat one sample"); } public int execute(MatchList m) { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_compar.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_compar.java index 8b721bd6b05df063c5796ca18d3c29f73fd1c5d5..3f67fae3f131e3fa0646123df63f7f1ef3f54bdf 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_compar.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_compar.java @@ -15,7 +15,7 @@ public class print_compar extends print_base { public print_compar(msms_output out, MsRunSet samp) { super(out, samp); - logger.trace("Print Compar file"); + logger.info("Print Compar file"); } public void print_header() throws Exception { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_compar_phospho.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_compar_phospho.java index 71929f1236d2d27830c4aad4d73ed668cac9405c..f2c24954e011feeab275f9edcbff915d2c984f6b 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_compar_phospho.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_compar_phospho.java @@ -15,7 +15,7 @@ public class print_compar_phospho extends print_base { public print_compar_phospho(msms_output out, MsRunSet samp) { super(out, samp); - logger.trace("Print Compar file in phospho mode"); + logger.info("Print Compar file in phospho mode"); } public void print_header() throws Exception { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_fasta.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_fasta.java index 959f52b0e9f7935eaa1bf5a010dbe3c313f56495..5bf29d71fe6fb1583b8e9aa819eb37cd5a8a6ada 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_fasta.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_fasta.java @@ -13,7 +13,7 @@ public class print_fasta extends print_base { public print_fasta() { super(); - logger.trace("Print protein to fasta : "+this.toString()); + logger.info("Print protein to fasta : "+this.toString()); } public void print_header() throws Exception { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_pepnovo.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_pepnovo.java index 65f3cf768b31dbe14446105023779a6944d8134a..2eca2d188ec06c9b6c4779e1e0f0444a6baec2bb 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_pepnovo.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_pepnovo.java @@ -14,7 +14,7 @@ public class print_pepnovo extends print_base { public print_pepnovo(msms_output out, MsRunSet sample) { super(out, sample); - logger.trace("Print PepNovo file"); + logger.info("Print PepNovo file"); } public void print_header(String samp) throws Exception { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_peptide_list.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_peptide_list.java index 019c4559fbdfff950d3db5eb6fae725f4e7d7c94..cc14c658869f8785f41f151d78fcb0a43203f074 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_peptide_list.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_peptide_list.java @@ -14,7 +14,7 @@ public class print_peptide_list extends print_base { public print_peptide_list(msms_output out) { super(out); - logger.trace("Print Peptide liste file in normal mode"); + logger.info("Print Peptide liste file in normal mode"); } public void print_header() throws Exception { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_peptide_list_to_phosphopeptide.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_peptide_list_to_phosphopeptide.java index b93db8b734cfcd0b5b7c3898a08fef63bd014039..a55a58a5dbc5971bfe900bd0c062c98ec494b2d1 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_peptide_list_to_phosphopeptide.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_peptide_list_to_phosphopeptide.java @@ -17,7 +17,7 @@ public class print_peptide_list_to_phosphopeptide extends print_base { public print_peptide_list_to_phosphopeptide(msms_output out) { super(out); - logger.trace("Print Peptide liste file in phospho mode"); + logger.info("Print Peptide liste file in phospho mode"); } public void print_header() throws Exception { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_protein_to_combined.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_protein_to_combined.java index 89e53acd92e2c0587743af38ea6d5517cbdbcc52..5bf65feb26dae960f65b514874e0e87fc0967cfd 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_protein_to_combined.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_protein_to_combined.java @@ -10,7 +10,7 @@ public class print_protein_to_combined extends print_base { public print_protein_to_combined(msms_output out) { super(out); - logger.trace("Print Protein liste file in Combined mode"); + logger.info("Print Protein liste file in Combined mode"); } public void print_header() throws Exception { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_protein_to_indiv.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_protein_to_indiv.java index e5fe1e1fa74e6851982fa714572bfeb9f57758a1..f3339ea5fb950ee474c25ae3f5dc8a05356d589f 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_protein_to_indiv.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_protein_to_indiv.java @@ -12,7 +12,7 @@ public class print_protein_to_indiv extends print_base { public print_protein_to_indiv(msms_output out, MsRunSet sample) { super(out, sample); - logger.trace("Print Protein liste file in Individual mode"); + logger.info("Print Protein liste file in Individual mode"); } public void print_header(MsRun samp) throws Exception { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_protein_to_phosphopeptide.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_protein_to_phosphopeptide.java index 50ff38f6e6e3e1512451e164c1a9c6caf6d207fe..e23e1e330ce136d40a4af4495adce61863edff9e 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_protein_to_phosphopeptide.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_protein_to_phosphopeptide.java @@ -11,7 +11,7 @@ public class print_protein_to_phosphopeptide extends print_base { public print_protein_to_phosphopeptide(msms_output out) { super(out); - logger.trace("Print Protein liste file in Phospho mode"); + logger.info("Print Protein liste file in Phospho mode"); } public void print_header() throws Exception { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/swt_table_peptide.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/swt_table_peptide.java index f59ab5641fa75ec38df3e7e6c0d133f3397158f0..31825d4cd1b21656a7620b4776c9aa6e57ee2122 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/swt_table_peptide.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/swt_table_peptide.java @@ -68,7 +68,7 @@ public class swt_table_peptide extends swt_table_base { filter_value = ""; filtercolumn = ""; // filter = ""; - logger.trace("View SWT Peptide Table on type :" + type.getType()); + logger.info("View SWT Peptide Table on type :" + type.getType()); } protected boolean set_table_item(Group group) throws Exception { @@ -82,7 +82,7 @@ public class swt_table_peptide extends swt_table_base { if (!filter) return false; - logger.trace("View SWT peptide Table on protein:" + logger.info("View SWT peptide Table on protein:" + protein.getMatch().get_protein_match().get_cle_accession()); // filtrage de la table des peptides diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/swt_table_protein.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/swt_table_protein.java index 7f2199fe09499cd9676e646bf72a4dd8a23f90b9..ea1c8c5b1ccb458e3c679b04d32e81f4263edfa9 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/swt_table_protein.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/swt_table_protein.java @@ -59,7 +59,7 @@ public class swt_table_protein extends swt_table_base { color = true; filter = ""; subgroup_count = 0; - logger.trace("View SWT Protein Table on type :" + type.getType()); + logger.info("View SWT Protein Table on type :" + type.getType()); } protected boolean set_table_item(Group group) throws Exception { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/grouping/GroupSet.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/grouping/GroupSet.java index aec1c667ba4d5c6856c9f2636923e5f3e9168dd0..1712c63efe25596384fafeed95224082dee67670 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/grouping/GroupSet.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/grouping/GroupSet.java @@ -91,7 +91,7 @@ public class GroupSet { public void removeGroupFromDatabase(File database) { // TODO Remove Group from this database - logger.trace("Remove Group from Database: " + database.getName()); + logger.info("Remove Group from Database: " + database.getName()); for (Group group : this.getGroupList()) { boolean isconta = false; for (SubGroup sg : group.getSubGroupSet()) { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/MassChroQML.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/MassChroQML.java index 34c6f66351eca744f5b67eeae638ba0e4d787738..f0a176401e744e6565754cf37a49b6b650892bbb 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/MassChroQML.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/MassChroQML.java @@ -60,7 +60,7 @@ public class MassChroQML { private Hashtable<String, String> sample_to_id; public MassChroQML(File F) throws Exception { - logger.trace("Save result in MassChroQ file"); + logger.info("Save result in MassChroQ file"); this.qmscpp_file = F; this.prot_to_id = new Hashtable<String, String>(); this.seq_to_element = new Hashtable<String, Element>(); diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/XtandemPhospho.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/XtandemPhospho.java index bf456f557e0fb086bbe022242cf297294f1c8667..4466b77007ce8e268356e05d8a0fc7ccf8b57e42 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/XtandemPhospho.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/XtandemPhospho.java @@ -98,7 +98,7 @@ public class XtandemPhospho extends org.xml.sax.helpers.DefaultHandler { correction_scan = new Hashtable<String, String>(); correction_time = new Hashtable<String, String>(); peptide_list = new Vector<Peptide>(); - logger.trace("Parse Xtandem file in phospho Mode : "+sample_.getName()); + logger.info("Parse Xtandem file in phospho Mode : "+sample_.getName()); } public void endDocument() throws SAXException { @@ -119,7 +119,7 @@ public class XtandemPhospho extends org.xml.sax.helpers.DefaultHandler { // } } - logger.trace("Parse Xtandem file finish"); + logger.info("Parse Xtandem file finish"); } public void startElement(String namespaceURI, String simpleName, diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/load_project.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/load_project.java index 021ec2a1c26255317f3b9947985288909d379e3d..9e3bb0f86c99ed6bef3108306b4d40f6ea560a4b 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/load_project.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/load_project.java @@ -61,11 +61,11 @@ public class load_project extends org.xml.sax.helpers.DefaultHandler { Last_element_ = ""; Start_element_ = ""; C_data = ""; - logger.trace("Load project ..."); + logger.info("Load project ..."); } public void endDocument() throws SAXException { - logger.trace("Load project finish"); + logger.info("Load project finish"); } public void startElement(String namespaceURI, String simpleName, diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/new_xtandem_param.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/new_xtandem_param.java index 30d4e97bf853003d3b24ef8e829c32f3b4aeb501..5b3ea70a49b74872eaf4053a3002bb48c4f138f8 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/new_xtandem_param.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/new_xtandem_param.java @@ -33,7 +33,7 @@ public class new_xtandem_param extends org.xml.sax.helpers.DefaultHandler { Last_element_ = ""; Start_element_ = ""; C_data = ""; - logger.trace("Create new xtamde param"); + logger.info("Create new xtamde param"); } public void endDocument() throws SAXException { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/parse_file.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/parse_file.java index 6b6502c818ed0ea72ee7ded499d13640bb4cb635..b370d7e20ac5f049040e33a1025fa45546f8c2c6 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/parse_file.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/parse_file.java @@ -28,7 +28,7 @@ public class parse_file { // on recupere le handler et le fichier à parser this.handler = h; this.file_to_parse = f; - logger.trace("Parsing xml file : "+f.getName()); + logger.info("Parsing xml file : "+f.getName()); if (!this.file_to_parse.exists()) throw new MSMSException("The file " + file_to_parse.getAbsolutePath() diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/proticdbml.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/proticdbml.java index 11e19a6d96961179ddf9349fcad6a8a42bfa6a2f..872ba9efb7da0885c515ec201af31edb75241a38 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/proticdbml.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/proticdbml.java @@ -47,7 +47,7 @@ public class proticdbml { private Hashtable<String, String> msrun_to_id; public proticdbml(File F) throws Exception { - logger.trace("Save result in ProticDBml"); + logger.info("Save result in ProticDBml"); this.proticfile = F; this.prot_to_id = new Hashtable<String, String>(); this.pep_to_id = new Hashtable<String, String>(); diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/save_project.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/save_project.java index 958b9a0f9219683a5a50be0d299545defadfb476..15576acf1b1777b468c2108180dc0e29151d4a57 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/save_project.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/save_project.java @@ -40,7 +40,7 @@ public class save_project { } public void write_data_to(File save) throws Exception { - logger.trace("Save project ..."); + logger.info("Save project ..."); XMLOutputFactory outputFactory = XMLOutputFactory.newInstance(); //FileWriter output = new FileWriter(save); @@ -77,7 +77,7 @@ public class save_project { writer.close(); output.close(); - logger.trace("Save project finish"); + logger.info("Save project finish"); } private void write_result_to(Identification ident) throws Exception { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/xtandem.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/xtandem.java index 6e24ec2bb8859c932aa22398741e61897d4300b5..2f459f5acf9f394a97518895db26292b1daf694b 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/xtandem.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/xtandem.java @@ -97,7 +97,7 @@ public class xtandem extends org.xml.sax.helpers.DefaultHandler { correction_scan = new Hashtable<String, String>(); correction_time = new Hashtable<String, String>(); peptide_list = new Vector<Peptide>(); - logger.trace("Parse Xtandem file in normal Mode : " + sample_.getName()); + logger.info("Parse Xtandem file in normal Mode : " + sample_.getName()); } public void endDocument() throws SAXException { @@ -117,7 +117,7 @@ public class xtandem extends org.xml.sax.helpers.DefaultHandler { pep.set_RT(correction_time.get("" + pep.get_scan())); // } } - logger.trace("Parse Xtandem file finish"); + logger.info("Parse Xtandem file finish"); } public void startElement(String namespaceURI, String simpleName, diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/xtandem_ms2_spectra.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/xtandem_ms2_spectra.java index 42db4a56896b66681665a3ae5da0a009593e13f5..7deeb6b77a16ad193f068f7cf128a5d331f747ef 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/xtandem_ms2_spectra.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/xtandem_ms2_spectra.java @@ -32,7 +32,7 @@ public class xtandem_ms2_spectra extends org.xml.sax.helpers.DefaultHandler { public xtandem_ms2_spectra(Peptide p) { super(); pep_ = p; - logger.trace("Load MSMS spectra of : "+pep_.getHashSampleScan().toString()); + logger.info("Load MSMS spectra of : "+pep_.getHashSampleScan().toString()); } public void error(SAXParseException e) throws SAXParseException { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/xtandem_params.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/xtandem_params.java index 3ed8b4a27ec984c2ebb6f2060bb72f86f16cad1e..f710feb736edc5c61ec3c40427555caaeb8b0c83 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/xtandem_params.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/sax_parse/xtandem_params.java @@ -26,7 +26,7 @@ public class xtandem_params { } public void load_xml(File xml) throws Exception { - logger.trace("Load xtandem param from : "+xml.getName()); + logger.info("Load xtandem param from : "+xml.getName()); new parse_file(new xml_xtandem_param(this),xml); } diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/base_shell.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/base_shell.java index 9040a37d77ca771939da5a069797da81ea993312..c4a2e0bf7b3b7b1b72845d83944e09c3a5df1ebd 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/base_shell.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/base_shell.java @@ -14,7 +14,7 @@ public class base_shell { private StringBuilder stdout; - private String error; + private Exception error; private Process process_run; @@ -23,7 +23,7 @@ public class base_shell { public base_shell() { application = ""; stdout = new StringBuilder(); - error = ""; + error = null; } public void set_commande(String[] commande) { @@ -55,14 +55,14 @@ public class base_shell { System.out.println(mess); } - public String get_error() { + public Exception get_error() { // gérer les erreurs return (error); } - protected void set_error(String err) { + protected void set_error(Exception ioe) { // gérer les erreurs - this.error += err + "\n"; + this.error = ioe; } public boolean status() { @@ -97,7 +97,7 @@ public class base_shell { test_result(); } } catch (IOException ioe) { - set_error(""+ioe); + set_error(ioe); } } } diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/combined.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/combined.java index 512268891130d14c4baf7aaf233c8834aae7e4ec..a3cdb925506a2e52874b8801ee7658ead5fc8ff3 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/combined.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/combined.java @@ -30,7 +30,7 @@ public class combined extends process { } protected void processing() throws Exception { - logger.trace("Process result in Combine mode"); + logger.info("Process result in Combine mode"); // Ecrire le process et penser à relever des StopException xtandem handler = new xtandem(); diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/filtered_and_create_grouping.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/filtered_and_create_grouping.java index 3baed418b993888f0bef439d56e91c59335721bd..0561d56bd1f0cb8eed162a6e7549bd826f17a18c 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/filtered_and_create_grouping.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/filtered_and_create_grouping.java @@ -24,7 +24,7 @@ public class filtered_and_create_grouping extends process { } protected void processing() throws Exception { - logger.trace("Filtered result and create grouped"); + logger.info("Filtered result and create grouped"); //restreindre la liste des protéines aux protéines identifiées this.set_view("Removing redondant proteins"); diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/individual.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/individual.java index b35f598c756f92e3eebd62454085f079f7f6bad3..dc7d3305146097ed3d789fad68482b401fb07a0c 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/individual.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/individual.java @@ -28,7 +28,7 @@ public class individual extends process { } protected void processing() throws Exception { - logger.trace("Process result in Individual mode"); + logger.info("Process result in Individual mode"); // Ecrire le process et penser à relever des StopException for (int i = 0; i < xtandem.size(); i++) { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/phosphosite.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/phosphosite.java index 1d06895c72d0f74fc92e6be914ea127592d50134..b7eb9c331a7757ad180d24fd3d0d612bb85b90e0 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/phosphosite.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/phosphosite.java @@ -30,7 +30,7 @@ public class phosphosite extends process { } protected void processing() throws Exception { - logger.trace("Process result in Phopho mode"); + logger.info("Process result in Phopho mode"); // Ecrire le process et penser à relever des StopException XtandemPhospho handler = new XtandemPhospho(); for (int i = 0; i < xtandem.size(); i++) { diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_base.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_base.java index 49403166309f045c9db12e78ac2bdb295e517f39..567e491776f4b57c4e89380841956d6fe41e9c88 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_base.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_base.java @@ -37,25 +37,9 @@ public class printing_base extends process { this.set_max_progress(8); } - public void run() { - try { - this.processing(); - } catch (StopException e) { - } catch (Exception e) { - e.printStackTrace(); - StackTraceElement[] f = e.getStackTrace(); - this.setError(e.getMessage() + "\nat : " + f[0].toString()); - // print error on screen!!! - // stopping(""+e); - this.set_view("Error:\n" + this.getError()); - this.setStop(true); - e.printStackTrace(); - } - } - protected void processing() throws Exception { // Ecrire le process et penser à relever des StopException - logger.trace("Printing to other format"); + logger.info("Printing to other format"); msms_output output = new msms_output(); diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_combine.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_combine.java index daddee12ab5d1f67ea7bb39fc537cf4ca7c75cf5..9bdd5f6deabffd8814505f7e01ef52d1be1f3d5e 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_combine.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_combine.java @@ -15,7 +15,7 @@ public class printing_combine extends printing_base { } protected void specific_printing() throws Exception { - logger.trace("Print combine results"); + logger.info("Print combine results"); this.set_view("Printing protein file results"); msms_output output = new msms_output(); diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_indiv.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_indiv.java index 7e44fc0964a4a4a3974b5e6959590b1b73a02b95..8ecb161fa9527be0090a7c473f0ccf4fba9ca420 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_indiv.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_indiv.java @@ -16,7 +16,7 @@ public class printing_indiv extends printing_base { } protected void specific_printing () throws Exception { - logger.trace("Print individual results"); + logger.info("Print individual results"); this.set_view("Printing protein file results"); msms_output output = new msms_output(); diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_phosphopeptide.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_phosphopeptide.java index ad6f939309ba223af665d3b18692880936ec2c19..61f9f9394d987ffa384edcce11e8c65ac1240b23 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_phosphopeptide.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_phosphopeptide.java @@ -15,7 +15,7 @@ public class printing_phosphopeptide extends printing_base { } protected void specific_printing() throws Exception { - logger.trace("Print phophopeptide results"); + logger.info("Print phophopeptide results"); this.set_view("Printing protein file results"); msms_output output = new msms_output(); diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/process.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/process.java index 375b03d93c8815a33b1a52dbcf514347da6a4aa1..9ff24dfc1499d872411a7e3e2c55acc0985219ef 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/process.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/process.java @@ -15,7 +15,7 @@ public class process extends Thread { private boolean stop; - private String error; + private Exception error; protected config conf; @@ -27,7 +27,7 @@ public class process extends Thread { public process(config conf) { super(); - this.error = ""; + this.error = null; this.setStop(false); this.view = ""; this.setConf(conf); @@ -39,27 +39,24 @@ public class process extends Thread { try { long start = System.currentTimeMillis(); this.processing(); - System.out.println("Execution time = "+(System.currentTimeMillis()-start)/1000); + logger.info("Execution time = "+(System.currentTimeMillis()-start)/1000); } catch (StopException e) { + logger.info("Process were stopping"); } catch (Exception e) { - e.printStackTrace(); + this.error = e; + logger.error("Process were stopping"); + logger.error(e.getMessage()); StackTraceElement[] f = e.getStackTrace(); - this.setError(e.getMessage() + "\nat : " + f[0].toString()); - // print error on screen!!! - // stopping(""+e); - this.set_view("Error:\n" + this.getError()); + for(int i = 0;i<f.length;i++){ + logger.error(f[i]); + } + this.set_view("Error:\n" + e.getMessage()); this.setStop(true); } } protected void processing() throws Exception { // Ecrire le process et penser à relever des StopException - - } - - public void stopping() throws Exception { - - throw new StopException("Stopping"); } public String getView() { @@ -73,14 +70,10 @@ public class process extends Thread { this.view = v; } - public String getError() { + public Exception getError() { return (this.error); } - public void setError(String S) { - this.error = S; - } - public void setStop(boolean stop) { this.stop = stop; this.view = "Stopping..."; diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/reinitialise_result_filter_and_create_grouping.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/reinitialise_result_filter_and_create_grouping.java index 1600978c417ec661f99ede584f9e38dabf876e46..d5c744fef42c20f6196746a6b0f673f8e42bd19f 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/reinitialise_result_filter_and_create_grouping.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/reinitialise_result_filter_and_create_grouping.java @@ -27,7 +27,7 @@ public class reinitialise_result_filter_and_create_grouping extends process { } protected void processing() throws Exception { - logger.trace("Reinitialise result and performed filter and grouping"); + logger.info("Reinitialise result and performed filter and grouping"); //reinitilaise les peptides this.set_view("Reinitialise peptide"); diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/save_result_and_filtering.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/save_result_and_filtering.java index 8a5cc4c15e6738c3892f021846c00195fbb20ace..44ba5e0312167c8eef03cf123e67bf9b439dc136 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/save_result_and_filtering.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/save_result_and_filtering.java @@ -29,7 +29,7 @@ public class save_result_and_filtering extends process { } protected void processing() throws Exception { - logger.trace("save result and filter"); + logger.info("save result and filter"); // Invalider les protéines non présents dans les protéines identifiées this.set_view("Removing redondant proteins"); diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/xtandem_analysis.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/xtandem_analysis.java index 8816f530f2aa0e7bec0762556d73abcf550e5cd0..b0472a9a735a4e54ad58a93a93b700845f1081dc 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/xtandem_analysis.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/xtandem_analysis.java @@ -8,8 +8,6 @@ import fr.inra.pappso.xtandempipeline.MsException.StopException; import fr.inra.pappso.xtandempipeline.class_msms.config; import fr.inra.pappso.xtandempipeline.sax_parse.msms_output; - - public class xtandem_analysis extends process { private File[] xtandem; @@ -25,7 +23,7 @@ public class xtandem_analysis extends process { } protected void processing() throws Exception { - logger.trace("Xtandem analysis start"); + logger.info("Xtandem analysis start"); //creation du fichier database File databasexml = new File(this.save_dir.getAbsolutePath()+System.getProperty("file.separator")+"database.xml"); msms_output out = new msms_output(); @@ -42,7 +40,7 @@ public class xtandem_analysis extends process { File infile = new File(this.save_dir.getAbsolutePath()+System.getProperty("file.separator")+"infile.xml"); for (int i = 0; i < xtandem.length; i++) { - logger.trace("Xtandem analysis on : "+xtandem[i].getName()); + logger.info("Xtandem analysis on : "+xtandem[i].getName()); File result_out = new File(this.get_out(xtandem[i])); // parsing //creation du fichier infile @@ -76,12 +74,12 @@ public class xtandem_analysis extends process { //System.out.println(pipe.getStatus()); } - if (!pipe.get_error().equals("")) - throw new MSMSException(pipe.get_error()); + if (pipe.get_error()!=null) + throw pipe.get_error(); if(!result_out.exists()) - throw new MSMSException("Problems durnig analysis of '"+xtandem[i].getName()+"'\n"+pipe.get_Stdout()); + throw new MSMSException("Analysis of '"+xtandem[i].getName()+" give no result'\n"+pipe.get_Stdout()); - logger.trace("finish"); + logger.info("finish"); this.add_current_progress(); } databasexml.delete(); diff --git a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/ui/swt/Main_Windows.java b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/ui/swt/Main_Windows.java index 87fb7f5c6637b555a9f69282e0b8929f43555019..0de50909aafdab1bad68878e713d532a4e8b13eb 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/ui/swt/Main_Windows.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/ui/swt/Main_Windows.java @@ -18,7 +18,6 @@ import fr.inra.pappso.xtandempipeline.thread.DataType_Combine; import fr.inra.pappso.xtandempipeline.thread.DataType_individual; import fr.inra.pappso.xtandempipeline.thread.DataType_phosphopeptide; import fr.inra.pappso.xtandempipeline.thread.load_result_and_create_grouping; -import fr.inra.pappso.xtandempipeline.thread.printing_base; import fr.inra.pappso.xtandempipeline.thread.process; import fr.inra.pappso.xtandempipeline.thread.reinitialise_result_filter_and_create_grouping; import fr.inra.pappso.xtandempipeline.thread.save_result_and_filtering; @@ -70,7 +69,8 @@ public class Main_Windows { protected Shell shell; - //protected DataType_Base XtandemPipelineSession.getInstance().getDataTypeBase(); + // protected DataType_Base + // XtandemPipelineSession.getInstance().getDataTypeBase(); private Peptide_Details peptide_details; @@ -91,21 +91,21 @@ public class Main_Windows { private Image[] images; private Vector<Button> buttons; - + private Vector<MenuItem> items; private Button filter_button; public Main_Windows() { logger.debug("Main_Windows begin"); - //ouverture d'une session + // ouverture d'une session boolean oldconfig = false; - try { + try { conf = XtandemPipelineSession.getInstance().getConfig(); oldconfig = conf.loadPropertiesFromXml(); } catch (Exception e) { - logger.error("Problem to load old config file"+e); - e.printStackTrace(); + logger.error("Problem to load old config file" + e); + // e.printStackTrace(); } buttons = new Vector<Button>(); items = new Vector<MenuItem>(); @@ -134,9 +134,9 @@ public class Main_Windows { shell.setImages(images); this.set_window(); - - shell.setText("X!Tandem results "+XtandemPipelineMain.version); - + + shell.setText("X!Tandem results " + XtandemPipelineMain.version); + if (!oldconfig) new Path_configuration(this); @@ -221,7 +221,9 @@ public class Main_Windows { } protected void calcul_fdr(Button widget) { - if ( XtandemPipelineSession.getInstance().getDataTypeBase().getIs_active() && database_list.getSelectionCount() > 0) { + if (XtandemPipelineSession.getInstance().getDataTypeBase() + .getIs_active() + && database_list.getSelectionCount() > 0) { String[] databases = database_list.getSelection(); calculation_peptide_fdr calc_pep = new calculation_peptide_fdr( @@ -343,17 +345,23 @@ public class Main_Windows { item0.setHeight(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT).y); item0.setControl(composite); } - + private void update_filter_param() { - ((Text) filter_button.getData("peptide")).setText(""+XtandemPipelineSession.getInstance().getConfig().get_peptide_evalue()); - ((Text) filter_button.getData("pepnumber")).setText(""+XtandemPipelineSession.getInstance().getConfig().get_peptide_number()); - ((Text) filter_button.getData("protein")).setText(""+XtandemPipelineSession.getInstance().getConfig().get_protein_evalue()); + ((Text) filter_button.getData("peptide")).setText("" + + XtandemPipelineSession.getInstance().getConfig() + .get_peptide_evalue()); + ((Text) filter_button.getData("pepnumber")).setText("" + + XtandemPipelineSession.getInstance().getConfig() + .get_peptide_number()); + ((Text) filter_button.getData("protein")).setText("" + + XtandemPipelineSession.getInstance().getConfig() + .get_protein_evalue()); } - protected void filter_results_to(Button widget) { try { - if (! XtandemPipelineSession.getInstance().getDataTypeBase().getIs_active()) + if (!XtandemPipelineSession.getInstance().getDataTypeBase() + .getIs_active()) throw new StopException(""); float fl1; float fl2; @@ -386,14 +394,20 @@ public class Main_Windows { process p = new reinitialise_result_filter_and_create_grouping( conf, identifications.elementAt(identif_select - .getSelectionIndex()), XtandemPipelineSession.getInstance().getDataTypeBase()); + .getSelectionIndex()), XtandemPipelineSession + .getInstance().getDataTypeBase()); new Running(this, p, false); + if (p.isStop()) + throw new StopException(""); + if (p.getError() != null) + throw p.getError(); + this.view_result(); } catch (StopException e) { // TODO Auto-generated catch block - System.out.println("stop"); + logger.debug("stop"); } catch (MSMSException e) { MessageBox messageBox = new MessageBox(shell, SWT.ERROR); messageBox.setMessage(e.getMessage()); @@ -407,7 +421,8 @@ public class Main_Windows { boolean type = false; if (((Combo) widget.getData("type")).getSelectionIndex() == 0) type = true; - if ( XtandemPipelineSession.getInstance().getDataTypeBase().getIs_active()) { + if (XtandemPipelineSession.getInstance().getDataTypeBase() + .getIs_active()) { calculation_peptide_mh_deviation calc = new calculation_peptide_mh_deviation( type); int index = identif_select.getSelectionIndex(); @@ -493,7 +508,7 @@ public class Main_Windows { MenuItem xtandemitem = new MenuItem(xtandem, SWT.NONE); xtandemitem.setText("Analysis"); new MenuItem(fileMenu, SWT.SEPARATOR); - + // Create all the items in the File dropdown menu MenuItem newItem = new MenuItem(fileMenu, SWT.CASCADE); newItem.setText("Load result"); @@ -604,15 +619,21 @@ public class Main_Windows { } private void update_identification_result() { - logger.debug("Number of identification results : "+identifications.size()); + logger.debug("Number of identification results : " + + identifications.size()); identif_select.removeAll(); - logger.debug("datatype=" + XtandemPipelineSession.getInstance().getDataTypeBase()); - if ( XtandemPipelineSession.getInstance().getDataTypeBase().getIs_active()) { - if ( XtandemPipelineSession.getInstance().getDataTypeBase().getIs_invididual()) { + logger.debug("datatype=" + + XtandemPipelineSession.getInstance().getDataTypeBase()); + if (XtandemPipelineSession.getInstance().getDataTypeBase() + .getIs_active()) { + if (XtandemPipelineSession.getInstance().getDataTypeBase() + .getIs_invididual()) { for (Identification ident : identifications) { - identif_select.add(ident.get_samples().getMsRunList().get(0).getSampleName()); + identif_select.add(ident.get_samples().getMsRunList() + .get(0).getSampleName()); } - } else if (! XtandemPipelineSession.getInstance().getDataTypeBase().getIs_phosphopeptide()) { + } else if (!XtandemPipelineSession.getInstance().getDataTypeBase() + .getIs_phosphopeptide()) { identif_select.add("Combine result"); } else { identif_select.add("Phosphopeptide result"); @@ -620,11 +641,11 @@ public class Main_Windows { identif_select.select(0); identif_select.update(); this.view_result(); - - //on met à jour les valeurs de filtrage + + // on met à jour les valeurs de filtrage this.update_filter_param(); - - //on degrise les menus + + // on degrise les menus for (Button but : buttons) but.setEnabled(true); for (MenuItem it : items) @@ -634,32 +655,37 @@ public class Main_Windows { } protected boolean view_result() { - if (! XtandemPipelineSession.getInstance().getDataTypeBase().getIs_active()) + if (!XtandemPipelineSession.getInstance().getDataTypeBase() + .getIs_active()) return (false); int index = identif_select.getSelectionIndex(); - System.out.println(index + ""); + logger.debug(index + ""); Text t = (Text) identif_select.getData("sample"); t.setText("" + identifications.elementAt(index).get_samples().size()); - //shell.setText(identif_select.getItem(index)); + // shell.setText(identif_select.getItem(index)); Text t2 = (Text) identif_select.getData("group"); - t2.setText("" + identifications.elementAt(index).getGrouping().getGroupList().size()); + t2.setText("" + + identifications.elementAt(index).getGrouping().getGroupList() + .size()); t.update(); t2.update(); - + // on mets à jour la liste des bases de données database_list.removeAll(); - for (Database url : identifications.elementAt(index).get_database_list()) + for (Database url : identifications.elementAt(index) + .get_database_list()) database_list.add(url.getDatabasePath()); // envoyer les signaux aux autres fenetres - this.protein_list - .load_data(identifications.elementAt(index), XtandemPipelineSession.getInstance().getDataTypeBase()); + this.protein_list.load_data(identifications.elementAt(index), + XtandemPipelineSession.getInstance().getDataTypeBase()); return (true); } public void view_protein(Identification ident, SubGroup sg, HashSampleScanSetProt hashProt) { - this.peptide_list.load_data(ident, hashProt, XtandemPipelineSession.getInstance().getDataTypeBase()); + this.peptide_list.load_data(ident, hashProt, XtandemPipelineSession + .getInstance().getDataTypeBase()); this.protein_details.view_protein_details(hashProt); } @@ -690,7 +716,7 @@ public class Main_Windows { && (se.getData("menuitem").equals(menu))) se.setMinimized(false); } - + window_base base = (window_base) menu.getData("windows"); if (base.getShell() == null || base.getShell().isDisposed()) base.open_windows(); @@ -723,12 +749,13 @@ public class Main_Windows { protected void export_identification_results() { try { - DataType_Base datatype = XtandemPipelineSession.getInstance().getDataTypeBase(); - if (! datatype.getIs_active()) + DataType_Base datatype = XtandemPipelineSession.getInstance() + .getDataTypeBase(); + if (!datatype.getIs_active()) throw new StopException(""); - //on recree un nouveau printer sinon erreur si déjà processer + // on recree un nouveau printer sinon erreur si déjà processer datatype.newPrint(); - + datatype.getPrint().setIdentifications(identifications); Export_Windows export = new Export_Windows(this); @@ -738,10 +765,10 @@ public class Main_Windows { new Running(this, datatype.getPrint(), false); - if (! datatype.getPrint().getError().equalsIgnoreCase("")) - throw new MSMSException( datatype.getPrint().getError()); - if ( datatype.getPrint().isStop()) + if (datatype.getPrint().isStop()) throw new StopException(""); + if (datatype.getPrint().getError() != null) + throw datatype.getPrint().getError(); MessageBox messageBox = new MessageBox(shell, SWT.OK); messageBox.setMessage("Export results save as :\n" @@ -749,7 +776,7 @@ public class Main_Windows { messageBox.open(); } catch (StopException e) { // TODO Auto-generated catch block - System.out.println("stop"); + logger.debug("stop"); } catch (Exception e) { this.view_error(e, "Problems trying to export results :"); } @@ -757,7 +784,7 @@ public class Main_Windows { protected void analysed(DataType_Base type) { try { - //on met à jour le type de datatype + // on met à jour le type de datatype XtandemPipelineSession.getInstance().setDataTypeBase(type); // configuration des paramètres de filtrage Filter_Windows filter = new Filter_Windows(this); @@ -765,12 +792,11 @@ public class Main_Windows { throw new StopException("Stopping"); new Running(this, type.getPro(), false); - System.out.println("Finich"); if (type.getPro().isStop()) throw new StopException("Stopping"); - if (!type.getPro().getError().equalsIgnoreCase("")) - throw new MSMSException(type.getPro().getError()); + if (type.getPro().getError() != null) + throw type.getPro().getError(); identifications = type.getPro().getIdentifications(); if (identifications.size() == 0) @@ -780,7 +806,7 @@ public class Main_Windows { } catch (StopException e) { // TODO Auto-generated catch block - System.out.println("stop"); + logger.debug("stop"); } catch (Exception e) { this.view_error(e, "Problems trying to load results :"); } @@ -790,7 +816,8 @@ public class Main_Windows { try { if (!conf.getXtandem_software_installed()) throw new MSMSException( - "X!Tandem executable is not installed. Please see :\n\tOptions->Path configuration\n\tAbout->Documentation"); + "X!Tandem executable is not installed. Please see :" + +"\n\tOptions->Path configuration\n\tAbout->Documentation"); xtandem_analysis xtande = new xtandem_analysis(conf); Xtandem_Analysis_Param params = new Xtandem_Analysis_Param(this, @@ -800,10 +827,10 @@ public class Main_Windows { new Running(this, xtande, true); - if (!xtande.getError().equalsIgnoreCase("")) - throw new MSMSException(xtande.getError()); if (xtande.isStop()) throw new StopException(""); + if (xtande.getError() != null) + throw xtande.getError(); MessageBox messageBox = new MessageBox(shell, SWT.OK); messageBox @@ -812,80 +839,89 @@ public class Main_Windows { messageBox.open(); } catch (StopException e) { - System.out.println("stop"); - } catch (MSMSException e) { - MessageBox messageBox = new MessageBox(shell, SWT.ERROR); - messageBox.setMessage(e.getMessage()); - messageBox.open(); + logger.debug("stop"); } catch (Exception e) { this.view_error(e, "Problems during X!Tandem analysis :"); } } protected void view_error(Exception e, String text_error) { + logger.error(text_error); + logger.error(e.getMessage()); StackTraceElement[] f = e.getStackTrace(); - String error = e.getMessage() + "\nat : " + f[0].toString() + "\n" - + f[1].toString(); + String error; + if(e.getClass().equals(MSMSException.class)){ + error = e.getMessage(); + }else{ + error = e.getMessage() + "\nat : " + f[0].toString() + "\n" + + f[1].toString() + "\n" + f[2].toString(); + } MessageBox messageBox = new MessageBox(shell, SWT.ERROR); messageBox.setMessage(text_error + "\n" + error); messageBox.open(); - e.printStackTrace(); } public void load_current_project() { try { File out = this.get_file_project("Load project", SWT.OPEN); - load_result_and_create_grouping loading = new load_result_and_create_grouping(conf,out); + load_result_and_create_grouping loading = new load_result_and_create_grouping( + conf, out); new Running(this, loading, false); - - if (!loading.getError().equalsIgnoreCase("")) - throw new MSMSException(loading.getError()); + if (loading.isStop()) throw new StopException(""); - + if (loading.getError() != null) + throw loading.getError(); + this.identifications = loading.getIdentifications(); - + this.update_identification_result(); } catch (StopException e) { - System.out.println("stop"); + logger.debug("stop"); } catch (Exception e) { - this.view_error(e, "Problems during X!Tandem analysis :"); + this.view_error(e, "Problems during loading project :"); } } public void save_current_project() { try { - if (! XtandemPipelineSession.getInstance().getDataTypeBase().getIs_active()) + if (!XtandemPipelineSession.getInstance().getDataTypeBase() + .getIs_active()) throw new StopException(""); - File out = this.get_file_project("Save current project as", SWT.SAVE); - save_result_and_filtering save = new save_result_and_filtering(conf, out, identifications, XtandemPipelineSession.getInstance().getDataTypeBase()); - new Running(this,save,false); - - if (!save.getError().equalsIgnoreCase("")) - throw new MSMSException(save.getError()); + File out = this.get_file_project("Save current project as", + SWT.SAVE); + save_result_and_filtering save = new save_result_and_filtering( + conf, out, identifications, XtandemPipelineSession + .getInstance().getDataTypeBase()); + new Running(this, save, false); + if (save.isStop()) throw new StopException(""); + if (save.getError() != null) + throw save.getError(); } catch (StopException e) { - System.out.println("stop"); + logger.debug("stop"); } catch (Exception e) { - this.view_error(e, "Problems during X!Tandem analysis :"); + this.view_error(e, "Problems during saving project :"); } } - - private File get_file_project(String information,int type) throws StopException { - FileDialog dlg = new FileDialog(shell, type|SWT.SINGLE); - dlg.setFilterPath(conf.getXmlresult().getPath()); - dlg.setText(information); - dlg.setFilterExtensions(new String[]{"*.xpip","*.*"}); - dlg.setFilterNames(new String[]{"X!Tandem pipeline project","All files"}); - String fileName = dlg.open(); - if (fileName == null) - throw new StopException("No project file selected"); - fileName = fileName.replaceFirst("\\.xpip$", ""); - return (new File(fileName+".xpip")); + + private File get_file_project(String information, int type) + throws StopException { + FileDialog dlg = new FileDialog(shell, type | SWT.SINGLE); + dlg.setFilterPath(conf.getXmlresult().getPath()); + dlg.setText(information); + dlg.setFilterExtensions(new String[] { "*.xpip", "*.*" }); + dlg.setFilterNames(new String[] { "X!Tandem pipeline project", + "All files" }); + String fileName = dlg.open(); + if (fileName == null) + throw new StopException("No project file selected"); + fileName = fileName.replaceFirst("\\.xpip$", ""); + return (new File(fileName + ".xpip")); } } @@ -897,8 +933,8 @@ class ResultSelectionListener implements Listener { } public void handleEvent(Event e) { -// System.out.println("Event: [" + e.toString() + "]"); -// System.out.println(e.widget.getStyle()); + // System.out.println("Event: [" + e.toString() + "]"); + // System.out.println(e.widget.getStyle()); // Menu Check if (e.widget.getStyle() == 32) { // name.open_closed_shell((MenuItem) e.widget); @@ -947,7 +983,7 @@ class ResultSelectionListener implements Listener { MessageBox messageBox = new MessageBox(name.shell, SWT.OK); messageBox.setMessage(XtandemPipelineMain.warning); messageBox.open(); - } else if (it.getText().equals("About")) { + } else if (it.getText().equals("About")) { MessageBox messageBox = new MessageBox(name.shell, SWT.OK); messageBox.setMessage(XtandemPipelineMain.about); messageBox.open(); @@ -955,7 +991,7 @@ class ResultSelectionListener implements Listener { MessageBox messageBox = new MessageBox(name.shell, SWT.OK); messageBox.setMessage(XtandemPipelineMain.news); messageBox.open(); - } else if (it.getText().equals("Hide window")) { + } else if (it.getText().equals("Hide window")) { name.hide_shell(it.getParent().getParentItem()); } else if (it.getText().equals("Close window")) { name.close_shell(it.getParent().getParentItem());