target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test public void testGenomeToTranscriptPosForward() throws ProjectionException { TranscriptProjectionDecorator projector = new TranscriptProjectionDecorator(infoForward); Assert.assertEquals(new TranscriptPosition(infoForward, 1, PositionType.ONE_BASED), projector .genomeToTranscriptPos(new GenomePosition(refDict, Str... | public TranscriptPosition genomeToTranscriptPos(GenomePosition pos) throws ProjectionException { if (!transcript.getTXRegion().contains(pos)) throw new ProjectionException("Position " + pos + " is not in the transcript region " + transcript.getTXRegion()); pos = pos.withStrand(transcript.getStrand()); int tOffset = 0; ... | TranscriptProjectionDecorator { public TranscriptPosition genomeToTranscriptPos(GenomePosition pos) throws ProjectionException { if (!transcript.getTXRegion().contains(pos)) throw new ProjectionException("Position " + pos + " is not in the transcript region " + transcript.getTXRegion()); pos = pos.withStrand(transcript... | TranscriptProjectionDecorator { public TranscriptPosition genomeToTranscriptPos(GenomePosition pos) throws ProjectionException { if (!transcript.getTXRegion().contains(pos)) throw new ProjectionException("Position " + pos + " is not in the transcript region " + transcript.getTXRegion()); pos = pos.withStrand(transcript... | TranscriptProjectionDecorator { public TranscriptPosition genomeToTranscriptPos(GenomePosition pos) throws ProjectionException { if (!transcript.getTXRegion().contains(pos)) throw new ProjectionException("Position " + pos + " is not in the transcript region " + transcript.getTXRegion()); pos = pos.withStrand(transcript... | TranscriptProjectionDecorator { public TranscriptPosition genomeToTranscriptPos(GenomePosition pos) throws ProjectionException { if (!transcript.getTXRegion().contains(pos)) throw new ProjectionException("Position " + pos + " is not in the transcript region " + transcript.getTXRegion()); pos = pos.withStrand(transcript... |
@Test public void testGenomeToTranscriptPosReverse() throws ProjectionException { TranscriptProjectionDecorator projector = new TranscriptProjectionDecorator(infoReverse); Assert.assertEquals(new TranscriptPosition(infoReverse, 1, PositionType.ONE_BASED), projector .genomeToTranscriptPos(new GenomePosition(refDict, Str... | public TranscriptPosition genomeToTranscriptPos(GenomePosition pos) throws ProjectionException { if (!transcript.getTXRegion().contains(pos)) throw new ProjectionException("Position " + pos + " is not in the transcript region " + transcript.getTXRegion()); pos = pos.withStrand(transcript.getStrand()); int tOffset = 0; ... | TranscriptProjectionDecorator { public TranscriptPosition genomeToTranscriptPos(GenomePosition pos) throws ProjectionException { if (!transcript.getTXRegion().contains(pos)) throw new ProjectionException("Position " + pos + " is not in the transcript region " + transcript.getTXRegion()); pos = pos.withStrand(transcript... | TranscriptProjectionDecorator { public TranscriptPosition genomeToTranscriptPos(GenomePosition pos) throws ProjectionException { if (!transcript.getTXRegion().contains(pos)) throw new ProjectionException("Position " + pos + " is not in the transcript region " + transcript.getTXRegion()); pos = pos.withStrand(transcript... | TranscriptProjectionDecorator { public TranscriptPosition genomeToTranscriptPos(GenomePosition pos) throws ProjectionException { if (!transcript.getTXRegion().contains(pos)) throw new ProjectionException("Position " + pos + " is not in the transcript region " + transcript.getTXRegion()); pos = pos.withStrand(transcript... | TranscriptProjectionDecorator { public TranscriptPosition genomeToTranscriptPos(GenomePosition pos) throws ProjectionException { if (!transcript.getTXRegion().contains(pos)) throw new ProjectionException("Position " + pos + " is not in the transcript region " + transcript.getTXRegion()); pos = pos.withStrand(transcript... |
@Test public void testMultVariantToHGVSString() { Assert.assertEquals("[Leu101Arg Assert.assertEquals("[Leu101Arg Assert.assertEquals("[L101R } | @Override public String toHGVSString() { return toHGVSString(AminoAcidCode.THREE_LETTER); } | ProteinChangeAllele implements ConvertibleToHGVSString, List<ProteinChange> { @Override public String toHGVSString() { return toHGVSString(AminoAcidCode.THREE_LETTER); } } | ProteinChangeAllele implements ConvertibleToHGVSString, List<ProteinChange> { @Override public String toHGVSString() { return toHGVSString(AminoAcidCode.THREE_LETTER); } ProteinChangeAllele(VariantConfiguration varConfig, Collection<? extends ProteinChange> changes); } | ProteinChangeAllele implements ConvertibleToHGVSString, List<ProteinChange> { @Override public String toHGVSString() { return toHGVSString(AminoAcidCode.THREE_LETTER); } ProteinChangeAllele(VariantConfiguration varConfig, Collection<? extends ProteinChange> changes); static ProteinChangeAllele singleChangeAllele(Protei... | ProteinChangeAllele implements ConvertibleToHGVSString, List<ProteinChange> { @Override public String toHGVSString() { return toHGVSString(AminoAcidCode.THREE_LETTER); } ProteinChangeAllele(VariantConfiguration varConfig, Collection<? extends ProteinChange> changes); static ProteinChangeAllele singleChangeAllele(Protei... |
@Test public void testGenomeToCDSPosForward() throws ProjectionException { TranscriptProjectionDecorator projector = new TranscriptProjectionDecorator(infoForward); Assert.assertEquals(new CDSPosition(infoForward, 1, PositionType.ONE_BASED), projector.genomeToCDSPos(new GenomePosition(refDict, Strand.FWD, 1, 6640670, P... | public CDSPosition genomeToCDSPos(GenomePosition pos) throws ProjectionException { if (!transcript.getCDSRegion().contains(pos)) throw new ProjectionException("Position " + pos + " is not in the CDS region " + transcript.getCDSRegion()); pos = pos.withStrand(transcript.getStrand()); TranscriptPosition txPos = genomeToT... | TranscriptProjectionDecorator { public CDSPosition genomeToCDSPos(GenomePosition pos) throws ProjectionException { if (!transcript.getCDSRegion().contains(pos)) throw new ProjectionException("Position " + pos + " is not in the CDS region " + transcript.getCDSRegion()); pos = pos.withStrand(transcript.getStrand()); Tran... | TranscriptProjectionDecorator { public CDSPosition genomeToCDSPos(GenomePosition pos) throws ProjectionException { if (!transcript.getCDSRegion().contains(pos)) throw new ProjectionException("Position " + pos + " is not in the CDS region " + transcript.getCDSRegion()); pos = pos.withStrand(transcript.getStrand()); Tran... | TranscriptProjectionDecorator { public CDSPosition genomeToCDSPos(GenomePosition pos) throws ProjectionException { if (!transcript.getCDSRegion().contains(pos)) throw new ProjectionException("Position " + pos + " is not in the CDS region " + transcript.getCDSRegion()); pos = pos.withStrand(transcript.getStrand()); Tran... | TranscriptProjectionDecorator { public CDSPosition genomeToCDSPos(GenomePosition pos) throws ProjectionException { if (!transcript.getCDSRegion().contains(pos)) throw new ProjectionException("Position " + pos + " is not in the CDS region " + transcript.getCDSRegion()); pos = pos.withStrand(transcript.getStrand()); Tran... |
@Test public void testGenomeToCDSPosReverse() throws ProjectionException { TranscriptProjectionDecorator projector = new TranscriptProjectionDecorator(infoReverse); Assert.assertEquals(new CDSPosition(infoReverse, 1, PositionType.ONE_BASED), projector.genomeToCDSPos(new GenomePosition(refDict, Strand.FWD, 1, 23694498, ... | public CDSPosition genomeToCDSPos(GenomePosition pos) throws ProjectionException { if (!transcript.getCDSRegion().contains(pos)) throw new ProjectionException("Position " + pos + " is not in the CDS region " + transcript.getCDSRegion()); pos = pos.withStrand(transcript.getStrand()); TranscriptPosition txPos = genomeToT... | TranscriptProjectionDecorator { public CDSPosition genomeToCDSPos(GenomePosition pos) throws ProjectionException { if (!transcript.getCDSRegion().contains(pos)) throw new ProjectionException("Position " + pos + " is not in the CDS region " + transcript.getCDSRegion()); pos = pos.withStrand(transcript.getStrand()); Tran... | TranscriptProjectionDecorator { public CDSPosition genomeToCDSPos(GenomePosition pos) throws ProjectionException { if (!transcript.getCDSRegion().contains(pos)) throw new ProjectionException("Position " + pos + " is not in the CDS region " + transcript.getCDSRegion()); pos = pos.withStrand(transcript.getStrand()); Tran... | TranscriptProjectionDecorator { public CDSPosition genomeToCDSPos(GenomePosition pos) throws ProjectionException { if (!transcript.getCDSRegion().contains(pos)) throw new ProjectionException("Position " + pos + " is not in the CDS region " + transcript.getCDSRegion()); pos = pos.withStrand(transcript.getStrand()); Tran... | TranscriptProjectionDecorator { public CDSPosition genomeToCDSPos(GenomePosition pos) throws ProjectionException { if (!transcript.getCDSRegion().contains(pos)) throw new ProjectionException("Position " + pos + " is not in the CDS region " + transcript.getCDSRegion()); pos = pos.withStrand(transcript.getStrand()); Tran... |
@Test public void testCDSPosToTranscriptPosForward() { TranscriptProjectionDecorator projector = new TranscriptProjectionDecorator(infoForward); Assert.assertEquals(new TranscriptPosition(infoForward, 203), projector.cdsToTranscriptPos(new CDSPosition(infoForward, 0))); Assert.assertEquals(new TranscriptPosition(infoFo... | public TranscriptPosition cdsToTranscriptPos(CDSPosition pos) { final GenomePosition cdsBeginPos = transcript.getCDSRegion().getGenomeBeginPos(); int currPos = 0; for (GenomeInterval region : transcript.getExonRegions()) { if (region.getGenomeEndPos().isLeq(cdsBeginPos)) { currPos += region.length(); } else { currPos +... | TranscriptProjectionDecorator { public TranscriptPosition cdsToTranscriptPos(CDSPosition pos) { final GenomePosition cdsBeginPos = transcript.getCDSRegion().getGenomeBeginPos(); int currPos = 0; for (GenomeInterval region : transcript.getExonRegions()) { if (region.getGenomeEndPos().isLeq(cdsBeginPos)) { currPos += reg... | TranscriptProjectionDecorator { public TranscriptPosition cdsToTranscriptPos(CDSPosition pos) { final GenomePosition cdsBeginPos = transcript.getCDSRegion().getGenomeBeginPos(); int currPos = 0; for (GenomeInterval region : transcript.getExonRegions()) { if (region.getGenomeEndPos().isLeq(cdsBeginPos)) { currPos += reg... | TranscriptProjectionDecorator { public TranscriptPosition cdsToTranscriptPos(CDSPosition pos) { final GenomePosition cdsBeginPos = transcript.getCDSRegion().getGenomeBeginPos(); int currPos = 0; for (GenomeInterval region : transcript.getExonRegions()) { if (region.getGenomeEndPos().isLeq(cdsBeginPos)) { currPos += reg... | TranscriptProjectionDecorator { public TranscriptPosition cdsToTranscriptPos(CDSPosition pos) { final GenomePosition cdsBeginPos = transcript.getCDSRegion().getGenomeBeginPos(); int currPos = 0; for (GenomeInterval region : transcript.getExonRegions()) { if (region.getGenomeEndPos().isLeq(cdsBeginPos)) { currPos += reg... |
@Test public void testCDSPosToTranscriptPosReverse() { TranscriptProjectionDecorator projector = new TranscriptProjectionDecorator(infoReverse); Assert.assertEquals(new TranscriptPosition(infoReverse, 559), projector.cdsToTranscriptPos(new CDSPosition(infoReverse, 0))); Assert.assertEquals(new TranscriptPosition(infoRe... | public TranscriptPosition cdsToTranscriptPos(CDSPosition pos) { final GenomePosition cdsBeginPos = transcript.getCDSRegion().getGenomeBeginPos(); int currPos = 0; for (GenomeInterval region : transcript.getExonRegions()) { if (region.getGenomeEndPos().isLeq(cdsBeginPos)) { currPos += region.length(); } else { currPos +... | TranscriptProjectionDecorator { public TranscriptPosition cdsToTranscriptPos(CDSPosition pos) { final GenomePosition cdsBeginPos = transcript.getCDSRegion().getGenomeBeginPos(); int currPos = 0; for (GenomeInterval region : transcript.getExonRegions()) { if (region.getGenomeEndPos().isLeq(cdsBeginPos)) { currPos += reg... | TranscriptProjectionDecorator { public TranscriptPosition cdsToTranscriptPos(CDSPosition pos) { final GenomePosition cdsBeginPos = transcript.getCDSRegion().getGenomeBeginPos(); int currPos = 0; for (GenomeInterval region : transcript.getExonRegions()) { if (region.getGenomeEndPos().isLeq(cdsBeginPos)) { currPos += reg... | TranscriptProjectionDecorator { public TranscriptPosition cdsToTranscriptPos(CDSPosition pos) { final GenomePosition cdsBeginPos = transcript.getCDSRegion().getGenomeBeginPos(); int currPos = 0; for (GenomeInterval region : transcript.getExonRegions()) { if (region.getGenomeEndPos().isLeq(cdsBeginPos)) { currPos += reg... | TranscriptProjectionDecorator { public TranscriptPosition cdsToTranscriptPos(CDSPosition pos) { final GenomePosition cdsBeginPos = transcript.getCDSRegion().getGenomeBeginPos(); int currPos = 0; for (GenomeInterval region : transcript.getExonRegions()) { if (region.getGenomeEndPos().isLeq(cdsBeginPos)) { currPos += reg... |
@Test public void testCDSPosToGenomePosForward() throws ProjectionException { TranscriptProjectionDecorator projector = new TranscriptProjectionDecorator(infoForward); Assert.assertEquals(new GenomePosition(refDict, Strand.FWD, 1, 6640669), projector.cdsToGenomePos(new CDSPosition(infoForward, 0))); Assert.assertEquals... | public GenomePosition cdsToGenomePos(CDSPosition pos) throws ProjectionException { return transcriptToGenomePos(cdsToTranscriptPos(pos)); } | TranscriptProjectionDecorator { public GenomePosition cdsToGenomePos(CDSPosition pos) throws ProjectionException { return transcriptToGenomePos(cdsToTranscriptPos(pos)); } } | TranscriptProjectionDecorator { public GenomePosition cdsToGenomePos(CDSPosition pos) throws ProjectionException { return transcriptToGenomePos(cdsToTranscriptPos(pos)); } TranscriptProjectionDecorator(TranscriptModel transcript); } | TranscriptProjectionDecorator { public GenomePosition cdsToGenomePos(CDSPosition pos) throws ProjectionException { return transcriptToGenomePos(cdsToTranscriptPos(pos)); } TranscriptProjectionDecorator(TranscriptModel transcript); TranscriptModel getTranscript(); String getCDSTranscript(); String getTranscriptStartingA... | TranscriptProjectionDecorator { public GenomePosition cdsToGenomePos(CDSPosition pos) throws ProjectionException { return transcriptToGenomePos(cdsToTranscriptPos(pos)); } TranscriptProjectionDecorator(TranscriptModel transcript); TranscriptModel getTranscript(); String getCDSTranscript(); String getTranscriptStartingA... |
@Test public void testCDSPosToGenomePosReverse() throws ProjectionException { TranscriptProjectionDecorator projector = new TranscriptProjectionDecorator(infoReverse); Assert.assertEquals(new GenomePosition(refDict, Strand.FWD, 1, 23694497), projector.cdsToGenomePos(new CDSPosition(infoReverse, 0))); Assert.assertEqual... | public GenomePosition cdsToGenomePos(CDSPosition pos) throws ProjectionException { return transcriptToGenomePos(cdsToTranscriptPos(pos)); } | TranscriptProjectionDecorator { public GenomePosition cdsToGenomePos(CDSPosition pos) throws ProjectionException { return transcriptToGenomePos(cdsToTranscriptPos(pos)); } } | TranscriptProjectionDecorator { public GenomePosition cdsToGenomePos(CDSPosition pos) throws ProjectionException { return transcriptToGenomePos(cdsToTranscriptPos(pos)); } TranscriptProjectionDecorator(TranscriptModel transcript); } | TranscriptProjectionDecorator { public GenomePosition cdsToGenomePos(CDSPosition pos) throws ProjectionException { return transcriptToGenomePos(cdsToTranscriptPos(pos)); } TranscriptProjectionDecorator(TranscriptModel transcript); TranscriptModel getTranscript(); String getCDSTranscript(); String getTranscriptStartingA... | TranscriptProjectionDecorator { public GenomePosition cdsToGenomePos(CDSPosition pos) throws ProjectionException { return transcriptToGenomePos(cdsToTranscriptPos(pos)); } TranscriptProjectionDecorator(TranscriptModel transcript); TranscriptModel getTranscript(); String getCDSTranscript(); String getTranscriptStartingA... |
@Test public void testCDSToGenomePosHandcuratedFibrilin() throws ProjectionException { this.builderForward = TranscriptModelFactory .parseKnownGenesLine( refDict, "uc001zwx.2 chr15 - 48700502 48937985 48703186 48936966 66 48700502,48704765,48707732,48712883,48713754,48714148,48717565,48717935,48719763,48720542,48722867... | public GenomePosition cdsToGenomePos(CDSPosition pos) throws ProjectionException { return transcriptToGenomePos(cdsToTranscriptPos(pos)); } | TranscriptProjectionDecorator { public GenomePosition cdsToGenomePos(CDSPosition pos) throws ProjectionException { return transcriptToGenomePos(cdsToTranscriptPos(pos)); } } | TranscriptProjectionDecorator { public GenomePosition cdsToGenomePos(CDSPosition pos) throws ProjectionException { return transcriptToGenomePos(cdsToTranscriptPos(pos)); } TranscriptProjectionDecorator(TranscriptModel transcript); } | TranscriptProjectionDecorator { public GenomePosition cdsToGenomePos(CDSPosition pos) throws ProjectionException { return transcriptToGenomePos(cdsToTranscriptPos(pos)); } TranscriptProjectionDecorator(TranscriptModel transcript); TranscriptModel getTranscript(); String getCDSTranscript(); String getTranscriptStartingA... | TranscriptProjectionDecorator { public GenomePosition cdsToGenomePos(CDSPosition pos) throws ProjectionException { return transcriptToGenomePos(cdsToTranscriptPos(pos)); } TranscriptProjectionDecorator(TranscriptModel transcript); TranscriptModel getTranscript(); String getCDSTranscript(); String getTranscriptStartingA... |
@Test public void testGapLength() { assertEquals(10, Anchors.gapLength(ungapped)); assertEquals(10, Anchors.gapLength(leadingGap)); assertEquals(10, Anchors.gapLength(oneGap)); assertEquals(10, Anchors.gapLength(twoGaps)); assertEquals(10, Anchors.gapLength(trailingGap)); } | public static int gapLength(List<Anchor> anchors) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } return anchors.get(anchors.size() - 1).getGapPos(); } | Anchors { public static int gapLength(List<Anchor> anchors) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } return anchors.get(anchors.size() - 1).getGapPos(); } } | Anchors { public static int gapLength(List<Anchor> anchors) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } return anchors.get(anchors.size() - 1).getGapPos(); } } | Anchors { public static int gapLength(List<Anchor> anchors) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } return anchors.get(anchors.size() - 1).getGapPos(); } static int gapLength(List<Anchor> anchors); static int seqLength(List<Anchor> anchors); static int projectGapToS... | Anchors { public static int gapLength(List<Anchor> anchors) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } return anchors.get(anchors.size() - 1).getGapPos(); } static int gapLength(List<Anchor> anchors); static int seqLength(List<Anchor> anchors); static int projectGapToS... |
@Test public void testSeqLength() { assertEquals(10, Anchors.seqLength(ungapped)); assertEquals(8, Anchors.seqLength(leadingGap)); assertEquals(8, Anchors.seqLength(oneGap)); assertEquals(8, Anchors.seqLength(twoGaps)); assertEquals(8, Anchors.seqLength(trailingGap)); } | public static int seqLength(List<Anchor> anchors) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } return anchors.get(anchors.size() - 1).getSeqPos(); } | Anchors { public static int seqLength(List<Anchor> anchors) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } return anchors.get(anchors.size() - 1).getSeqPos(); } } | Anchors { public static int seqLength(List<Anchor> anchors) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } return anchors.get(anchors.size() - 1).getSeqPos(); } } | Anchors { public static int seqLength(List<Anchor> anchors) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } return anchors.get(anchors.size() - 1).getSeqPos(); } static int gapLength(List<Anchor> anchors); static int seqLength(List<Anchor> anchors); static int projectGapToS... | Anchors { public static int seqLength(List<Anchor> anchors) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } return anchors.get(anchors.size() - 1).getSeqPos(); } static int gapLength(List<Anchor> anchors); static int seqLength(List<Anchor> anchors); static int projectGapToS... |
@Test public void testProjectGapToSeqPos() { assertEquals(0, Anchors.projectGapToSeqPos(ungapped, 0)); assertEquals(1, Anchors.projectGapToSeqPos(ungapped, 1)); assertEquals(2, Anchors.projectGapToSeqPos(ungapped, 2)); assertEquals(3, Anchors.projectGapToSeqPos(ungapped, 3)); assertEquals(4, Anchors.projectGapToSeqPos(... | public static int projectGapToSeqPos(final List<Anchor> anchors, final int gapPos) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } assert gapPos <= gapLength(anchors); for (int idx = 0; idx + 1 < anchors.size(); ++idx) { final Anchor thisAnchor = anchors.get(idx); final Anch... | Anchors { public static int projectGapToSeqPos(final List<Anchor> anchors, final int gapPos) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } assert gapPos <= gapLength(anchors); for (int idx = 0; idx + 1 < anchors.size(); ++idx) { final Anchor thisAnchor = anchors.get(idx); ... | Anchors { public static int projectGapToSeqPos(final List<Anchor> anchors, final int gapPos) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } assert gapPos <= gapLength(anchors); for (int idx = 0; idx + 1 < anchors.size(); ++idx) { final Anchor thisAnchor = anchors.get(idx); ... | Anchors { public static int projectGapToSeqPos(final List<Anchor> anchors, final int gapPos) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } assert gapPos <= gapLength(anchors); for (int idx = 0; idx + 1 < anchors.size(); ++idx) { final Anchor thisAnchor = anchors.get(idx); ... | Anchors { public static int projectGapToSeqPos(final List<Anchor> anchors, final int gapPos) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } assert gapPos <= gapLength(anchors); for (int idx = 0; idx + 1 < anchors.size(); ++idx) { final Anchor thisAnchor = anchors.get(idx); ... |
@Test public void testToHGVSStringSingleChange() { Assert.assertEquals("PROTEIN:p.A100G", singleChangeVariant.toHGVSString(AminoAcidCode.ONE_LETTER)); Assert.assertEquals("PROTEIN:p.Ala100Gly", singleChangeVariant.toHGVSString(AminoAcidCode.THREE_LETTER)); Assert.assertEquals("PROTEIN:p.Ala100Gly", singleChangeVariant.... | @Override public String toHGVSString(AminoAcidCode code) { if (hasOnlyOneChange()) return Joiner.on("").join(getSequenceNamePrefix(), ":p.", getChange().toHGVSString(code)); final String sep = allele.getVarConfig().toHGVSSeparator(); ArrayList<String> parts = new ArrayList<>(); parts.add(getSequenceNamePrefix()); parts... | SingleAlleleProteinVariant extends ProteinVariant { @Override public String toHGVSString(AminoAcidCode code) { if (hasOnlyOneChange()) return Joiner.on("").join(getSequenceNamePrefix(), ":p.", getChange().toHGVSString(code)); final String sep = allele.getVarConfig().toHGVSSeparator(); ArrayList<String> parts = new Arra... | SingleAlleleProteinVariant extends ProteinVariant { @Override public String toHGVSString(AminoAcidCode code) { if (hasOnlyOneChange()) return Joiner.on("").join(getSequenceNamePrefix(), ":p.", getChange().toHGVSString(code)); final String sep = allele.getVarConfig().toHGVSSeparator(); ArrayList<String> parts = new Arra... | SingleAlleleProteinVariant extends ProteinVariant { @Override public String toHGVSString(AminoAcidCode code) { if (hasOnlyOneChange()) return Joiner.on("").join(getSequenceNamePrefix(), ":p.", getChange().toHGVSString(code)); final String sep = allele.getVarConfig().toHGVSSeparator(); ArrayList<String> parts = new Arra... | SingleAlleleProteinVariant extends ProteinVariant { @Override public String toHGVSString(AminoAcidCode code) { if (hasOnlyOneChange()) return Joiner.on("").join(getSequenceNamePrefix(), ":p.", getChange().toHGVSString(code)); final String sep = allele.getVarConfig().toHGVSSeparator(); ArrayList<String> parts = new Arra... |
@Test public void testProjectSeqToGapPos() { assertEquals(0, Anchors.projectSeqToGapPos(ungapped, 0)); assertEquals(1, Anchors.projectSeqToGapPos(ungapped, 1)); assertEquals(2, Anchors.projectSeqToGapPos(ungapped, 2)); assertEquals(3, Anchors.projectSeqToGapPos(ungapped, 3)); assertEquals(4, Anchors.projectSeqToGapPos(... | public static int projectSeqToGapPos(final List<Anchor> anchors, final int seqPos) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } if (seqPos > seqLength(anchors)) { return gapLength(anchors) + seqLength(anchors) - seqPos; } int gapPos = 0; for (int idx = 0; idx + 1 < anchor... | Anchors { public static int projectSeqToGapPos(final List<Anchor> anchors, final int seqPos) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } if (seqPos > seqLength(anchors)) { return gapLength(anchors) + seqLength(anchors) - seqPos; } int gapPos = 0; for (int idx = 0; idx + ... | Anchors { public static int projectSeqToGapPos(final List<Anchor> anchors, final int seqPos) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } if (seqPos > seqLength(anchors)) { return gapLength(anchors) + seqLength(anchors) - seqPos; } int gapPos = 0; for (int idx = 0; idx + ... | Anchors { public static int projectSeqToGapPos(final List<Anchor> anchors, final int seqPos) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } if (seqPos > seqLength(anchors)) { return gapLength(anchors) + seqLength(anchors) - seqPos; } int gapPos = 0; for (int idx = 0; idx + ... | Anchors { public static int projectSeqToGapPos(final List<Anchor> anchors, final int seqPos) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } if (seqPos > seqLength(anchors)) { return gapLength(anchors) + seqLength(anchors) - seqPos; } int gapPos = 0; for (int idx = 0; idx + ... |
@Test public void testCountLeadingGaps() { assertEquals(0, Anchors.countLeadingGaps(ungapped)); assertEquals(2, Anchors.countLeadingGaps(leadingGap)); assertEquals(0, Anchors.countLeadingGaps(oneGap)); assertEquals(0, Anchors.countLeadingGaps(twoGaps)); assertEquals(0, Anchors.countLeadingGaps(trailingGap)); } | public static int countLeadingGaps(List<Anchor> anchors) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } else if (anchors.size() < 2 || (anchors.get(0).getSeqPos() != anchors.get(1) .getSeqPos())) { return 0; } else { assert anchors.get(0).getSeqPos() == 0; return anchors.ge... | Anchors { public static int countLeadingGaps(List<Anchor> anchors) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } else if (anchors.size() < 2 || (anchors.get(0).getSeqPos() != anchors.get(1) .getSeqPos())) { return 0; } else { assert anchors.get(0).getSeqPos() == 0; return ... | Anchors { public static int countLeadingGaps(List<Anchor> anchors) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } else if (anchors.size() < 2 || (anchors.get(0).getSeqPos() != anchors.get(1) .getSeqPos())) { return 0; } else { assert anchors.get(0).getSeqPos() == 0; return ... | Anchors { public static int countLeadingGaps(List<Anchor> anchors) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } else if (anchors.size() < 2 || (anchors.get(0).getSeqPos() != anchors.get(1) .getSeqPos())) { return 0; } else { assert anchors.get(0).getSeqPos() == 0; return ... | Anchors { public static int countLeadingGaps(List<Anchor> anchors) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } else if (anchors.size() < 2 || (anchors.get(0).getSeqPos() != anchors.get(1) .getSeqPos())) { return 0; } else { assert anchors.get(0).getSeqPos() == 0; return ... |
@Test public void testCountTrailingGaps() { assertEquals(0, Anchors.countTrailingGaps(ungapped)); assertEquals(0, Anchors.countTrailingGaps(leadingGap)); assertEquals(0, Anchors.countTrailingGaps(oneGap)); assertEquals(0, Anchors.countTrailingGaps(twoGaps)); assertEquals(2, Anchors.countTrailingGaps(trailingGap)); } | public static int countTrailingGaps(List<Anchor> anchors) { final int len = anchors.size(); if (len < 2) { throw new RuntimeException("Must have at least two anchors!"); } else if ((anchors.get(len - 1).getSeqPos() != anchors.get(len - 2).getSeqPos())) { return 0; } else { return anchors.get(len - 1).getGapPos() - anch... | Anchors { public static int countTrailingGaps(List<Anchor> anchors) { final int len = anchors.size(); if (len < 2) { throw new RuntimeException("Must have at least two anchors!"); } else if ((anchors.get(len - 1).getSeqPos() != anchors.get(len - 2).getSeqPos())) { return 0; } else { return anchors.get(len - 1).getGapPo... | Anchors { public static int countTrailingGaps(List<Anchor> anchors) { final int len = anchors.size(); if (len < 2) { throw new RuntimeException("Must have at least two anchors!"); } else if ((anchors.get(len - 1).getSeqPos() != anchors.get(len - 2).getSeqPos())) { return 0; } else { return anchors.get(len - 1).getGapPo... | Anchors { public static int countTrailingGaps(List<Anchor> anchors) { final int len = anchors.size(); if (len < 2) { throw new RuntimeException("Must have at least two anchors!"); } else if ((anchors.get(len - 1).getSeqPos() != anchors.get(len - 2).getSeqPos())) { return 0; } else { return anchors.get(len - 1).getGapPo... | Anchors { public static int countTrailingGaps(List<Anchor> anchors) { final int len = anchors.size(); if (len < 2) { throw new RuntimeException("Must have at least two anchors!"); } else if ((anchors.get(len - 1).getSeqPos() != anchors.get(len - 2).getSeqPos())) { return 0; } else { return anchors.get(len - 1).getGapPo... |
@Test public void refLeadingGapLength() { assertEquals(0, ungapped.refLeadingGapLength()); assertEquals(0, overlap.refLeadingGapLength()); assertEquals(0, refIsLonger.refLeadingGapLength()); assertEquals(2, qryIsLonger.refLeadingGapLength()); } | public int refLeadingGapLength() { return Anchors.countLeadingGaps(refAnchors); } | Alignment implements Serializable { public int refLeadingGapLength() { return Anchors.countLeadingGaps(refAnchors); } } | Alignment implements Serializable { public int refLeadingGapLength() { return Anchors.countLeadingGaps(refAnchors); } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); } | Alignment implements Serializable { public int refLeadingGapLength() { return Anchors.countLeadingGaps(refAnchors); } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); static Alignment createUngappedAlignment(int length); ImmutableList<Anchor> getRefAnchors(); ImmutableList<Anchor> getQryAnchors(); int refLe... | Alignment implements Serializable { public int refLeadingGapLength() { return Anchors.countLeadingGaps(refAnchors); } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); static Alignment createUngappedAlignment(int length); ImmutableList<Anchor> getRefAnchors(); ImmutableList<Anchor> getQryAnchors(); int refLe... |
@Test public void refTrailingGapLength() { assertEquals(0, ungapped.refTrailingGapLength()); assertEquals(2, overlap.refTrailingGapLength()); assertEquals(0, refIsLonger.refTrailingGapLength()); assertEquals(2, qryIsLonger.refTrailingGapLength()); } | public int refTrailingGapLength() { return Anchors.countTrailingGaps(refAnchors); } | Alignment implements Serializable { public int refTrailingGapLength() { return Anchors.countTrailingGaps(refAnchors); } } | Alignment implements Serializable { public int refTrailingGapLength() { return Anchors.countTrailingGaps(refAnchors); } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); } | Alignment implements Serializable { public int refTrailingGapLength() { return Anchors.countTrailingGaps(refAnchors); } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); static Alignment createUngappedAlignment(int length); ImmutableList<Anchor> getRefAnchors(); ImmutableList<Anchor> getQryAnchors(); int ref... | Alignment implements Serializable { public int refTrailingGapLength() { return Anchors.countTrailingGaps(refAnchors); } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); static Alignment createUngappedAlignment(int length); ImmutableList<Anchor> getRefAnchors(); ImmutableList<Anchor> getQryAnchors(); int ref... |
@Test public void qryLeadingGapLength() { assertEquals(0, ungapped.qryLeadingGapLength()); assertEquals(2, overlap.qryLeadingGapLength()); assertEquals(2, refIsLonger.qryLeadingGapLength()); assertEquals(0, qryIsLonger.qryLeadingGapLength()); } | public int qryLeadingGapLength() { return Anchors.countLeadingGaps(qryAnchors); } | Alignment implements Serializable { public int qryLeadingGapLength() { return Anchors.countLeadingGaps(qryAnchors); } } | Alignment implements Serializable { public int qryLeadingGapLength() { return Anchors.countLeadingGaps(qryAnchors); } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); } | Alignment implements Serializable { public int qryLeadingGapLength() { return Anchors.countLeadingGaps(qryAnchors); } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); static Alignment createUngappedAlignment(int length); ImmutableList<Anchor> getRefAnchors(); ImmutableList<Anchor> getQryAnchors(); int refLe... | Alignment implements Serializable { public int qryLeadingGapLength() { return Anchors.countLeadingGaps(qryAnchors); } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); static Alignment createUngappedAlignment(int length); ImmutableList<Anchor> getRefAnchors(); ImmutableList<Anchor> getQryAnchors(); int refLe... |
@Test public void qryTrailingGapLength() { assertEquals(0, ungapped.qryTrailingGapLength()); assertEquals(0, overlap.qryTrailingGapLength()); assertEquals(2, refIsLonger.qryTrailingGapLength()); assertEquals(0, qryIsLonger.qryTrailingGapLength()); } | public int qryTrailingGapLength() { return Anchors.countTrailingGaps(qryAnchors); } | Alignment implements Serializable { public int qryTrailingGapLength() { return Anchors.countTrailingGaps(qryAnchors); } } | Alignment implements Serializable { public int qryTrailingGapLength() { return Anchors.countTrailingGaps(qryAnchors); } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); } | Alignment implements Serializable { public int qryTrailingGapLength() { return Anchors.countTrailingGaps(qryAnchors); } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); static Alignment createUngappedAlignment(int length); ImmutableList<Anchor> getRefAnchors(); ImmutableList<Anchor> getQryAnchors(); int ref... | Alignment implements Serializable { public int qryTrailingGapLength() { return Anchors.countTrailingGaps(qryAnchors); } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); static Alignment createUngappedAlignment(int length); ImmutableList<Anchor> getRefAnchors(); ImmutableList<Anchor> getQryAnchors(); int ref... |
@Test public void projectRefToQuery() { for (int i = 0; i < 10; ++i) { assertEquals(0, ungapped.projectRefToQry(0)); } assertEquals(0, overlap.projectRefToQry(0)); assertEquals(0, overlap.projectRefToQry(1)); assertEquals(0, overlap.projectRefToQry(2)); assertEquals(1, overlap.projectRefToQry(3)); assertEquals(2, overl... | public int projectRefToQry(int refPos) { final int aliPos = Anchors.projectSeqToGapPos(refAnchors, refPos); final int qryPos = Anchors.projectGapToSeqPos(qryAnchors, aliPos); return qryPos; } | Alignment implements Serializable { public int projectRefToQry(int refPos) { final int aliPos = Anchors.projectSeqToGapPos(refAnchors, refPos); final int qryPos = Anchors.projectGapToSeqPos(qryAnchors, aliPos); return qryPos; } } | Alignment implements Serializable { public int projectRefToQry(int refPos) { final int aliPos = Anchors.projectSeqToGapPos(refAnchors, refPos); final int qryPos = Anchors.projectGapToSeqPos(qryAnchors, aliPos); return qryPos; } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); } | Alignment implements Serializable { public int projectRefToQry(int refPos) { final int aliPos = Anchors.projectSeqToGapPos(refAnchors, refPos); final int qryPos = Anchors.projectGapToSeqPos(qryAnchors, aliPos); return qryPos; } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); static Alignment createUngapped... | Alignment implements Serializable { public int projectRefToQry(int refPos) { final int aliPos = Anchors.projectSeqToGapPos(refAnchors, refPos); final int qryPos = Anchors.projectGapToSeqPos(qryAnchors, aliPos); return qryPos; } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); static Alignment createUngapped... |
@Test public void projectQueryToRef() { for (int i = 0; i < 10; ++i) { assertEquals(0, ungapped.projectQryToRef(0)); } assertEquals(2, overlap.projectQryToRef(0)); assertEquals(3, overlap.projectQryToRef(1)); assertEquals(5, overlap.projectQryToRef(2)); assertEquals(5, overlap.projectQryToRef(3)); assertEquals(6, overl... | public int projectQryToRef(int qryPos) { final int aliPos = Anchors.projectSeqToGapPos(qryAnchors, qryPos); final int refPos = Anchors.projectGapToSeqPos(refAnchors, aliPos); return refPos; } | Alignment implements Serializable { public int projectQryToRef(int qryPos) { final int aliPos = Anchors.projectSeqToGapPos(qryAnchors, qryPos); final int refPos = Anchors.projectGapToSeqPos(refAnchors, aliPos); return refPos; } } | Alignment implements Serializable { public int projectQryToRef(int qryPos) { final int aliPos = Anchors.projectSeqToGapPos(qryAnchors, qryPos); final int refPos = Anchors.projectGapToSeqPos(refAnchors, aliPos); return refPos; } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); } | Alignment implements Serializable { public int projectQryToRef(int qryPos) { final int aliPos = Anchors.projectSeqToGapPos(qryAnchors, qryPos); final int refPos = Anchors.projectGapToSeqPos(refAnchors, aliPos); return refPos; } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); static Alignment createUngapped... | Alignment implements Serializable { public int projectQryToRef(int qryPos) { final int aliPos = Anchors.projectSeqToGapPos(qryAnchors, qryPos); final int refPos = Anchors.projectGapToSeqPos(refAnchors, aliPos); return refPos; } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); static Alignment createUngapped... |
@Test public void testIsLeftOf() { GenomeInterval interval = new GenomeInterval(refDict, Strand.FWD, 1, 1000, 1200, PositionType.ONE_BASED); Assert.assertTrue(interval.isRightOf(new GenomePosition(refDict, Strand.FWD, 1, 999, PositionType.ONE_BASED))); Assert.assertFalse(interval .isRightOf(new GenomePosition(refDict, ... | public boolean isLeftOf(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= endPos); } | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean isLeftOf(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= endPos); } } | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean isLeftOf(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= endPos); } GenomeInterval(ReferenceDictionary refDict, Strand strand, int chr, int beginPos, int endPos); Genome... | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean isLeftOf(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= endPos); } GenomeInterval(ReferenceDictionary refDict, Strand strand, int chr, int beginPos, int endPos); Genome... | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean isLeftOf(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= endPos); } GenomeInterval(ReferenceDictionary refDict, Strand strand, int chr, int beginPos, int endPos); Genome... |
@Test public void testToHGVSStringMultiChange() { Assert.assertEquals("PROTEIN:p.[C100T;A301G]", multiChangeVariant.toHGVSString(AminoAcidCode.ONE_LETTER)); Assert.assertEquals("PROTEIN:p.[Cys100Thr;Ala301Gly]", multiChangeVariant.toHGVSString(AminoAcidCode.THREE_LETTER)); Assert.assertEquals("PROTEIN:p.[Cys100Thr;Ala3... | @Override public String toHGVSString(AminoAcidCode code) { if (hasOnlyOneChange()) return Joiner.on("").join(getSequenceNamePrefix(), ":p.", getChange().toHGVSString(code)); final String sep = allele.getVarConfig().toHGVSSeparator(); ArrayList<String> parts = new ArrayList<>(); parts.add(getSequenceNamePrefix()); parts... | SingleAlleleProteinVariant extends ProteinVariant { @Override public String toHGVSString(AminoAcidCode code) { if (hasOnlyOneChange()) return Joiner.on("").join(getSequenceNamePrefix(), ":p.", getChange().toHGVSString(code)); final String sep = allele.getVarConfig().toHGVSSeparator(); ArrayList<String> parts = new Arra... | SingleAlleleProteinVariant extends ProteinVariant { @Override public String toHGVSString(AminoAcidCode code) { if (hasOnlyOneChange()) return Joiner.on("").join(getSequenceNamePrefix(), ":p.", getChange().toHGVSString(code)); final String sep = allele.getVarConfig().toHGVSSeparator(); ArrayList<String> parts = new Arra... | SingleAlleleProteinVariant extends ProteinVariant { @Override public String toHGVSString(AminoAcidCode code) { if (hasOnlyOneChange()) return Joiner.on("").join(getSequenceNamePrefix(), ":p.", getChange().toHGVSString(code)); final String sep = allele.getVarConfig().toHGVSSeparator(); ArrayList<String> parts = new Arra... | SingleAlleleProteinVariant extends ProteinVariant { @Override public String toHGVSString(AminoAcidCode code) { if (hasOnlyOneChange()) return Joiner.on("").join(getSequenceNamePrefix(), ":p.", getChange().toHGVSString(code)); final String sep = allele.getVarConfig().toHGVSSeparator(); ArrayList<String> parts = new Arra... |
@Test public void testIsRightOf() { GenomeInterval interval = new GenomeInterval(refDict, Strand.FWD, 1, 1000, 1200, PositionType.ONE_BASED); Assert.assertFalse(interval.isLeftOf(new GenomePosition(refDict, Strand.FWD, 1, 1200, PositionType.ONE_BASED))); Assert.assertTrue(interval.isLeftOf(new GenomePosition(refDict, S... | public boolean isRightOf(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() < beginPos); } | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean isRightOf(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() < beginPos); } } | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean isRightOf(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() < beginPos); } GenomeInterval(ReferenceDictionary refDict, Strand strand, int chr, int beginPos, int endPos); Geno... | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean isRightOf(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() < beginPos); } GenomeInterval(ReferenceDictionary refDict, Strand strand, int chr, int beginPos, int endPos); Geno... | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean isRightOf(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() < beginPos); } GenomeInterval(ReferenceDictionary refDict, Strand strand, int chr, int beginPos, int endPos); Geno... |
@Test public void testContainsSameChrYes() { GenomeInterval interval = new GenomeInterval(refDict, Strand.FWD, 1, 1000, 1200, PositionType.ONE_BASED); Assert.assertTrue(interval.contains(new GenomePosition(refDict, Strand.FWD, 1, 1000, PositionType.ONE_BASED))); Assert.assertTrue(interval.contains(new GenomePosition(re... | public boolean contains(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= beginPos && pos.getPos() < endPos); } | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean contains(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= beginPos && pos.getPos() < endPos); } } | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean contains(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= beginPos && pos.getPos() < endPos); } GenomeInterval(ReferenceDictionary refDict, Strand strand, int chr, int beg... | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean contains(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= beginPos && pos.getPos() < endPos); } GenomeInterval(ReferenceDictionary refDict, Strand strand, int chr, int beg... | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean contains(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= beginPos && pos.getPos() < endPos); } GenomeInterval(ReferenceDictionary refDict, Strand strand, int chr, int beg... |
@Test public void testContainsSameChrNo() { GenomeInterval interval = new GenomeInterval(refDict, Strand.FWD, 1, 1000, 1200, PositionType.ONE_BASED); Assert.assertFalse(interval.contains(new GenomePosition(refDict, Strand.FWD, 1, 999, PositionType.ONE_BASED))); Assert.assertFalse(interval.contains(new GenomePosition(re... | public boolean contains(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= beginPos && pos.getPos() < endPos); } | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean contains(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= beginPos && pos.getPos() < endPos); } } | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean contains(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= beginPos && pos.getPos() < endPos); } GenomeInterval(ReferenceDictionary refDict, Strand strand, int chr, int beg... | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean contains(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= beginPos && pos.getPos() < endPos); } GenomeInterval(ReferenceDictionary refDict, Strand strand, int chr, int beg... | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean contains(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= beginPos && pos.getPos() < endPos); } GenomeInterval(ReferenceDictionary refDict, Strand strand, int chr, int beg... |
@Test public void testContainsDifferentChr() { GenomeInterval interval = new GenomeInterval(refDict, Strand.FWD, 1, 1000, 1200, PositionType.ONE_BASED); Assert.assertFalse(interval.contains(new GenomePosition(refDict, Strand.FWD, 2, 1100, PositionType.ONE_BASED))); } | public boolean contains(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= beginPos && pos.getPos() < endPos); } | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean contains(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= beginPos && pos.getPos() < endPos); } } | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean contains(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= beginPos && pos.getPos() < endPos); } GenomeInterval(ReferenceDictionary refDict, Strand strand, int chr, int beg... | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean contains(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= beginPos && pos.getPos() < endPos); } GenomeInterval(ReferenceDictionary refDict, Strand strand, int chr, int beg... | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean contains(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= beginPos && pos.getPos() < endPos); } GenomeInterval(ReferenceDictionary refDict, Strand strand, int chr, int beg... |
@Test public void testIntersection() { GenomeInterval intervalL = new GenomeInterval(refDict, Strand.FWD, 1, 1000, 1200, PositionType.ONE_BASED); GenomeInterval intervalR = new GenomeInterval(refDict, Strand.FWD, 1, 1100, 1300, PositionType.ONE_BASED); GenomeInterval intervalE = new GenomeInterval(refDict, Strand.FWD, ... | public GenomeInterval intersection(GenomeInterval other) { if (chr != other.chr) return new GenomeInterval(refDict, strand, chr, beginPos, beginPos, PositionType.ZERO_BASED); other = other.withStrand(strand); int beginPos = Math.max(this.beginPos, other.beginPos); int endPos = Math.min(this.endPos, other.endPos); if (e... | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public GenomeInterval intersection(GenomeInterval other) { if (chr != other.chr) return new GenomeInterval(refDict, strand, chr, beginPos, beginPos, PositionType.ZERO_BASED); other = other.withStrand(strand); int beginPos = Math.max(this.beginPos, oth... | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public GenomeInterval intersection(GenomeInterval other) { if (chr != other.chr) return new GenomeInterval(refDict, strand, chr, beginPos, beginPos, PositionType.ZERO_BASED); other = other.withStrand(strand); int beginPos = Math.max(this.beginPos, oth... | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public GenomeInterval intersection(GenomeInterval other) { if (chr != other.chr) return new GenomeInterval(refDict, strand, chr, beginPos, beginPos, PositionType.ZERO_BASED); other = other.withStrand(strand); int beginPos = Math.max(this.beginPos, oth... | GenomeInterval implements Serializable, Comparable<GenomeInterval> { public GenomeInterval intersection(GenomeInterval other) { if (chr != other.chr) return new GenomeInterval(refDict, strand, chr, beginPos, beginPos, PositionType.ZERO_BASED); other = other.withStrand(strand); int beginPos = Math.max(this.beginPos, oth... |
@Test public void testLt() { GenomePosition posL = new GenomePosition(refDict, Strand.FWD, 1, 100, PositionType.ONE_BASED); GenomePosition posR = new GenomePosition(refDict, Strand.FWD, 1, 101, PositionType.ONE_BASED); Assert.assertTrue(posL.isLt(posR)); Assert.assertFalse(posL.isLt(posL)); Assert.assertFalse(posR.isLt... | public boolean isLt(GenomePosition other) { if (other.strand != strand) other = other.withStrand(strand); return (pos < other.pos); } | GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isLt(GenomePosition other) { if (other.strand != strand) other = other.withStrand(strand); return (pos < other.pos); } } | GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isLt(GenomePosition other) { if (other.strand != strand) other = other.withStrand(strand); return (pos < other.pos); } GenomePosition(ReferenceDictionary refDict, Strand strand, int chr, int pos); GenomePosition(ReferenceDictionary ref... | GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isLt(GenomePosition other) { if (other.strand != strand) other = other.withStrand(strand); return (pos < other.pos); } GenomePosition(ReferenceDictionary refDict, Strand strand, int chr, int pos); GenomePosition(ReferenceDictionary ref... | GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isLt(GenomePosition other) { if (other.strand != strand) other = other.withStrand(strand); return (pos < other.pos); } GenomePosition(ReferenceDictionary refDict, Strand strand, int chr, int pos); GenomePosition(ReferenceDictionary ref... |
@Test public void testLeq() { GenomePosition posL = new GenomePosition(refDict, Strand.FWD, 1, 100, PositionType.ONE_BASED); GenomePosition posR = new GenomePosition(refDict, Strand.FWD, 1, 101, PositionType.ONE_BASED); Assert.assertTrue(posL.isLeq(posR)); Assert.assertTrue(posL.isLeq(posL)); Assert.assertFalse(posR.is... | public boolean isLeq(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos <= other.pos); } | GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isLeq(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos <= other.pos); } } | GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isLeq(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos <= other.pos); } GenomePosition(ReferenceDictionary refDict, Strand strand, int chr, int pos); ... | GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isLeq(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos <= other.pos); } GenomePosition(ReferenceDictionary refDict, Strand strand, int chr, int pos); ... | GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isLeq(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos <= other.pos); } GenomePosition(ReferenceDictionary refDict, Strand strand, int chr, int pos); ... |
@Test public void testGt() { GenomePosition posL = new GenomePosition(refDict, Strand.FWD, 1, 100, PositionType.ONE_BASED); GenomePosition posR = new GenomePosition(refDict, Strand.FWD, 1, 101, PositionType.ONE_BASED); Assert.assertFalse(posL.isGt(posR)); Assert.assertFalse(posL.isGt(posL)); Assert.assertTrue(posR.isGt... | public boolean isGt(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos > other.pos); } | GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isGt(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos > other.pos); } } | GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isGt(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos > other.pos); } GenomePosition(ReferenceDictionary refDict, Strand strand, int chr, int pos); Ge... | GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isGt(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos > other.pos); } GenomePosition(ReferenceDictionary refDict, Strand strand, int chr, int pos); Ge... | GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isGt(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos > other.pos); } GenomePosition(ReferenceDictionary refDict, Strand strand, int chr, int pos); Ge... |
@Test public void testGeq() { GenomePosition posL = new GenomePosition(refDict, Strand.FWD, 1, 100, PositionType.ONE_BASED); GenomePosition posR = new GenomePosition(refDict, Strand.FWD, 1, 101, PositionType.ONE_BASED); Assert.assertFalse(posL.isGeq(posR)); Assert.assertTrue(posL.isGeq(posL)); Assert.assertTrue(posR.is... | public boolean isGeq(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos >= other.pos); } | GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isGeq(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos >= other.pos); } } | GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isGeq(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos >= other.pos); } GenomePosition(ReferenceDictionary refDict, Strand strand, int chr, int pos); ... | GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isGeq(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos >= other.pos); } GenomePosition(ReferenceDictionary refDict, Strand strand, int chr, int pos); ... | GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isGeq(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos >= other.pos); } GenomePosition(ReferenceDictionary refDict, Strand strand, int chr, int pos); ... |
@Test public void testEq() { GenomePosition posL = new GenomePosition(refDict, Strand.FWD, 1, 100, PositionType.ONE_BASED); GenomePosition posR = new GenomePosition(refDict, Strand.FWD, 1, 101, PositionType.ONE_BASED); Assert.assertFalse(posL.isEq(posR)); Assert.assertTrue(posL.isEq(posL)); Assert.assertFalse(posR.isEq... | public boolean isEq(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos == other.pos); } | GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isEq(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos == other.pos); } } | GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isEq(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos == other.pos); } GenomePosition(ReferenceDictionary refDict, Strand strand, int chr, int pos); G... | GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isEq(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos == other.pos); } GenomePosition(ReferenceDictionary refDict, Strand strand, int chr, int pos); G... | GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isEq(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos == other.pos); } GenomePosition(ReferenceDictionary refDict, Strand strand, int chr, int pos); G... |
@Test public void testToHGVSStringSingleChange() { Assert.assertEquals("PROTEIN:p.[A100G;T301R]", singleAlleleVariant.toHGVSString(AminoAcidCode.ONE_LETTER)); Assert.assertEquals("PROTEIN:p.[Ala100Gly;Thr301Arg]", singleAlleleVariant.toHGVSString(AminoAcidCode.THREE_LETTER)); Assert.assertEquals("PROTEIN:p.[Ala100Gly;T... | @Override public String toHGVSString(AminoAcidCode code) { ArrayList<String> parts = new ArrayList<>(); parts.add(getSequenceNamePrefix()); parts.add(":p."); boolean first = true; for (ProteinChangeAllele allele : alleles) { if (first) first = false; else parts.add(";"); parts.add(allele.toHGVSString(code)); } return J... | MultiAlleleProteinVariant extends ProteinVariant { @Override public String toHGVSString(AminoAcidCode code) { ArrayList<String> parts = new ArrayList<>(); parts.add(getSequenceNamePrefix()); parts.add(":p."); boolean first = true; for (ProteinChangeAllele allele : alleles) { if (first) first = false; else parts.add(";"... | MultiAlleleProteinVariant extends ProteinVariant { @Override public String toHGVSString(AminoAcidCode code) { ArrayList<String> parts = new ArrayList<>(); parts.add(getSequenceNamePrefix()); parts.add(":p."); boolean first = true; for (ProteinChangeAllele allele : alleles) { if (first) first = false; else parts.add(";"... | MultiAlleleProteinVariant extends ProteinVariant { @Override public String toHGVSString(AminoAcidCode code) { ArrayList<String> parts = new ArrayList<>(); parts.add(getSequenceNamePrefix()); parts.add(":p."); boolean first = true; for (ProteinChangeAllele allele : alleles) { if (first) first = false; else parts.add(";"... | MultiAlleleProteinVariant extends ProteinVariant { @Override public String toHGVSString(AminoAcidCode code) { ArrayList<String> parts = new ArrayList<>(); parts.add(getSequenceNamePrefix()); parts.add(":p."); boolean first = true; for (ProteinChangeAllele allele : alleles) { if (first) first = false; else parts.add(";"... |
@Test public void testDifferenceToPositionForward() { GenomePosition posL = new GenomePosition(refDict, Strand.FWD, 1, 100, PositionType.ONE_BASED); GenomePosition posR = new GenomePosition(refDict, Strand.FWD, 1, 101, PositionType.ONE_BASED); Assert.assertEquals(posL.differenceTo(posR), -1); Assert.assertEquals(posL.d... | public int differenceTo(GenomePosition pos) { if (chr != pos.chr) throw new InvalidCoordinateException("Coordinates are on different chromosomes " + this + " vs. " + pos); if (pos.strand != strand) pos = pos.withStrand(strand); return (this.pos - pos.pos); } | GenomePosition implements Serializable, Comparable<GenomePosition> { public int differenceTo(GenomePosition pos) { if (chr != pos.chr) throw new InvalidCoordinateException("Coordinates are on different chromosomes " + this + " vs. " + pos); if (pos.strand != strand) pos = pos.withStrand(strand); return (this.pos - pos.... | GenomePosition implements Serializable, Comparable<GenomePosition> { public int differenceTo(GenomePosition pos) { if (chr != pos.chr) throw new InvalidCoordinateException("Coordinates are on different chromosomes " + this + " vs. " + pos); if (pos.strand != strand) pos = pos.withStrand(strand); return (this.pos - pos.... | GenomePosition implements Serializable, Comparable<GenomePosition> { public int differenceTo(GenomePosition pos) { if (chr != pos.chr) throw new InvalidCoordinateException("Coordinates are on different chromosomes " + this + " vs. " + pos); if (pos.strand != strand) pos = pos.withStrand(strand); return (this.pos - pos.... | GenomePosition implements Serializable, Comparable<GenomePosition> { public int differenceTo(GenomePosition pos) { if (chr != pos.chr) throw new InvalidCoordinateException("Coordinates are on different chromosomes " + this + " vs. " + pos); if (pos.strand != strand) pos = pos.withStrand(strand); return (this.pos - pos.... |
@Test public void testDifferenceToPositionReverse() { GenomePosition posL = new GenomePosition(refDict, Strand.REV, 1, 100, PositionType.ONE_BASED); GenomePosition posR = new GenomePosition(refDict, Strand.REV, 1, 101, PositionType.ONE_BASED); Assert.assertEquals(posL.differenceTo(posR), -1); Assert.assertEquals(posL.d... | public int differenceTo(GenomePosition pos) { if (chr != pos.chr) throw new InvalidCoordinateException("Coordinates are on different chromosomes " + this + " vs. " + pos); if (pos.strand != strand) pos = pos.withStrand(strand); return (this.pos - pos.pos); } | GenomePosition implements Serializable, Comparable<GenomePosition> { public int differenceTo(GenomePosition pos) { if (chr != pos.chr) throw new InvalidCoordinateException("Coordinates are on different chromosomes " + this + " vs. " + pos); if (pos.strand != strand) pos = pos.withStrand(strand); return (this.pos - pos.... | GenomePosition implements Serializable, Comparable<GenomePosition> { public int differenceTo(GenomePosition pos) { if (chr != pos.chr) throw new InvalidCoordinateException("Coordinates are on different chromosomes " + this + " vs. " + pos); if (pos.strand != strand) pos = pos.withStrand(strand); return (this.pos - pos.... | GenomePosition implements Serializable, Comparable<GenomePosition> { public int differenceTo(GenomePosition pos) { if (chr != pos.chr) throw new InvalidCoordinateException("Coordinates are on different chromosomes " + this + " vs. " + pos); if (pos.strand != strand) pos = pos.withStrand(strand); return (this.pos - pos.... | GenomePosition implements Serializable, Comparable<GenomePosition> { public int differenceTo(GenomePosition pos) { if (chr != pos.chr) throw new InvalidCoordinateException("Coordinates are on different chromosomes " + this + " vs. " + pos); if (pos.strand != strand) pos = pos.withStrand(strand); return (this.pos - pos.... |
@Test public void testTXSNVInExonForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6642119, PositionType.ZERO_BASED), "A", "C"); String resultTranscript = helperForward.getTranscriptWithChange(change); StringBuilder expectedBuilder = new StringBuilder(infoForward.getSequenc... | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testTXSNVInIntronForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6648257, PositionType.ZERO_BASED), "A", "C"); String resultTranscript = helperForward.getTranscriptWithChange(change); Assert.assertEquals(infoForward.getSequence(), resultTranscript); } | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testTXSNVOutsideTXForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6640062, PositionType.ZERO_BASED), "A", "C"); String resultTranscript = helperForward.getTranscriptWithChange(change); Assert.assertEquals(infoForward.getSequence(), resultTranscript); } | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testTXInsertionInExonForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6642119, PositionType.ZERO_BASED), "", "CTTG"); String resultTranscript = helperForward.getTranscriptWithChange(change); StringBuilder expectedBuilder = new StringBuilder(infoForward.ge... | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testTXInsertionInIntronForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6648257, PositionType.ZERO_BASED), "", "CTTG"); String resultTranscript = helperForward.getTranscriptWithChange(change); Assert.assertEquals(infoForward.getSequence(), resultTranscrip... | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testTXInsertionOutsideTXForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6640062, PositionType.ZERO_BASED), "", "CTTG"); String resultTranscript = helperForward.getTranscriptWithChange(change); Assert.assertEquals(infoForward.getSequence(), resultTranscri... | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testTXDeletionInExonForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6642120, PositionType.ZERO_BASED), "CTT", ""); String resultTranscript = helperForward.getTranscriptWithChange(change); StringBuilder expectedBuilder = new StringBuilder(infoForward.getS... | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testTXDeletionInIntronForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6647530, PositionType.ZERO_BASED), "CTTG", ""); String resultTranscript = helperForward.getTranscriptWithChange(change); Assert.assertEquals(infoForward.getSequence(), resultTranscript... | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testToHGVSStringMultiChange() { Assert.assertEquals("PROTEIN:p.[A100G;T301R];[R34V;L301K]", multiAlleleVariant.toHGVSString(AminoAcidCode.ONE_LETTER)); Assert.assertEquals("PROTEIN:p.[Ala100Gly;Thr301Arg];[Arg34Val;Leu301Lys]", multiAlleleVariant.toHGVSString(AminoAcidCode.THREE_LETTER)); Assert.asser... | @Override public String toHGVSString(AminoAcidCode code) { ArrayList<String> parts = new ArrayList<>(); parts.add(getSequenceNamePrefix()); parts.add(":p."); boolean first = true; for (ProteinChangeAllele allele : alleles) { if (first) first = false; else parts.add(";"); parts.add(allele.toHGVSString(code)); } return J... | MultiAlleleProteinVariant extends ProteinVariant { @Override public String toHGVSString(AminoAcidCode code) { ArrayList<String> parts = new ArrayList<>(); parts.add(getSequenceNamePrefix()); parts.add(":p."); boolean first = true; for (ProteinChangeAllele allele : alleles) { if (first) first = false; else parts.add(";"... | MultiAlleleProteinVariant extends ProteinVariant { @Override public String toHGVSString(AminoAcidCode code) { ArrayList<String> parts = new ArrayList<>(); parts.add(getSequenceNamePrefix()); parts.add(":p."); boolean first = true; for (ProteinChangeAllele allele : alleles) { if (first) first = false; else parts.add(";"... | MultiAlleleProteinVariant extends ProteinVariant { @Override public String toHGVSString(AminoAcidCode code) { ArrayList<String> parts = new ArrayList<>(); parts.add(getSequenceNamePrefix()); parts.add(":p."); boolean first = true; for (ProteinChangeAllele allele : alleles) { if (first) first = false; else parts.add(";"... | MultiAlleleProteinVariant extends ProteinVariant { @Override public String toHGVSString(AminoAcidCode code) { ArrayList<String> parts = new ArrayList<>(); parts.add(getSequenceNamePrefix()); parts.add(":p."); boolean first = true; for (ProteinChangeAllele allele : alleles) { if (first) first = false; else parts.add(";"... |
@Test public void testTXDeletionOutsideTXForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6640058, PositionType.ZERO_BASED), "", "CTTG"); String resultTranscript = helperForward.getTranscriptWithChange(change); Assert.assertEquals(infoForward.getSequence(), resultTranscrip... | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testTXDeletionSpanningIntoTXFromTheLeftForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6640060, PositionType.ZERO_BASED), "TTTT", ""); String resultTranscript = helperForward.getTranscriptWithChange(change); StringBuilder expectedBuilder = new StringBuil... | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testTXDeletionSpanningIntoTXFromTheRightForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6649338, PositionType.ZERO_BASED), "TTTT", ""); String resultTranscript = helperForward.getTranscriptWithChange(change); StringBuilder expectedBuilder = new StringBui... | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testCDSSNVInExonForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6642119, PositionType.ZERO_BASED), "A", "C"); String resultTranscript = helperForward.getCDSWithGenomeVariant(change); StringBuilder expectedBuilder = new StringBuilder(projectorForward.getT... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testCDSSNVInIntronForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6648257, PositionType.ZERO_BASED), "A", "C"); String resultTranscript = helperForward.getCDSWithGenomeVariant(change); Assert.assertEquals(projectorForward.getTranscriptStartingAtCDS(), re... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testCDSSNVOutsideCDSForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6640062, PositionType.ZERO_BASED), "A", "C"); String resultTranscript = helperForward.getCDSWithGenomeVariant(change); Assert.assertEquals(projectorForward.getTranscriptStartingAtCDS(), ... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testCDSInsertionInExonForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6642119, PositionType.ZERO_BASED), "", "CTTG"); String resultTranscript = helperForward.getCDSWithGenomeVariant(change); StringBuilder expectedBuilder = new StringBuilder(projectorForw... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testCDSInsertionInIntronForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6648257, PositionType.ZERO_BASED), "", "CTTG"); String resultTranscript = helperForward.getCDSWithGenomeVariant(change); Assert.assertEquals(projectorForward.getTranscriptStartingAtC... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testCDSInsertionOutsideCDSForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6640062, PositionType.ZERO_BASED), "", "CTTG"); String resultTranscript = helperForward.getCDSWithGenomeVariant(change); Assert.assertEquals(projectorForward.getTranscriptStartingA... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testCDSDeletionInExonForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6642120, PositionType.ZERO_BASED), "CTT", ""); String resultTranscript = helperForward.getCDSWithGenomeVariant(change); StringBuilder expectedBuilder = new StringBuilder(projectorForwar... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testEquals() { Assert.assertEquals(firstLoc, firstLoc2); Assert.assertNotEquals(lastLoc, firstLoc); } | @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; NucleotideRange other = (NucleotideRange) obj; if (firstPos == null) { if (other.firstPos != null) return false; } else if (!firstPos.equals(other.firstPos)) return ... | NucleotideRange implements ConvertibleToHGVSString { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; NucleotideRange other = (NucleotideRange) obj; if (firstPos == null) { if (other.firstPos != null) return false;... | NucleotideRange implements ConvertibleToHGVSString { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; NucleotideRange other = (NucleotideRange) obj; if (firstPos == null) { if (other.firstPos != null) return false;... | NucleotideRange implements ConvertibleToHGVSString { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; NucleotideRange other = (NucleotideRange) obj; if (firstPos == null) { if (other.firstPos != null) return false;... | NucleotideRange implements ConvertibleToHGVSString { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; NucleotideRange other = (NucleotideRange) obj; if (firstPos == null) { if (other.firstPos != null) return false;... |
@Test public void testCDSDeletionInIntronForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6640665, PositionType.ZERO_BASED), "CTTG", ""); String resultTranscript = helperForward.getCDSWithGenomeVariant(change); Assert.assertEquals(projectorForward.getTranscriptStartingAtCD... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testCDSDeletionOutsideCDSForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6649272, PositionType.ZERO_BASED), "", "CTTG"); String resultTranscript = helperForward.getCDSWithGenomeVariant(change); Assert.assertEquals(projectorForward.getTranscriptStartingAt... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testCDSDeletionSpanningIntoCDSFromTheLeftForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6640667, PositionType.ZERO_BASED), "TTTT", ""); String resultTranscript = helperForward.getCDSWithGenomeVariant(change); StringBuilder expectedBuilder = new StringBu... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testCDSDeletionSpanningIntoCDSFromTheRightForward() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 6649271, PositionType.ZERO_BASED), "TAGC", ""); String resultTranscript = helperForward.getCDSWithGenomeVariant(change); StringBuilder expectedBuilder = new StringB... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testTXSNVInExonReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23696356, PositionType.ZERO_BASED), "T", "A"); String resultTranscript = helperReverse.getTranscriptWithChange(change); StringBuilder expectedBuilder = new StringBuilder(infoReverse.getSequen... | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testTXSNVInIntronReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23689715, PositionType.ZERO_BASED), "A", "C"); String resultTranscript = helperReverse.getTranscriptWithChange(change); Assert.assertEquals(infoReverse.getSequence(), resultTranscript); } | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testTXSNVOutsideTXReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23685939, PositionType.ZERO_BASED), "A", "C"); String resultTranscript = helperReverse.getTranscriptWithChange(change); Assert.assertEquals(infoReverse.getSequence(), resultTranscript); } | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testTXInsertionInExonReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23696356, PositionType.ZERO_BASED), "", "CTTG"); String resultTranscript = helperReverse.getTranscriptWithChange(change); StringBuilder expectedBuilder = new StringBuilder(infoReverse.g... | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testTXInsertionInIntronReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23689715, PositionType.ZERO_BASED), "", "CTTG"); String resultTranscript = helperReverse.getTranscriptWithChange(change); Assert.assertEquals(infoReverse.getSequence(), resultTranscri... | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testTXInsertionOutsideTXReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23685939, PositionType.ZERO_BASED), "", "CTTG"); String resultTranscript = helperReverse.getTranscriptWithChange(change); Assert.assertEquals(infoReverse.getSequence(), resultTranscr... | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testToHGVSStringRange() { NucleotideRange range = new NucleotideRange(firstLoc, lastLoc); Assert.assertEquals("124_235-1", range.toHGVSString(AminoAcidCode.ONE_LETTER)); Assert.assertEquals("124_235-1", range.toHGVSString(AminoAcidCode.THREE_LETTER)); } | @Override public String toHGVSString() { if (firstPos.equals(lastPos)) return firstPos.toHGVSString(); else return Joiner.on("").join(firstPos.toHGVSString(), "_", lastPos.toHGVSString()); } | NucleotideRange implements ConvertibleToHGVSString { @Override public String toHGVSString() { if (firstPos.equals(lastPos)) return firstPos.toHGVSString(); else return Joiner.on("").join(firstPos.toHGVSString(), "_", lastPos.toHGVSString()); } } | NucleotideRange implements ConvertibleToHGVSString { @Override public String toHGVSString() { if (firstPos.equals(lastPos)) return firstPos.toHGVSString(); else return Joiner.on("").join(firstPos.toHGVSString(), "_", lastPos.toHGVSString()); } NucleotideRange(NucleotidePointLocation firstPos, NucleotidePointLocation la... | NucleotideRange implements ConvertibleToHGVSString { @Override public String toHGVSString() { if (firstPos.equals(lastPos)) return firstPos.toHGVSString(); else return Joiner.on("").join(firstPos.toHGVSString(), "_", lastPos.toHGVSString()); } NucleotideRange(NucleotidePointLocation firstPos, NucleotidePointLocation la... | NucleotideRange implements ConvertibleToHGVSString { @Override public String toHGVSString() { if (firstPos.equals(lastPos)) return firstPos.toHGVSString(); else return Joiner.on("").join(firstPos.toHGVSString(), "_", lastPos.toHGVSString()); } NucleotideRange(NucleotidePointLocation firstPos, NucleotidePointLocation la... |
@Test public void testTXDeletionInExonReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23696354, PositionType.ZERO_BASED), "TAT", ""); String resultTranscript = helperReverse.getTranscriptWithChange(change); StringBuilder expectedBuilder = new StringBuilder(infoReverse.get... | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testTXDeletionInIntronReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23693663, PositionType.ZERO_BASED), "CTT", ""); String resultTranscript = helperReverse.getTranscriptWithChange(change); Assert.assertEquals(infoReverse.getSequence(), resultTranscript... | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testTXDeletionOutsideTXReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23696357, PositionType.ZERO_BASED), "", "CTTG"); String resultTranscript = helperReverse.getTranscriptWithChange(change); Assert.assertEquals(infoReverse.getSequence(), resultTranscri... | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testTXDeletionSpanningIntoTXFromTheLeftReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23685938, PositionType.ZERO_BASED), "TTTT", ""); String resultTranscript = helperReverse.getTranscriptWithChange(change); StringBuilder expectedBuilder = new StringBui... | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testTXDeletionSpanningIntoTXFromTheRightReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23696355, PositionType.ZERO_BASED), "TTTT", ""); String resultTranscript = helperReverse.getTranscriptWithChange(change); StringBuilder expectedBuilder = new StringBu... | public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRangeInRefAffected(change); default:... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... | TranscriptSequenceChangeHelper { public String getTranscriptWithChange(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getTranscriptWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getTranscriptWithRan... |
@Test public void testCDSSNVInExonReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23694467, PositionType.ZERO_BASED), "C", "A"); String resultTranscript = helperReverse.getCDSWithGenomeVariant(change); StringBuilder expectedBuilder = new StringBuilder(projectorReverse.get... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testCDSSNVInIntronReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23694465, PositionType.ZERO_BASED), "A", "C"); String resultTranscript = helperReverse.getCDSWithGenomeVariant(change); Assert.assertEquals(projectorReverse.getTranscriptStartingAtCDS(), r... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testCDSSNVOutsideCDSReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23694498, PositionType.ZERO_BASED), "A", "C"); String resultTranscript = helperReverse.getCDSWithGenomeVariant(change); Assert.assertEquals(projectorReverse.getTranscriptStartingAtCDS(),... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testCDSInsertionInExonReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23694497, PositionType.ZERO_BASED), "", "CTTG"); String resultTranscript = helperReverse.getCDSWithGenomeVariant(change); StringBuilder expectedBuilder = new StringBuilder(projectorRev... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testCDSInsertionInIntronReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23693662, PositionType.ZERO_BASED), "", "CTTG"); String resultTranscript = helperReverse.getCDSWithGenomeVariant(change); Assert.assertEquals(projectorReverse.getTranscriptStartingAt... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testToHGVSStringSinglePos() { NucleotideRange range = new NucleotideRange(firstLoc, firstLoc2); Assert.assertEquals("124", range.toHGVSString(AminoAcidCode.ONE_LETTER)); Assert.assertEquals("124", range.toHGVSString(AminoAcidCode.THREE_LETTER)); } | @Override public String toHGVSString() { if (firstPos.equals(lastPos)) return firstPos.toHGVSString(); else return Joiner.on("").join(firstPos.toHGVSString(), "_", lastPos.toHGVSString()); } | NucleotideRange implements ConvertibleToHGVSString { @Override public String toHGVSString() { if (firstPos.equals(lastPos)) return firstPos.toHGVSString(); else return Joiner.on("").join(firstPos.toHGVSString(), "_", lastPos.toHGVSString()); } } | NucleotideRange implements ConvertibleToHGVSString { @Override public String toHGVSString() { if (firstPos.equals(lastPos)) return firstPos.toHGVSString(); else return Joiner.on("").join(firstPos.toHGVSString(), "_", lastPos.toHGVSString()); } NucleotideRange(NucleotidePointLocation firstPos, NucleotidePointLocation la... | NucleotideRange implements ConvertibleToHGVSString { @Override public String toHGVSString() { if (firstPos.equals(lastPos)) return firstPos.toHGVSString(); else return Joiner.on("").join(firstPos.toHGVSString(), "_", lastPos.toHGVSString()); } NucleotideRange(NucleotidePointLocation firstPos, NucleotidePointLocation la... | NucleotideRange implements ConvertibleToHGVSString { @Override public String toHGVSString() { if (firstPos.equals(lastPos)) return firstPos.toHGVSString(); else return Joiner.on("").join(firstPos.toHGVSString(), "_", lastPos.toHGVSString()); } NucleotideRange(NucleotidePointLocation firstPos, NucleotidePointLocation la... |
@Test public void testCDSInsertionOutsideCDSReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23694498, PositionType.ZERO_BASED), "", "CTTG"); String resultTranscript = helperReverse.getCDSWithGenomeVariant(change); Assert.assertEquals(projectorReverse.getTranscriptStarting... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testCDSDeletionInExonReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23694495, PositionType.ZERO_BASED), "CT", ""); String resultTranscript = helperReverse.getCDSWithGenomeVariant(change); StringBuilder expectedBuilder = new StringBuilder(projectorRevers... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testCDSDeletionInIntronReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23693663, PositionType.ZERO_BASED), "CTTG", ""); String resultTranscript = helperReverse.getCDSWithGenomeVariant(change); Assert.assertEquals(projectorReverse.getTranscriptStartingAtC... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testCDSDeletionOutsideCDSReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23694498, PositionType.ZERO_BASED), "", "CTTG"); String resultTranscript = helperReverse.getCDSWithGenomeVariant(change); Assert.assertEquals(projectorReverse.getTranscriptStartingA... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testCDSDeletionSpanningIntoCDSFromTheLeftReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23688461, PositionType.ZERO_BASED), "TTAG", ""); String resultTranscript = helperReverse.getCDSWithGenomeVariant(change); StringBuilder expectedBuilder = new StringB... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testCDSDeletionSpanningIntoCDSFromTheRightReverse() { GenomeVariant change = new GenomeVariant(new GenomePosition(refDict, Strand.FWD, 1, 23694491, PositionType.ZERO_BASED), "CTGCCATCTCGA", ""); String resultTranscript = helperReverse.getCDSWithGenomeVariant(change); StringBuilder expectedBuilder = ne... | public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffected(change); default: throw new Err... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... | TranscriptSequenceChangeHelper { public String getCDSWithGenomeVariant(GenomeVariant change) { change = change.withStrand(transcript.getStrand()); switch (change.getType()) { case SNV: case INSERTION: return getCDSWithPointInRefAffected(change); case DELETION: case BLOCK_SUBSTITUTION: return getCDSWithRangeInRefAffecte... |
@Test public void testGetGenomeIntervalForward() { GenomeVariant change = new GenomeVariant(this.genomePosOneBasedForward, "A", "C"); GenomeInterval genomeInterval = change.getGenomeInterval(); GenomeInterval expectedInterval = new GenomeInterval(refDict, Strand.FWD, 1, 123, 123, PositionType.ONE_BASED); Assert.assertE... | public GenomeInterval getGenomeInterval() { return new GenomeInterval(pos, ref.length()); } | GenomeVariant implements VariantDescription { public GenomeInterval getGenomeInterval() { return new GenomeInterval(pos, ref.length()); } } | GenomeVariant implements VariantDescription { public GenomeInterval getGenomeInterval() { return new GenomeInterval(pos, ref.length()); } GenomeVariant(GenomePosition pos, String ref, String alt); GenomeVariant(GenomePosition pos, String ref, String alt, Strand strand); } | GenomeVariant implements VariantDescription { public GenomeInterval getGenomeInterval() { return new GenomeInterval(pos, ref.length()); } GenomeVariant(GenomePosition pos, String ref, String alt); GenomeVariant(GenomePosition pos, String ref, String alt, Strand strand); static boolean wouldBeSymbolicAllele(String alle... | GenomeVariant implements VariantDescription { public GenomeInterval getGenomeInterval() { return new GenomeInterval(pos, ref.length()); } GenomeVariant(GenomePosition pos, String ref, String alt); GenomeVariant(GenomePosition pos, String ref, String alt, Strand strand); static boolean wouldBeSymbolicAllele(String alle... |
@Test public void testTranslateDna_tooShort() throws AnnotationException { Assert.assertEquals("", translator.translateDNA("A")); Assert.assertEquals("", translator.translateDNA("AC")); } | public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } | Translator { public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } } | Translator { public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } private Translator(); } | Translator { public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } private Translator(); static Translator getTranslator(); String translateDNA(String dnaseq); String translateDNA3(String dnaseq); String toLong(String shortAASeq); String toLong(char c); } | Translator { public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } private Translator(); static Translator getTranslator(); String translateDNA(String dnaseq); String translateDNA3(String dnaseq); String toLong(String shortAASeq); String toLong(char c); } |
@Test public void testTranslateDna_short() throws AnnotationException { Assert.assertEquals("T", translator.translateDNA("ACT")); } | public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } | Translator { public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } } | Translator { public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } private Translator(); } | Translator { public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } private Translator(); static Translator getTranslator(); String translateDNA(String dnaseq); String translateDNA3(String dnaseq); String toLong(String shortAASeq); String toLong(char c); } | Translator { public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } private Translator(); static Translator getTranslator(); String translateDNA(String dnaseq); String translateDNA3(String dnaseq); String toLong(String shortAASeq); String toLong(char c); } |
@Test public void testTranslateDna_longer() throws AnnotationException { Assert.assertEquals("M*S", translator.translateDNA("ATGTAGAGT")); } | public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } | Translator { public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } } | Translator { public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } private Translator(); } | Translator { public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } private Translator(); static Translator getTranslator(); String translateDNA(String dnaseq); String translateDNA3(String dnaseq); String toLong(String shortAASeq); String toLong(char c); } | Translator { public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } private Translator(); static Translator getTranslator(); String translateDNA(String dnaseq); String translateDNA3(String dnaseq); String toLong(String shortAASeq); String toLong(char c); } |
@Test public void testEquals() { NucleotidePointLocation location1 = new NucleotidePointLocation(123, -3, false); NucleotidePointLocation location2 = new NucleotidePointLocation(123, -3, false); NucleotidePointLocation location3 = new NucleotidePointLocation(123, 3, false); Assert.assertTrue(location1.equals(location2)... | @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; NucleotidePointLocation other = (NucleotidePointLocation) obj; if (basePos != other.basePos) return false; if (downstreamOfCDS != other.downstreamOfCDS) return false... | NucleotidePointLocation implements ConvertibleToHGVSString { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; NucleotidePointLocation other = (NucleotidePointLocation) obj; if (basePos != other.basePos) return fals... | NucleotidePointLocation implements ConvertibleToHGVSString { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; NucleotidePointLocation other = (NucleotidePointLocation) obj; if (basePos != other.basePos) return fals... | NucleotidePointLocation implements ConvertibleToHGVSString { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; NucleotidePointLocation other = (NucleotidePointLocation) obj; if (basePos != other.basePos) return fals... | NucleotidePointLocation implements ConvertibleToHGVSString { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; NucleotidePointLocation other = (NucleotidePointLocation) obj; if (basePos != other.basePos) return fals... |
@Test public void testTranslateDna_tooLonger() throws AnnotationException { Assert.assertEquals("T", translator.translateDNA("ACTG")); } | public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } | Translator { public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } } | Translator { public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } private Translator(); } | Translator { public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } private Translator(); static Translator getTranslator(); String translateDNA(String dnaseq); String translateDNA3(String dnaseq); String toLong(String shortAASeq); String toLong(char c); } | Translator { public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } private Translator(); static Translator getTranslator(); String translateDNA(String dnaseq); String translateDNA3(String dnaseq); String toLong(String shortAASeq); String toLong(char c); } |
@Test public void testAllLeftOf() { Assert.assertFalse(interval.allLeftOf(10)); Assert.assertFalse(interval.allLeftOf(12)); Assert.assertTrue(interval.allLeftOf(13)); Assert.assertTrue(interval.allLeftOf(14)); } | public boolean allLeftOf(int point) { return (maxEnd <= point); } | Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean allLeftOf(int point) { return (maxEnd <= point); } } | Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean allLeftOf(int point) { return (maxEnd <= point); } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); } | Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean allLeftOf(int point) { return (maxEnd <= point); } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); int getBegin(); int getEnd(); T getValue(); int getMaxEnd(); boolean allLeftOf(int point); boolean... | Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean allLeftOf(int point) { return (maxEnd <= point); } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); int getBegin(); int getEnd(); T getValue(); int getMaxEnd(); boolean allLeftOf(int point); boolean... |
@Test public void testCompareTo() { Assert.assertTrue(interval.compareTo(new Interval<String>(0, 10, "y", 10)) > 0); Assert.assertTrue(interval.compareTo(new Interval<String>(1, 9, "y", 10)) > 0); Assert.assertTrue(interval.compareTo(new Interval<String>(1, 10, "y", 10)) == 0); Assert.assertTrue(interval.compareTo(new ... | public int compareTo(Interval<T> o) { final int result = (begin - o.begin); if (result == 0) return (end - o.end); return result; } | Interval implements java.io.Serializable, Comparable<Interval<T>> { public int compareTo(Interval<T> o) { final int result = (begin - o.begin); if (result == 0) return (end - o.end); return result; } } | Interval implements java.io.Serializable, Comparable<Interval<T>> { public int compareTo(Interval<T> o) { final int result = (begin - o.begin); if (result == 0) return (end - o.end); return result; } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); } | Interval implements java.io.Serializable, Comparable<Interval<T>> { public int compareTo(Interval<T> o) { final int result = (begin - o.begin); if (result == 0) return (end - o.end); return result; } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); int getBegin(); int getEnd(); T ... | Interval implements java.io.Serializable, Comparable<Interval<T>> { public int compareTo(Interval<T> o) { final int result = (begin - o.begin); if (result == 0) return (end - o.end); return result; } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); int getBegin(); int getEnd(); T ... |
@Test public void testContains() { Assert.assertFalse(interval.contains(0)); Assert.assertTrue(interval.contains(1)); Assert.assertTrue(interval.contains(2)); Assert.assertTrue(interval.contains(9)); Assert.assertFalse(interval.contains(10)); } | public boolean contains(int point) { return ((begin <= point) && (point < end)); } | Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean contains(int point) { return ((begin <= point) && (point < end)); } } | Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean contains(int point) { return ((begin <= point) && (point < end)); } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); } | Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean contains(int point) { return ((begin <= point) && (point < end)); } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); int getBegin(); int getEnd(); T getValue(); int getMaxEnd(); boolean allLeftOf(in... | Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean contains(int point) { return ((begin <= point) && (point < end)); } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); int getBegin(); int getEnd(); T getValue(); int getMaxEnd(); boolean allLeftOf(in... |
@Test public void testIsLeftOf() { Assert.assertFalse(interval.isLeftOf(8)); Assert.assertFalse(interval.isLeftOf(9)); Assert.assertTrue(interval.isLeftOf(10)); Assert.assertTrue(interval.isLeftOf(11)); } | public boolean isLeftOf(int point) { return (end <= point); } | Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean isLeftOf(int point) { return (end <= point); } } | Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean isLeftOf(int point) { return (end <= point); } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); } | Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean isLeftOf(int point) { return (end <= point); } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); int getBegin(); int getEnd(); T getValue(); int getMaxEnd(); boolean allLeftOf(int point); boolean isL... | Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean isLeftOf(int point) { return (end <= point); } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); int getBegin(); int getEnd(); T getValue(); int getMaxEnd(); boolean allLeftOf(int point); boolean isL... |
@Test public void testIsRightOf() { Assert.assertTrue(interval.isRightOf(-1)); Assert.assertTrue(interval.isRightOf(0)); Assert.assertFalse(interval.isRightOf(1)); Assert.assertFalse(interval.isRightOf(2)); } | public boolean isRightOf(int point) { return (point < begin); } | Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean isRightOf(int point) { return (point < begin); } } | Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean isRightOf(int point) { return (point < begin); } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); } | Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean isRightOf(int point) { return (point < begin); } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); int getBegin(); int getEnd(); T getValue(); int getMaxEnd(); boolean allLeftOf(int point); boolean i... | Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean isRightOf(int point) { return (point < begin); } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); int getBegin(); int getEnd(); T getValue(); int getMaxEnd(); boolean allLeftOf(int point); boolean i... |
@Test public void overlapsWith() { Assert.assertTrue(interval.overlapsWith(0, 2)); Assert.assertTrue(interval.overlapsWith(0, 3)); Assert.assertTrue(interval.overlapsWith(0, 20)); Assert.assertTrue(interval.overlapsWith(9, 10)); Assert.assertFalse(interval.overlapsWith(0, 1)); Assert.assertFalse(interval.overlapsWith(1... | public boolean overlapsWith(int begin, int end) { return ((begin < this.end) && (this.begin < end)); } | Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean overlapsWith(int begin, int end) { return ((begin < this.end) && (this.begin < end)); } } | Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean overlapsWith(int begin, int end) { return ((begin < this.end) && (this.begin < end)); } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); } | Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean overlapsWith(int begin, int end) { return ((begin < this.end) && (this.begin < end)); } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); int getBegin(); int getEnd(); T getValue(); int getMaxEnd(); ... | Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean overlapsWith(int begin, int end) { return ((begin < this.end) && (this.begin < end)); } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); int getBegin(); int getEnd(); T getValue(); int getMaxEnd(); ... |
@Test public void test() throws IOException { FASTAParser parser = new FASTAParser(stream); FASTARecord first = parser.next(); Assert.assertEquals("1", first.getID()); Assert.assertEquals("comment 1", first.getComment()); Assert.assertEquals("ACGTAACTACGT", first.getSequence()); FASTARecord second = parser.next(); Asse... | public FASTARecord next() throws IOException { if (lastLine == null) return null; assert lastLine.startsWith(">"); while (true) { if (lastLine != null && !lastLine.isEmpty()) recordBuffer.add(lastLine); lastLine = reader.readLine(); if (lastLine == null || lastLine.startsWith(">")) break; } return buildRecord(); } | FASTAParser { public FASTARecord next() throws IOException { if (lastLine == null) return null; assert lastLine.startsWith(">"); while (true) { if (lastLine != null && !lastLine.isEmpty()) recordBuffer.add(lastLine); lastLine = reader.readLine(); if (lastLine == null || lastLine.startsWith(">")) break; } return buildRe... | FASTAParser { public FASTARecord next() throws IOException { if (lastLine == null) return null; assert lastLine.startsWith(">"); while (true) { if (lastLine != null && !lastLine.isEmpty()) recordBuffer.add(lastLine); lastLine = reader.readLine(); if (lastLine == null || lastLine.startsWith(">")) break; } return buildRe... | FASTAParser { public FASTARecord next() throws IOException { if (lastLine == null) return null; assert lastLine.startsWith(">"); while (true) { if (lastLine != null && !lastLine.isEmpty()) recordBuffer.add(lastLine); lastLine = reader.readLine(); if (lastLine == null || lastLine.startsWith(">")) break; } return buildRe... | FASTAParser { public FASTARecord next() throws IOException { if (lastLine == null) return null; assert lastLine.startsWith(">"); while (true) { if (lastLine != null && !lastLine.isEmpty()) recordBuffer.add(lastLine); lastLine = reader.readLine(); if (lastLine == null || lastLine.startsWith(">")) break; } return buildRe... |
@Test public void testAll() throws TranscriptParseException { RefSeqParser parser = new RefSeqParser(refDict, dataDirectory.getAbsolutePath(), new ArrayList<String>(), allIniSection); ImmutableList<TranscriptModel> result = parser.run(); Assert.assertEquals(12, result.size()); SortedSet<String> values = new TreeSet<Str... | @Override public ImmutableList<TranscriptModel> run() throws TranscriptParseException { final String pathGFF = PathUtil.join(basePath, getINIFileName("gff")); Map<String, TranscriptModelBuilder> builders = loadTranscriptModels(pathGFF); LOGGER.info("Assigning additional HGNC information to {} transcripts..", builders.s... | RefSeqParser implements TranscriptParser { @Override public ImmutableList<TranscriptModel> run() throws TranscriptParseException { final String pathGFF = PathUtil.join(basePath, getINIFileName("gff")); Map<String, TranscriptModelBuilder> builders = loadTranscriptModels(pathGFF); LOGGER.info("Assigning additional HGNC i... | RefSeqParser implements TranscriptParser { @Override public ImmutableList<TranscriptModel> run() throws TranscriptParseException { final String pathGFF = PathUtil.join(basePath, getINIFileName("gff")); Map<String, TranscriptModelBuilder> builders = loadTranscriptModels(pathGFF); LOGGER.info("Assigning additional HGNC i... | RefSeqParser implements TranscriptParser { @Override public ImmutableList<TranscriptModel> run() throws TranscriptParseException { final String pathGFF = PathUtil.join(basePath, getINIFileName("gff")); Map<String, TranscriptModelBuilder> builders = loadTranscriptModels(pathGFF); LOGGER.info("Assigning additional HGNC i... | RefSeqParser implements TranscriptParser { @Override public ImmutableList<TranscriptModel> run() throws TranscriptParseException { final String pathGFF = PathUtil.join(basePath, getINIFileName("gff")); Map<String, TranscriptModelBuilder> builders = loadTranscriptModels(pathGFF); LOGGER.info("Assigning additional HGNC i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.