use of org.nextprot.api.commons.bio.variation.prot.impl.seqchange.AminoAcidModification in project nextprot-api by calipho-sib.
the class SingleModificationBEDFormat method parse.
@Override
public SequenceVariation parse(String source, SequenceVariationBuilder.FluentBuilding builder) throws ParseException {
Matcher m = PATTERN.matcher(source);
if (m.matches()) {
AminoAcidModification aaChange = AminoAcidModification.valueOfAminoAcidModification(m.group(1));
AminoAcidCode affectedAA = AminoAcidCode.parseAminoAcidCode(m.group(2) + ((m.group(3) != null) ? m.group(3) : ""));
int affectedAAPos = Integer.parseInt(m.group(4));
return builder.selectAminoAcid(affectedAA, affectedAAPos).thenAddModification(aaChange).build();
}
return null;
}
Aggregations