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 deleted file mode 100644 index 54e023f90505b83d45120376b77c23859d548181..0000000000000000000000000000000000000000 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_compar.java +++ /dev/null @@ -1,99 +0,0 @@ -package fr.inra.pappso.xtandempipeline.filter_print; - -import java.util.ArrayList; - -import fr.inra.pappso.xtandempipeline.class_msms.Match; -import fr.inra.pappso.xtandempipeline.class_msms.MsRun; -import fr.inra.pappso.xtandempipeline.class_msms.MsRunSet; -import fr.inra.pappso.xtandempipeline.grouping.Group; -import fr.inra.pappso.xtandempipeline.grouping.GroupSet; -import fr.inra.pappso.xtandempipeline.grouping.HashSampleScanSetProt; -import fr.inra.pappso.xtandempipeline.grouping.SubGroup; -import fr.inra.pappso.xtandempipeline.sax_parse.msms_output; - -public class print_compar extends print_base { - - public print_compar(msms_output out, MsRunSet samp) { - super(out, samp); - logger.info("Print Compar file"); - } - - public void print_header() throws Exception { - String S = "Groupe" + "\t" + "Sub-group" + "\t" + "Description" + "\t" + "Redundancy"+ "\t" + "MW" + "\t" + "Evalue"; - for(MsRun sample : samples.getMsRunList()){ - S = S + "\t" + sample.getSampleName(); - } - S = S + "\tType\n"; - out.write(S); - } - - @Override - public void execute(GroupSet grouping) throws Exception { - this.print_header(); - for(Group group : grouping.getGroupList()){ - this.print_group_information(group, "Spectra"); - } - out.write("\n"); - - for(Group group : grouping.getGroupList()){ - this.print_group_information(group, "Specific"); - } - out.write("\n"); - - for(Group group : grouping.getGroupList()){ - this.print_group_information(group, "Unique"); - } - out.write("\n"); - - for(Group group : grouping.getGroupList()){ - this.print_group_information(group, "PAI"); - } - out.write("\n"); - } - - public void print_group_information(Group group, String type) - throws Exception { - for(SubGroup sg : group.getSubGroupSet().getSubGroupList()){ - String subgroup = this.get_subgroup_number(group, sg); - ArrayList<HashSampleScanSetProt> hprotlist = sg.getHashSampleScanSetProtList(); - Match top = (Match) hprotlist.get(0).getGrpProtMatch(); - - //données des - StringBuilder S = new StringBuilder(); - S.append(group.getNumber()); - S.append("\t"+subgroup); - S.append("\t"+ top.get_protein_match().get_description()); - if (hprotlist.size() > 1) - S.append("\t" + hprotlist.size()+"*"); - else - S.append("\t" + "\"-\""); - S.append("\t" + top.get_protein_match().get_mw()); - S.append("\t" + top.get_protein_match().get_evalue()); - - //On ecris les données pour chaque sample - float value = 0; - for(MsRun sample : samples.getMsRunList()){ - if (type.equals("Spectra")) - value = top.get_valid_peptide_number_to(sample); - - if (type.equals("Specific")) - value = group.getNumberOfSpecificPeptideInSubGroupToSample(hprotlist.get(0),sample); - if (type.equals("Unique")) { - value = top.get_unique_valid_peptide_number_to(sample); - } - if (type.equals("PAI")) { - value = (float) top.get_spectra_numbers_to(sample) - / top.get_protein_match().get_PAI_count(); - } - if (value > 0) - S.append("\t" + value); - else - S.append("\t"); - - } - S.append("\t" + type + "\n"); - out.write(S.toString()); - - } - } -} 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 deleted file mode 100644 index 4626ed984f5a3d90a746cb18a89b46d77efc2aaa..0000000000000000000000000000000000000000 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_compar_phospho.java +++ /dev/null @@ -1,98 +0,0 @@ -package fr.inra.pappso.xtandempipeline.filter_print; - -import java.util.ArrayList; - -import fr.inra.pappso.xtandempipeline.class_msms.Match; -import fr.inra.pappso.xtandempipeline.class_msms.MsRun; -import fr.inra.pappso.xtandempipeline.class_msms.MsRunSet; -import fr.inra.pappso.xtandempipeline.grouping.Group; -import fr.inra.pappso.xtandempipeline.grouping.GroupSet; -import fr.inra.pappso.xtandempipeline.grouping.HashSampleScanSetPhospho; -import fr.inra.pappso.xtandempipeline.grouping.HashSampleScanSetProt; -import fr.inra.pappso.xtandempipeline.grouping.SubGroup; -import fr.inra.pappso.xtandempipeline.sax_parse.msms_output; - -public class print_compar_phospho extends print_base { - - public print_compar_phospho(msms_output out, MsRunSet samp) { - super(out, samp); - logger.info("Print Compar file in phospho mode"); - } - - public void print_header() throws Exception { - String S = "Groupe" + "\t" + "Sub-group" + "\t" + "Description" + "\t" - + "Redundancy" + "\t" + "Position"; - for (MsRun sample : samples.getMsRunList()) { - S = S + "\t" + sample.getSampleName(); - } - S = S + "\tType\n"; - out.write(S); - } - - @Override - public void execute(GroupSet grouping) throws Exception { - this.print_header(); - for(Group group : grouping.getGroupList()){ - this.print_group_information(group, "Spectra"); - } - out.write("\n"); - -// for(Group group : grouping.getGroupList()){ -// this.print_group_information(group, "Specific"); -// } -// out.write("\n"); - - for(Group group : grouping.getGroupList()){ - this.print_group_information(group, "Unique"); - } - out.write("\n"); -// -// for(Group group : grouping.getGroupList()){ -// this.print_group_information(group, "PAI"); -// } -// out.write("\n"); - } - - public void print_group_information(Group group, String type) - throws Exception { - for (SubGroup sg : group.getSubGroupSet().getSubGroupList()) { - String subgroup = this.get_subgroup_number(group, sg); - ArrayList<HashSampleScanSetProt> hprotlist = sg - .getHashSampleScanSetProtList(); - - HashSampleScanSetPhospho phospho = (HashSampleScanSetPhospho) hprotlist.get(0); - - // données des - StringBuilder S = new StringBuilder(); - S.append(group.getNumber()); - S.append("\t" + subgroup); - S.append("\t" + ((Match)phospho.getGrpProtMatch()).get_protein_match().get_description()); - if (hprotlist.size() > 1) - S.append("\t" + hprotlist.size() + "*"); - else - S.append("\t" + "\"-\""); - - S.append("\t" + phospho.getPhosphoPositionToPrint()); - - // On ecris les données pour chaque sample - float value = 0; - for (MsRun sample : samples.getMsRunList()) { - if (type.equals("Spectra")) - value = phospho.getTotalHashSampleScantoMsRun(sample); - - if (type.equals("Unique")) { - value = phospho.getUniqueHashPeptideSampleScantoMsRun(sample); - } - if (value > 0) - S.append("\t" + value); - else - S.append("\t"); - - } - S.append("\t" + type + "\n"); - out.write(S.toString()); - - } - } - -} 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 deleted file mode 100644 index a6875273232dec7ea73f11837412b6fd8a7d3741..0000000000000000000000000000000000000000 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_peptide_list.java +++ /dev/null @@ -1,79 +0,0 @@ -package fr.inra.pappso.xtandempipeline.filter_print; - -import java.util.ArrayList; - -import fr.inra.pappso.xtandempipeline.class_msms.Match; -import fr.inra.pappso.xtandempipeline.class_msms.MapDb.Peptide; -import fr.inra.pappso.xtandempipeline.grouping.Group; -import fr.inra.pappso.xtandempipeline.grouping.HashSampleScan; -import fr.inra.pappso.xtandempipeline.grouping.SubGroup; -import fr.inra.pappso.xtandempipeline.grouping.SubGroupSet; -import fr.inra.pappso.xtandempipeline.sax_parse.msms_output; - -public class print_peptide_list extends print_base { - - public print_peptide_list(msms_output out) { - super(out); - logger.info("Print Peptide liste file in normal mode"); - } - - public void print_header() throws Exception { - String S = "Groupe" + "\t" + "Description" + "\t" + "Sample" + "\t" - + "Scan" + "\t" + "Rt" + "\t" + "Sequence" + "\t" + "Modifs" - + "\t" + "Used" + "\t" + "on a total of" + "\t" + "Sub-groups" - + "\t" + "E-value" + "\t" + "Charge" + "\t" + "MH+ Obs" + "\t" - + "MH+ theo" + "\t" + "DeltaMH+" + "\t" + "Delta-ppm" + "\n"; - out.write(S); - } - - public void print_group_information(Group group) throws Exception { - for (HashSampleScan hash : group.getHashSampleScanSet() - .getHashSampleScanList()) { - SubGroupSet set = group.getSubGroupContaining(hash); - ArrayList<SubGroup> sgList = set.getSubGroupList(); - Match top = (Match) sgList.get(0).getHashSampleScanSetProtList() - .get(0).getGrpProtMatch(); - Peptide pep = (Peptide) top.getBestPeptideToHashSampleScan(hash); - StringBuilder S = new StringBuilder(); - - // on rempli - S.append(group.getNumber() + "\t"); - if (set.size() == 1) - S.append(top.get_protein_match().get_description()); - S.append("\t" + hash.getGrpMsSample().getSampleName()); - S.append("\t" + hash.getScan()); - S.append("\t" + pep.get_RT()); - S.append("\t" + pep.getSequence()); - S.append("\t" + pep.get_Modifs_formater()); - - if (set.size() > 1) - S.append("\t" + set.size() + "\t" - + group.getSubGroupSet().size()); - else - S.append("\t" + "\"-\"" + "\t" + "\"-\""); - S.append("\t"); - // match[] order = m.get_match_order(); - boolean second = false; - for (SubGroup sub : sgList) { - if (second) { - S.append(" "); - } - S.append(this.get_subgroup_number(group, sub)); - second = true; - } - - S.append("\t" + pep.get_evalue()); - S.append("\t" + pep.get_charge()); - S.append("\t" + pep.get_mhplus_obser()); - S.append("\t" + pep.get_mhplus_theo()); - S.append("\t" + pep.get_deltamass()); - S - .append("\t" - + ((pep.get_deltamass() / pep.get_mhplus_theo()) * 1000000)); - S.append("\n"); - out.write(S.toString()); - } - out.write("\n"); - } - -} 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 deleted file mode 100644 index da2433280bd1b1d6697ee3bcebbfeba597a18b90..0000000000000000000000000000000000000000 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_peptide_list_to_phosphopeptide.java +++ /dev/null @@ -1,106 +0,0 @@ -package fr.inra.pappso.xtandempipeline.filter_print; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.TreeSet; - -import fr.inra.pappso.xtandempipeline.class_msms.Match; -import fr.inra.pappso.xtandempipeline.class_msms.MapDb.Peptide; -import fr.inra.pappso.xtandempipeline.grouping.Group; -import fr.inra.pappso.xtandempipeline.grouping.HashSampleScan; -import fr.inra.pappso.xtandempipeline.grouping.HashSampleScanSetPhospho; -import fr.inra.pappso.xtandempipeline.grouping.SubGroup; -import fr.inra.pappso.xtandempipeline.grouping.SubGroupSet; -import fr.inra.pappso.xtandempipeline.grouping.interfaces.GrpPhosphoModif; -import fr.inra.pappso.xtandempipeline.sax_parse.msms_output; - -public class print_peptide_list_to_phosphopeptide extends print_base { - - public print_peptide_list_to_phosphopeptide(msms_output out) { - super(out); - logger.info("Print Peptide liste file in phospho mode"); - } - - public void print_header() throws Exception { - String S = "Groupe" + "\t" + "Description" + "\t" + "Sample" + "\t" - + "Scan" + "\t" + "Rt" + "\t" + "Sequence" + "\t" + "Best Position" - + "\t" + "Phosphopeptide" + "\t" + "All Position" + "\t"+ "Modifs" + "\t"+ "Used" + "\t" + "on a total of" - + "\t" + "Sub-groups" + "\t" + "E-value" + "\t" + "Charge" - + "\t" + "MH+ Obs" + "\t" + "MH+ theo" + "\t" + "DeltaMH+" - + "\t" + "Delta-ppm" + "\n"; - out.write(S); - } - - public void print_group_information(Group group) throws Exception { - for (HashSampleScan hash : group.getHashSampleScanSet() - .getHashSampleScanList()) { - SubGroupSet set = group.getSubGroupContaining(hash); - ArrayList<SubGroup> sgList = set.getSubGroupList(); - HashSampleScanSetPhospho phospho = (HashSampleScanSetPhospho) sgList.get(0).getHashSampleScanSetProtList().get(0); - Match top = (Match) phospho.getGrpProtMatch(); - Peptide pep = (Peptide) top.getBestPeptideToHashSampleScan(hash); - StringBuilder S = new StringBuilder(); - - // on rempli - S.append(group.getNumber() + "\t"); - if (set.size() == 1) - S.append(top.get_protein_match().get_description()); - S.append("\t" + hash.getGrpMsSample().getSampleName()); - S.append("\t" + hash.getScan()); - S.append("\t" + pep.get_RT()); - S.append("\t" + pep.getSequence()); - // position - S.append("\t" + pep.get_phospho_Modifs_position()); - - // Comparaison des positions lié à l'incertitude - TreeSet<Integer> posi = phospho.getAllPositionIncluderedon(hash); - Collection<GrpPhosphoModif> phosphoModifs = pep.getGrpPhosphoModifs(); - - // Multi - if (phosphoModifs.size() >= 1) { - if (phosphoModifs.size() > 1) { - S.append("\t" + "Multi" + "\t"); - } else { - S.append("\t" + "Mono" + "\t"); - } - S.append("\""); - for (Integer pos : posi) - S.append(pos + " "); - S.append("\""); - } else { - S.append("\t" + "No" + "\t" + "\"-\""); - } - - S.append("\t" + pep.get_Modifs_formater()); - - if (set.size() > 1) - S.append("\t" + set.size() + "\t" - + group.getSubGroupSet().size()); - else - S.append("\t" + "\"-\"" + "\t" + "\"-\""); - S.append("\t"); - - - boolean second = false; - for (SubGroup sub : sgList) { - if (second) { - S.append(" "); - } - S.append(this.get_subgroup_number(group, sub)); - second = true; - } - - S.append("\t" + pep.get_evalue()); - S.append("\t" + pep.get_charge()); - S.append("\t" + pep.get_mhplus_obser()); - S.append("\t" + pep.get_mhplus_theo()); - S.append("\t" + pep.get_deltamass()); - S.append("\t" - + ((pep.get_deltamass() / pep.get_mhplus_theo()) * 1000000)); - S.append("\n"); - out.write(S.toString()); - } - out.write("\n"); - } - -} 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 deleted file mode 100644 index 581e34d877a85d32b8857dc60f0763d6e99bd8e2..0000000000000000000000000000000000000000 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_protein_to_combined.java +++ /dev/null @@ -1,54 +0,0 @@ -package fr.inra.pappso.xtandempipeline.filter_print; - -import fr.inra.pappso.xtandempipeline.class_msms.Match; -import fr.inra.pappso.xtandempipeline.grouping.Group; -import fr.inra.pappso.xtandempipeline.grouping.HashSampleScanSetProt; -import fr.inra.pappso.xtandempipeline.grouping.SubGroup; -import fr.inra.pappso.xtandempipeline.sax_parse.msms_output; - -public class print_protein_to_combined extends print_base { - - public print_protein_to_combined(msms_output out) { - super(out); - logger.info("Print Protein liste file in Combined mode"); - } - - public void print_header() throws Exception { - String S = "Group" + "\t" + "Sub-group" + "\t" + "Description" + "\t" - + "log(E value)" + "\t" + "Coverage" + "\t" + "MW" + "\t" - + "Spectra" + "\t" + "Specific uniques" + "\t" + "Uniques" - + "\t" + "PAI" + "\t" + "Redundancy" + "\n"; - out.write(S); - } - - public void print_group_information(Group group) throws Exception { - for (SubGroup sg : group.getSubGroupSet().getSubGroupList()) { - for (HashSampleScanSetProt hashProt : sg.getHashSampleScanSetProtList()) { - StringBuilder S = new StringBuilder(); - Match top = (Match) hashProt.getGrpProtMatch(); - - S.append(group.getNumber() + "\t" + this.get_subgroup_number(group, sg) + "\t" - + top.get_protein_match().get_description()); - S.append("\t" + top.get_protein_match().get_evalue()); - S.append("\t" + top.get_coverage()); - S.append("\t" + top.get_protein_match().get_mw()); - S.append("\t" + top.get_valid_peptide_number()); - if(group.getSubGroupSet().size() > 1) - S.append("\t" - + group.getNumberOfSpecificUniquePeptideInSubGroup(hashProt)); - else - S.append("\t" + "\"-\""); - S.append("\t" + top.get_unique_valid_peptide_number()); - S.append("\t"); - S.append((float) top.get_valid_peptide_number() - / top.get_protein_match().get_PAI_count() + "\t"); - if (sg.getHashSampleScanSetProtSet().size() > 1) - S.append("* " + sg.getHashSampleScanSetProtSet().size()); - S.append("\n"); - - out.write(S.toString()); - } - } - out.write("\n"); - } -} 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 deleted file mode 100644 index 13b2f5f716db797b1593d205e662d8c20559c843..0000000000000000000000000000000000000000 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_protein_to_indiv.java +++ /dev/null @@ -1,58 +0,0 @@ -package fr.inra.pappso.xtandempipeline.filter_print; - -import fr.inra.pappso.xtandempipeline.class_msms.Match; -import fr.inra.pappso.xtandempipeline.class_msms.MsRun; -import fr.inra.pappso.xtandempipeline.class_msms.MsRunSet; -import fr.inra.pappso.xtandempipeline.grouping.Group; -import fr.inra.pappso.xtandempipeline.grouping.HashSampleScanSetProt; -import fr.inra.pappso.xtandempipeline.grouping.SubGroup; -import fr.inra.pappso.xtandempipeline.sax_parse.msms_output; - -public class print_protein_to_indiv extends print_base { - - public print_protein_to_indiv(msms_output out, MsRunSet sample) { - super(out, sample); - logger.info("Print Protein liste file in Individual mode"); - } - - public void print_header(MsRun samp) throws Exception { - out.write(samp.getSampleName() + "\n"); - String S = "Group" + "\t" + "Sub-group" + "\t" + "Description" + "\t" - + "log(E value)" + "\t" + "Coverage" + "\t" + "MW" + "\t" - + "Spectra" + "\t" + "Specifics" + "\t" + "Uniques" + "\t" - + "PAI" + "\t" + "Redundancy" + "\n"; - out.write(S); - } - - public void print_group_information_to_sample(Group group, MsRun sample) - throws Exception { - for (SubGroup sg : group.getSubGroupSet().getSubGroupList()) { - for (HashSampleScanSetProt hashProt : sg.getHashSampleScanSetProtList()) { - StringBuilder S = new StringBuilder(); - Match top = (Match) hashProt.getGrpProtMatch(); - S.append(group.getNumber() + "\t" + this.get_subgroup_number(group, sg) + "\t" - + top.get_protein_match().get_description()); - S.append("\t" + top.get_protein_match().get_evalue(sample)); - S.append("\t" + top.get_coverage_to(sample)); - S.append("\t" + top.get_protein_match().get_mw()); - S.append("\t" + top.get_valid_peptide_number_to(sample)); - if(group.getSubGroupSet().size() > 1) - S.append("\t" - + group.getNumberOfSpecificPeptideInSubGroupToSample(hashProt, sample)); - else - S.append("\t" + "\"-\""); - S.append("\t" + top.get_unique_valid_peptide_number_to(sample)); - S.append("\t"); - S.append((float) top.get_spectra_numbers_to(sample) - / top.get_protein_match().get_PAI_count() + "\t"); - if (sg.getHashSampleScanSetProtSet().size() > 1) - S.append("* " + sg.getHashSampleScanSetProtSet().size()); - S.append("\n"); - out.write(S.toString()); - - } - } - out.write("\n"); - } - -} 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 deleted file mode 100644 index bb626d7ef8688dccdd1c39a4654be2d27bcffe2f..0000000000000000000000000000000000000000 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/filter_print/print_protein_to_phosphopeptide.java +++ /dev/null @@ -1,52 +0,0 @@ -package fr.inra.pappso.xtandempipeline.filter_print; - -import fr.inra.pappso.xtandempipeline.class_msms.Match; -import fr.inra.pappso.xtandempipeline.grouping.Group; -import fr.inra.pappso.xtandempipeline.grouping.HashSampleScanSetPhospho; -import fr.inra.pappso.xtandempipeline.grouping.HashSampleScanSetProt; -import fr.inra.pappso.xtandempipeline.grouping.SubGroup; -import fr.inra.pappso.xtandempipeline.sax_parse.msms_output; - -public class print_protein_to_phosphopeptide extends print_base { - - public print_protein_to_phosphopeptide(msms_output out) { - super(out); - logger.info("Print Protein liste file in Phospho mode"); - } - - public void print_header() throws Exception { - String S = "Group" + "\t" + "Sub-group" + "\t" + "Description" - + "\t" + "MW" + "\t" + "Position" + "\t" - + "Spectra" + "\t" + "Uniques" + "\t" - + "Redundancy" + "\n"; - out.write(S); - } - - public void print_group_information(Group group) throws Exception { - for (SubGroup sg : group.getSubGroupSet().getSubGroupList()) { - for (HashSampleScanSetProt hashProt : sg.getHashSampleScanSetProtList()) { - StringBuilder S = new StringBuilder(); - Match top = (Match) hashProt.getGrpProtMatch(); - HashSampleScanSetPhospho phospho = (HashSampleScanSetPhospho) hashProt; - - S.append(group.getNumber() + "\t" + this.get_subgroup_number(group, sg) + "\t" - + top.get_protein_match().get_description()); - S.append("\t" + top.get_protein_match().get_mw()); - - S.append("\t" + "\""+phospho.getPhosphoPositionToPrint()+"\""); - - S.append("\t" + phospho.size()); - - S.append("\t" + phospho.getUniquePeptideHashSampleScan()); - S.append("\t"); - if (sg.getHashSampleScanSetProtSet().size() > 1) - S.append("* " + sg.getHashSampleScanSetProtSet().size()); - S.append("\n"); - - out.write(S.toString()); - } - } - out.write("\n"); - } - -} 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 9ae88a6e00f9c1c7c02b17d2ebe4dac1b8d033bb..5c48262064e5d714c48cb23f46f950adb0b82309 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_combine.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_combine.java @@ -1,16 +1,13 @@ package fr.inra.pappso.xtandempipeline.thread; +import fr.inra.pappso.csv2ods.Ods2Csv; import fr.inra.pappso.libodsstream.OdsDocWriter; import fr.inra.pappso.xtandempipeline.MsException.StopException; import fr.inra.pappso.xtandempipeline.class_msms.config; import fr.inra.pappso.xtandempipeline.class_msms.Identification; -import fr.inra.pappso.xtandempipeline.filter_print.print_compar; import fr.inra.pappso.xtandempipeline.filter_print.print_ods_compar; import fr.inra.pappso.xtandempipeline.filter_print.print_ods_peptide_list; import fr.inra.pappso.xtandempipeline.filter_print.print_ods_protein_to_combined; -import fr.inra.pappso.xtandempipeline.filter_print.print_peptide_list; -import fr.inra.pappso.xtandempipeline.filter_print.print_protein_to_combined; -import fr.inra.pappso.xtandempipeline.sax_parse.msms_output; public class printing_combine extends printing_base { @@ -71,14 +68,19 @@ public class printing_combine extends printing_base { logger.info("Print combine results"); this.set_view("Printing protein file results"); - msms_output output = new msms_output(); - output.open(this.getfileout().getAbsolutePath() + "_protein.txt"); + + Ods2Csv ods2csv = new Ods2Csv(); + ods2csv.setSinkFilename(this.getfileout().getAbsolutePath() + + "_protein.txt"); + + OdsDocWriter odsDoc = ods2csv.getOdsDocPipedOutput(); + // msms_output output = new msms_output(); + // output.open(this.getfileout().getAbsolutePath() + "_protein.txt"); // protein view for (Identification ident : this.identifications) { - ident.print_result(new print_protein_to_combined(output)); + ident.print_result(new print_ods_protein_to_combined(odsDoc)); } - - output.close(); + odsDoc.close(); // Verification pas arrete if (this.isStop()) @@ -86,13 +88,18 @@ public class printing_combine extends printing_base { this.add_current_progress(); this.set_view("Printing peptide file results"); - output.open(this.getfileout().getAbsolutePath() + "_peptide.txt"); + ods2csv = new Ods2Csv(); + ods2csv.setSinkFilename(this.getfileout().getAbsolutePath() + + "_peptide.txt"); + + odsDoc = ods2csv.getOdsDocPipedOutput(); + // output.open(this.getfileout().getAbsolutePath() + "_peptide.txt"); // peptide list for (Identification ident : this.identifications) { - ident.print_result(new print_peptide_list(output)); + ident.print_result(new print_ods_peptide_list(odsDoc)); } - output.close(); + odsDoc.close(); // Verification pas arrete if (this.isStop()) @@ -100,11 +107,16 @@ public class printing_combine extends printing_base { this.add_current_progress(); this.set_view("Printing compar file results"); - output.open(this.getfileout().getAbsolutePath() + "_compar.txt"); + ods2csv = new Ods2Csv(); + ods2csv.setSinkFilename(this.getfileout().getAbsolutePath() + + "_compar.txt"); + + odsDoc = ods2csv.getOdsDocPipedOutput(); + // output.open(this.getfileout().getAbsolutePath() + "_compar.txt"); for (Identification ident : this.identifications) { - ident.print_result(new print_compar(output, ident.getMsRunSet())); + ident.print_result(new print_ods_compar(odsDoc, ident.getMsRunSet())); } - output.close(); + odsDoc.close(); this.add_current_progress(); } 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 259aabc2ba83a6dd6a9bb14c068aa8165f90db72..8f3c9968f8f6664d2bfa87ad67b72686df0a64a8 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_indiv.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_indiv.java @@ -1,14 +1,12 @@ package fr.inra.pappso.xtandempipeline.thread; +import fr.inra.pappso.csv2ods.Ods2Csv; import fr.inra.pappso.libodsstream.OdsDocWriter; import fr.inra.pappso.xtandempipeline.MsException.StopException; import fr.inra.pappso.xtandempipeline.class_msms.config; import fr.inra.pappso.xtandempipeline.class_msms.Identification; import fr.inra.pappso.xtandempipeline.filter_print.print_ods_peptide_list; import fr.inra.pappso.xtandempipeline.filter_print.print_ods_protein_to_indiv; -import fr.inra.pappso.xtandempipeline.filter_print.print_peptide_list; -import fr.inra.pappso.xtandempipeline.filter_print.print_protein_to_indiv; -import fr.inra.pappso.xtandempipeline.sax_parse.msms_output; public class printing_indiv extends printing_base { @@ -54,15 +52,20 @@ public class printing_indiv extends printing_base { logger.info("Print individual results"); this.set_view("Printing protein file results"); - msms_output output = new msms_output(); - output.open(this.getfileout().getAbsolutePath() + "_protein.txt"); + Ods2Csv ods2csv = new Ods2Csv(); + ods2csv.setSinkFilename(this.getfileout().getAbsolutePath() + + "_protein.txt"); + + OdsDocWriter odsDoc = ods2csv.getOdsDocPipedOutput(); + // msms_output output = new msms_output(); + // output.open(this.getfileout().getAbsolutePath() + "_protein.txt"); // protein view for (Identification ident : this.identifications) { - ident.print_result(new print_protein_to_indiv(output, ident + ident.print_result(new print_ods_protein_to_indiv(odsDoc, ident .getMsRunSet())); } - output.close(); + odsDoc.close(); // Verification pas arrete if (this.isStop()) @@ -70,12 +73,17 @@ public class printing_indiv extends printing_base { this.add_current_progress(); this.set_view("Printing peptide file results"); - output.open(this.getfileout().getAbsolutePath() + "_peptide.txt"); + ods2csv = new Ods2Csv(); + ods2csv.setSinkFilename(this.getfileout().getAbsolutePath() + + "_peptide.txt"); + + odsDoc = ods2csv.getOdsDocPipedOutput(); + // output.open(this.getfileout().getAbsolutePath() + "_peptide.txt"); // peptide list for (Identification ident : this.identifications) { - ident.print_result(new print_peptide_list(output)); + ident.print_result(new print_ods_peptide_list(odsDoc)); } - output.close(); + odsDoc.close(); // Verification pas arrete if (this.isStop()) 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 cbae3ca8f2141e871cee575a46625ba4f7400962..15b6ffc2c1aaa56433d3af8809a1581b70d3c4e2 100644 --- a/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_phosphopeptide.java +++ b/xtandempipeline/src/fr/inra/pappso/xtandempipeline/thread/printing_phosphopeptide.java @@ -1,16 +1,13 @@ package fr.inra.pappso.xtandempipeline.thread; +import fr.inra.pappso.csv2ods.Ods2Csv; import fr.inra.pappso.libodsstream.OdsDocWriter; import fr.inra.pappso.xtandempipeline.MsException.StopException; import fr.inra.pappso.xtandempipeline.class_msms.config; import fr.inra.pappso.xtandempipeline.class_msms.Identification; -import fr.inra.pappso.xtandempipeline.filter_print.print_compar_phospho; import fr.inra.pappso.xtandempipeline.filter_print.print_ods_compar_phospho; import fr.inra.pappso.xtandempipeline.filter_print.print_ods_peptide_list_to_phosphopeptide; import fr.inra.pappso.xtandempipeline.filter_print.print_ods_protein_to_phosphopeptide; -import fr.inra.pappso.xtandempipeline.filter_print.print_peptide_list_to_phosphopeptide; -import fr.inra.pappso.xtandempipeline.filter_print.print_protein_to_phosphopeptide; -import fr.inra.pappso.xtandempipeline.sax_parse.msms_output; public class printing_phosphopeptide extends printing_base { @@ -72,14 +69,19 @@ public class printing_phosphopeptide extends printing_base { logger.info("Print phophopeptide results"); this.set_view("Printing protein file results"); - msms_output output = new msms_output(); - output.open(this.getfileout().getAbsolutePath() + "_protein.txt"); + // msms_output output = new msms_output(); + Ods2Csv ods2csv = new Ods2Csv(); + ods2csv.setSinkFilename(this.getfileout().getAbsolutePath() + + "_protein.txt"); + + OdsDocWriter odsDoc = ods2csv.getOdsDocPipedOutput(); + // output.open(this.getfileout().getAbsolutePath() + "_protein.txt"); // protein view for (Identification ident : this.identifications) { - ident.print_result(new print_protein_to_phosphopeptide(output)); + ident.print_result(new print_ods_protein_to_phosphopeptide(odsDoc)); } - output.close(); + odsDoc.close(); // Verification pas arrete if (this.isStop()) @@ -87,12 +89,18 @@ public class printing_phosphopeptide extends printing_base { this.add_current_progress(); this.set_view("Printing peptide file results"); - output.open(this.getfileout().getAbsolutePath() + "_peptide.txt"); + ods2csv = new Ods2Csv(); + ods2csv.setSinkFilename(this.getfileout().getAbsolutePath() + + "_peptide.txt"); + + odsDoc = ods2csv.getOdsDocPipedOutput(); + // output.open(this.getfileout().getAbsolutePath() + "_peptide.txt"); // peptide list for (Identification ident : this.identifications) { - ident.print_result(new print_peptide_list_to_phosphopeptide(output)); + ident.print_result(new print_ods_peptide_list_to_phosphopeptide( + odsDoc)); } - output.close(); + odsDoc.close(); // Verification pas arrete if (this.isStop()) @@ -100,12 +108,17 @@ public class printing_phosphopeptide extends printing_base { this.add_current_progress(); this.set_view("Printing compar file results"); - output.open(this.getfileout().getAbsolutePath() + "_compar.txt"); + ods2csv = new Ods2Csv(); + ods2csv.setSinkFilename(this.getfileout().getAbsolutePath() + + "_compar.txt"); + + odsDoc = ods2csv.getOdsDocPipedOutput(); + // output.open(this.getfileout().getAbsolutePath() + "_compar.txt"); for (Identification ident : this.identifications) { - ident.print_result(new print_compar_phospho(output, ident + ident.print_result(new print_ods_compar_phospho(odsDoc, ident .getMsRunSet())); } - output.close(); + odsDoc.close(); this.add_current_progress(); }