int possibleCpt = 0, retainedCpt = 0;
for (String protein : possibleProteins) {
String description, geneName, proteinEvidenceLevel;
Chromosome chromosome;
try {
description = sequenceFactory.getHeader(protein).getSimpleProteinDescription();
// if description is not set, return the accession instead - fix for home made fasta headers
if (description == null || description.trim().isEmpty()) {
description = protein;
}
geneName = sequenceFactory.getHeader(protein).getGeneName();
proteinEvidenceLevel = sequenceFactory.getHeader(protein).getProteinEvidence();
if (proteinEvidenceLevel != null) {
try {
Integer level = new Integer(proteinEvidenceLevel);
proteinEvidenceLevel = GenePreferences.getProteinEvidencAsString(level);
} catch (NumberFormatException e) {
// ignore
}
}
String chromosomeNumber = geneFactory.getChromosomeForGeneName(geneName);
chromosome = new Chromosome(chromosomeNumber);
} catch (Exception e) {
peptideShakerGUI.catchException(e);
description = "Error";
geneName = "Error";