Closed wenbostar closed 9 months ago
We do not have any plans of implementing this ourselves, but you can always modify the getPeakAnnotation
method in com.compomics.util.experiment.identification.matches.IonMatch
to implement your own version.
Simply replace all of the lines where it says:
result.append(Charge.getChargeAsFormattedString(charge));
with
result.append(" ").append(Charge.toString(charge));
and you should get the wanted 2+ annotation.
Note that you probably also want to set
spectrumPanel.setSubscriptAnnotationNumbers(false);
for your spectrum panel as otherwise the annotation may look a bit strange (which is partly why we have not implement this alternative annotation).
Thanks a lot.
In peptide spectrum annotation using the function getSpectrumAnnotation, is that possible to annotate charge 2+ fragment ions when peptide charge is 2+?