ProteinManager
class.ProteinManager
class. The full source code can be found in the procope.examples.ProtManager
class. Note that name mappings are not handled here, but can for example be found in the Use case 1 codes.ProteinManager.getInternalID
function maps String
identifiers to internal integer IDs. Same strings always return the
same internal IDs. By default the protein manager does not work
case-sensitive, i.e. "ABC", "abc" and "Abc" will map to the same
integer. In this example we explicitly activate case sensitivity using
the ProteinManager.setCaseSensitivity
method.ProteinManager.setCaseSensitivity(true); |
id1==id3
but id2!=id4
(due to case sensitivity).ProteinManager.setRegularExpression("\\s*(.*)\\s+"); |
ProteinManager.unsetRegularExpression(); |
System.out.println("String for " + id5 + ": " + ProteinManager.getLabel(id5)); |
PROTID_C
" (and not " PROTID_C "
). This line also shows how to map back internal IDs to string identifiers using the getLabel
method.ProteinManager.addAnnotation(id1, "value", 0.2f); |
ProteinManager.saveProteinAnnotations("annotations"); |
Set<Integer> filtered = |
for (int protein : filtered) { |
1, 2, 1, 3 |