ScaleIntrons { @NotNull public GenomeRegion scaleIntronsFromRegion(@NotNull final GenomeRegion region) { return GenomeRegions.create(region.chromosome(), region.start() + offset(region.start()), region.end() + offset(region.end())); } ScaleIntrons(@NotNull final List<GenomeRegion> introns); @NotNull static List<GenomeRegion> introns(@NotNull final List<? extends GenomeRegion> exons); @NotNull List<FusedExon> scaleIntronsInExons(@NotNull final List<FusedExon> exons); @NotNull List<ProteinDomain> scaleIntronsInProteinDomains(@NotNull final List<ProteinDomain> domains); @NotNull GenomeRegion scaleIntronsFromRegion(@NotNull final GenomeRegion region);  }
@Test public void testScaleExons() { GenomeRegion region; region = victim.scaleIntronsFromRegion(exons.get(0)); assertEquals(create(scaled[0], scaled[1]), region); region = victim.scaleIntronsFromRegion(exons.get(1)); assertEquals(create(scaled[2], scaled[3]), region); region = victim.scaleIntronsFromRegion(exons.get(2)); assertEquals(create(scaled[4], scaled[5]), region); }
@Test public void testScaleProteinDomainInOneExon() { GenomeRegion proteinDomain = create(original[2] + 10, original[3] - 10); GenomeRegion region = victim.scaleIntronsFromRegion(proteinDomain); assertEquals(create(scaled[2] + 10, scaled[3] - 10), region); }
@Test public void testScaleProteinDomainOverTwoExon() { GenomeRegion proteinDomain = create(original[0] + 10, original[3] - 10); GenomeRegion region = victim.scaleIntronsFromRegion(proteinDomain); assertEquals(create(scaled[0] + 10, scaled[3] - 10), region); }
@Test public void testScaleProteinDomainStartInIntron() { GenomeRegion proteinDomain = create(original[2] - 250, original[3] - 10); GenomeRegion region = victim.scaleIntronsFromRegion(proteinDomain); assertEquals(create(scaled[2] - 3, scaled[3] - 10), region); }
@Test public void testScaleProteinDomainEndInIntron() { GenomeRegion proteinDomain = create(original[2] + 10, original[3] + 250); GenomeRegion region = victim.scaleIntronsFromRegion(proteinDomain); assertEquals(create(scaled[2] + 10, scaled[3] + 3), region); }
@Test public void testScaleProteinDomainStartAndEndInIntron() { GenomeRegion proteinDomain = create(original[2] - 250, original[3] + 250); GenomeRegion region = victim.scaleIntronsFromRegion(proteinDomain); assertEquals(create(scaled[2] - 3, scaled[3] + 3), region); }