*
* @deprecated endpoint withdrawn August 2020 (JAL-3692), use EmblFlatfileSource
*/
+
public abstract class EmblXmlSource extends EbiFileRetrievedProxy
{
private static final Regex ACCESSION_REGEX = new Regex("^[A-Z]+[0-9]+");
else
{
// final product length truncation check
- int[] cdsRanges = adjustForProteinLength(translationLength,
+ int [] exons2 = adjustForProteinLength(translationLength,
exons);
- dnaToProteinMapping = new Mapping(product, cdsRanges,
+ dnaToProteinMapping = new Mapping(product, exons2,
new int[]
{ 1, translationLength }, 3, 1);
if (product != null)
proteinSeq = new Sequence(proteinSeqName,
product.getSequenceAsString());
matcher.add(proteinSeq);
+ proteinSeq.setDescription(product.getDescription());
peptides.add(proteinSeq);
}
dnaToProteinMapping.setTo(proteinSeq);
/**
* Truncates (if necessary) the exon intervals to match 3 times the length of
- * the protein; also accepts 3 bases longer (for stop codon not included in
- * protein)
+ * the protein (including truncation for stop codon included in exon)
*
* @param proteinLength
* @param exon
int exonLength = MappingUtils.getLength(Arrays.asList(exon));
/*
- * if exon length matches protein, or is shorter, or longer by the
- * length of a stop codon (3 bases), then leave it unchanged
+ * if exon length matches protein, or is shorter, then leave it unchanged
*/
- if (expectedCdsLength >= exonLength
- || expectedCdsLength == exonLength - 3)
+ if (expectedCdsLength >= exonLength)
{
return exon;
}