Skip to content
Snippets Groups Projects
Commit cbe66a3b authored by langella's avatar langella
Browse files

new checkbox to export redundant peptide list

git-svn-id: https://subversion.renater.fr/xtandempipeline/trunk@368 b8ef2a07-7df7-436f-90b9-41648038564b
parent 00dc12a8
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,11 @@ public class config {
private static String mascot_evalue = "mascot_evalue";
// Type of evalue stocked for mascot search theoritical or experimental
// indicates that we want an export redundant peptide in ODS
private static String export_redundant_ods = "export_redundant_ods";
// indicates that we want an export redundant peptide in CSV
private static String export_redundant_csv = "export_redundant_csv";
// indicates that we want an export in ODS
private static String export_ods = "export_ods";
// indicates that we want an export in TXT
......@@ -258,6 +263,14 @@ public class config {
properties.setProperty(export_proticdbml, "" + F);
}
public void set_export_redundant_ods(boolean F) {
properties.setProperty(export_redundant_ods, "" + F);
}
public void set_export_redundant_csv(boolean F) {
properties.setProperty(export_redundant_csv, "" + F);
}
public void set_export_masschroq(boolean F) {
properties.setProperty(export_masschroq, "" + F);
}
......@@ -336,6 +349,20 @@ public class config {
return (true);
}
public boolean get_export_redundant_ods() {
String value = properties.getProperty(export_redundant_ods, "false");
if (value.equals("false"))
return (false);
return (true);
}
public boolean get_export_redundant_csv() {
String value = properties.getProperty(export_redundant_csv, "false");
if (value.equals("false"))
return (false);
return (true);
}
public boolean get_export_txt() {
String value = properties.getProperty(export_txt, "false");
if (value.equals("false"))
......
......@@ -55,6 +55,7 @@ public class OdsRedundantPeptideOutput {
throws MSMSException {
try {
odsTable = new OdsDocWriter(outputStream);
odsTable.writeSheet("peptides");
} catch (IOException e) {
String message = "IOException " + e.getMessage();
logger.error(message);
......@@ -83,7 +84,6 @@ public class OdsRedundantPeptideOutput {
public void write(Identification ident) throws MSMSException {
try {
odsTable.writeSheet("peptides");
this.writeHeaders();
for (Group group : ident.getGrouping().getGroupList()) {
......
......@@ -158,7 +158,7 @@ public class printing_base extends process {
// redundant peptide output (containing start and stop positions on
// proteins)
if (true) {
if (conf.get_export_redundant_ods()) {
FileOutputStream outputStream = new FileOutputStream(new File(this
.getfileout().getAbsolutePath() + "_pep_redundant.ods"));
OdsRedundantPeptideOutput odsRedOutput = new OdsRedundantPeptideOutput(
......@@ -167,7 +167,8 @@ public class printing_base extends process {
odsRedOutput.write(ident);
}
odsRedOutput.close();
}
if (conf.get_export_redundant_csv()) {
FileOutputStream csvStream = new FileOutputStream(new File(this
.getfileout().getAbsolutePath() + "_pep_redundant.csv"));
CsvRedundantPeptideOutput csvRedOutput = new CsvRedundantPeptideOutput(
......
......@@ -38,6 +38,8 @@ public class Export_Windows {
private Button choice_spreadsheet_export;
private Button choice_redundant_ods_export;
private Button choice_fasta_export;
private Button choice_protic_export;
......@@ -144,6 +146,12 @@ public class Export_Windows {
}
});
choice_redundant_ods_export = new Button(group, SWT.CHECK);
choice_redundant_ods_export
.setText("Redundant peptide list (containing start and stop on protein sequence)");
choice_redundant_ods_export.setSelection(conf
.get_export_redundant_ods());
choice_fasta_export = new Button(group, SWT.CHECK);
choice_fasta_export.setText("Identified proteins to a fasta file");
choice_fasta_export.setSelection(conf.get_export_fasta());
......@@ -326,6 +334,8 @@ public class Export_Windows {
conf.set_export_proticdbml(this.choice_protic_export.getSelection());
conf.set_export_masschroq(this.choice_quantimscpp_export
.getSelection());
conf.set_export_redundant_ods(this.choice_redundant_ods_export
.getSelection());
// on sauve
conf.savePropertiestoXml();
datatype.getPrint().setfileout(out);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment