Search in sources :

Example 31 with Range

use of com.milaboratory.core.Range in project repseqio by repseqio.

the class SequencePartitioningTest method test1.

@Test
public void test1() throws Exception {
    ReferencePoints refPoints = new ReferencePoints(BasicReferencePoint.JBegin.index, new int[] { 1, 100, 200 });
    Range r = refPoints.getRelativeRange(GeneFeature.JRegionWithP, GeneFeature.JRegion);
    Assert.assertEquals(new Range(20, 219), r);
    r = refPoints.getRelativeRange(GeneFeature.JRegionWithP, GeneFeature.FR4);
    Assert.assertEquals(new Range(119, 219), r);
    r = refPoints.getRelativeRange(GeneFeature.JRegionWithP, GeneFeature.GermlineJPSegment);
    Assert.assertEquals(new Range(0, 20), r);
}
Also used : Range(com.milaboratory.core.Range) Test(org.junit.Test)

Example 32 with Range

use of com.milaboratory.core.Range in project repseqio by repseqio.

the class SequencePartitioningTest method test4.

@Test
public void test4() throws Exception {
    ReferencePoints refPoints = new ReferencePoints(BasicReferencePoint.V5UTRBegin.index, new int[] { 0, 100, 250, 450, 700, 1000, 1400, 1450, 1525, 1700, 1930 });
    Range r = refPoints.getRelativeRange(GeneFeature.VGene, GeneFeature.VGeneWithP);
    assertNull(r);
    r = refPoints.getRelativeRange(GeneFeature.VGeneWithP, GeneFeature.VGene);
    assertEquals(new Range(0, 1930), r);
    r = refPoints.getRelativeRange(GeneFeature.VGeneWithP, GeneFeature.GermlineVPSegment);
    assertEquals(new Range(1930, 1950), r);
}
Also used : Range(com.milaboratory.core.Range) Test(org.junit.Test)

Example 33 with Range

use of com.milaboratory.core.Range in project repseqio by repseqio.

the class SequencePartitioningTest method test2.

@Test
public void test2() throws Exception {
    ReferencePoints refPoints = new ReferencePoints(BasicReferencePoint.JBegin.index, new int[] { 200, 100, 1 });
    Range r = refPoints.getRelativeRange(GeneFeature.JRegion, GeneFeature.FR4);
    Assert.assertEquals(new Range(100, 199), r);
}
Also used : Range(com.milaboratory.core.Range) Test(org.junit.Test)

Example 34 with Range

use of com.milaboratory.core.Range in project repseqio by repseqio.

the class SequencePartitioningTest method test3.

@Test
public void test3() throws Exception {
    ReferencePoints refPoints = new ReferencePoints(BasicReferencePoint.JBegin.index, new int[] { 199, 100, 0 });
    Range r = refPoints.getRelativeRange(GeneFeature.JRegionWithP, GeneFeature.JRegion);
    Assert.assertEquals(new Range(20, 219), r);
    r = refPoints.getRelativeRange(GeneFeature.JRegionWithP, GeneFeature.FR4);
    Assert.assertEquals(new Range(119, 219), r);
    r = refPoints.getRelativeRange(GeneFeature.JRegionWithP, GeneFeature.GermlineJPSegment);
    Assert.assertEquals(new Range(0, 20), r);
}
Also used : Range(com.milaboratory.core.Range) Test(org.junit.Test)

Example 35 with Range

use of com.milaboratory.core.Range in project repseqio by repseqio.

the class KnownSequenceFragmentDataTest method test1.

@Test
public void test1() throws Exception {
    KnownSequenceFragmentData data = new KnownSequenceFragmentData(URI.create("file://some_fasta.fasta#24.6jsd21.Tut"), new Range(10, 30), new NucleotideSequence("ATCCTGGCTTAGAACTAACG"));
    TestUtil.assertJson(data);
}
Also used : NucleotideSequence(com.milaboratory.core.sequence.NucleotideSequence) Range(com.milaboratory.core.Range) Test(org.junit.Test)

Aggregations

Range (com.milaboratory.core.Range)45 Test (org.junit.Test)23 NucleotideSequence (com.milaboratory.core.sequence.NucleotideSequence)19 VDJCHit (com.milaboratory.mixcr.basictypes.VDJCHit)4 ArrayList (java.util.ArrayList)4 SingleFastqReaderTest (com.milaboratory.core.io.sequence.fastq.SingleFastqReaderTest)3 MutationsBuilder (com.milaboratory.core.mutations.MutationsBuilder)3 ReferencePoint (io.repseq.core.ReferencePoint)3 Path (java.nio.file.Path)3 NSequenceWithQuality (com.milaboratory.core.sequence.NSequenceWithQuality)2 Clone (com.milaboratory.mixcr.basictypes.Clone)2 VDJCPartitionedSequence (com.milaboratory.mixcr.basictypes.VDJCPartitionedSequence)2 VDJCAlignerParameters (com.milaboratory.mixcr.vdjaligners.VDJCAlignerParameters)2 CUtils (cc.redberry.pipe.CUtils)1 OutputPort (cc.redberry.pipe.OutputPort)1 com.milaboratory.core.alignment (com.milaboratory.core.alignment)1 Alignment (com.milaboratory.core.alignment.Alignment)1 LinearGapAlignmentScoring (com.milaboratory.core.alignment.LinearGapAlignmentScoring)1 MultiAlignmentHelper (com.milaboratory.core.alignment.MultiAlignmentHelper)1 com.milaboratory.core.sequence (com.milaboratory.core.sequence)1