br.write(getCurrentTabSpace() + "<SequenceCollection>" + System.getProperty("line.separator"));
tabCounter++;
// get the sequence database
ProteinIterator iterator = sequenceFactory.getProteinIterator(false);
// String dbType = Header.getDatabaseTypeAsString(Header.DatabaseType.Unknown); // @TODO: add database type as user or cv param?
// FastaIndex fastaIndex = sequenceFactory.getCurrentFastaIndex();
// if (fastaIndex != null) {
// dbType = Header.getDatabaseTypeAsString(fastaIndex.getDatabaseType());
// }
// iterate all the protein sequences
while (iterator.hasNext()) {
Protein currentProtein = iterator.getNextProtein();
br.write(getCurrentTabSpace() + "<DBSequence id=\"" + currentProtein.getAccession() + "\" "
+ "accession=\"" + currentProtein.getAccession() + "\" searchDatabase_ref=\"" + "SearchDB_1" + "\" >" + System.getProperty("line.separator"));
tabCounter++;
//br.write(getCurrentTabSpace() + "<Seq>" + currentProtein.getSequence() + "</Seq>" + System.getProperty("line.separator"));
writeCvTerm(new CvTerm("PSI-MS", "MS:1001088", "protein description", StringEscapeUtils.escapeHtml4(sequenceFactory.getHeader(currentProtein.getAccession()).getDescription())));
tabCounter--;
br.write(getCurrentTabSpace() + "</DBSequence>" + System.getProperty("line.separator"));
waitingHandler.increasePrimaryProgressCounter();
if (waitingHandler.isRunCanceled()) {
break;
}
}
iterator.close();
identification.loadPeptideMatches(null);
identification.loadPeptideMatchParameters(new PSParameter(), null);
// iterate all the peptides