use of org.nextprot.api.blast.domain.gen.Description in project nextprot-api by calipho-sib.
the class BlastServiceImpl method blastIsoformSequence.
@Override
public BlastProgramOutput blastIsoformSequence(BlastIsoformInput params) {
String isoformAccession = params.getIsoformAccession();
String entryAccession = isoformAccession.split("-")[0];
try {
Isoform isoform = getIsoform(isoformAccession, entryAccession);
params.setSequence(isoform.getSequence());
params.validateSequencePositions();
params.setSequence(params.getSequence().substring(params.getBeginPos() - 1, params.getEndPos()));
params.setTitle(buildTitle(params, isoform, entryAccession));
params.setEntryAccession(entryAccession);
Description queryDescription = new Description();
blastResultUpdaterService.updateDescription(queryDescription, isoformAccession, entryAccession);
params.setDescription(queryDescription);
return blastProteinSequence(params);
} catch (ExceptionWithReason exceptionWithReason) {
return new BlastProgramFailure(params, exceptionWithReason);
}
}
Aggregations