当前位置: 首页>>代码示例>>Java>>正文


Java Strand.POSITIVE属性代码示例

本文整理汇总了Java中htsjdk.tribble.annotation.Strand.POSITIVE属性的典型用法代码示例。如果您正苦于以下问题:Java Strand.POSITIVE属性的具体用法?Java Strand.POSITIVE怎么用?Java Strand.POSITIVE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在htsjdk.tribble.annotation.Strand的用法示例。


在下文中一共展示了Strand.POSITIVE属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getNextReferenceCodon

/**
 * Gets the next complete in-frame codon from the given {@link ReferenceSequence} according to the current codon position and strand.
 * @param referenceSequence The {@link ReferenceSequence} for the current codon.  Must not be {@code null}.
 * @param currentAlignedCodingSequenceAlleleStart The starting position (1-based, inclusive) of the current codon.  Must be > 0.
 * @param currentAlignedCodingSequenceAlleleStop The ending position (1-based, inclusive) of the current codon.  Must be > 0.
 * @param strand The {@link Strand} on which the current codon resides.  Must not be {@code null}.  Must not be {@link Strand#NONE}.
 * @return The next codon in frame with the current codon as specified by the given current codon positions.
 */
private static String getNextReferenceCodon(final ReferenceSequence referenceSequence,
                                            final int currentAlignedCodingSequenceAlleleStart,
                                            final int currentAlignedCodingSequenceAlleleStop,
                                            final Strand strand) {

    Utils.nonNull( referenceSequence );
    ParamUtils.isPositive(currentAlignedCodingSequenceAlleleStart, "Genomic positions must be > 0.");
    ParamUtils.isPositive(currentAlignedCodingSequenceAlleleStop, "Genomic positions must be > 0.");
    assertValidStrand(strand);

    final String nextRefCodon;
    if ( strand == Strand.POSITIVE ) {
        nextRefCodon = referenceSequence.getBaseString().substring(currentAlignedCodingSequenceAlleleStop, currentAlignedCodingSequenceAlleleStop + 3 );
    }
    else {
        nextRefCodon = ReadUtils.getBasesReverseComplement(
                referenceSequence.getBaseString().substring(currentAlignedCodingSequenceAlleleStart - 3, currentAlignedCodingSequenceAlleleStart ).getBytes()
        );
    }
    return nextRefCodon;
}
 
开发者ID:broadinstitute,项目名称:gatk,代码行数:29,代码来源:FuncotatorUtils.java

示例2: getTranscriptAlleleStartPosition

/**
 * Gets the start position relative to the start of the coding sequence for a variant based on the given {@code variantGenomicStartPosition}.
 * It is assumed:
 *      {@code codingRegionGenomicStartPosition} <= {@code variantGenomicStartPosition} <= {@code codingRegionGenomicEndPosition}
 * The transcript start position is the genomic position the transcript starts assuming `+` traversal.  That is, it is the lesser of start position and end position.
 * This is important because we determine the relative positions based on which direction the transcript is read.
 * @param variantGenomicStartPosition Start position (1-based, inclusive) of a variant in the genome.  Must be > 0.
 * @param codingRegionGenomicStartPosition Start position (1-based, inclusive) of a transcript in the genome.  Must be > 0.
 * @param codingRegionGenomicEndPosition End position (1-based, inclusive) of a transcript in the genome.  Must be > 0.
 * @param strand {@link Strand} from which strand the associated transcript is read.  Must not be {@code null}.  Must not be {@link Strand#NONE}.
 * @return The start position (1-based, inclusive) relative to the start of the coding sequence of a variant.
 */
public static int getTranscriptAlleleStartPosition(final int variantGenomicStartPosition,
                                                   final int codingRegionGenomicStartPosition,
                                                   final int codingRegionGenomicEndPosition,
                                                   final Strand strand) {

    ParamUtils.isPositive( variantGenomicStartPosition, "Genome positions must be > 0." );
    ParamUtils.isPositive( codingRegionGenomicStartPosition, "Genome positions must be > 0." );
    ParamUtils.isPositive( codingRegionGenomicEndPosition, "Genome positions must be > 0." );
    assertValidStrand( strand );

    if ( strand == Strand.POSITIVE ) {
        return variantGenomicStartPosition - codingRegionGenomicStartPosition + 1;
    }
    else {
        return codingRegionGenomicEndPosition - variantGenomicStartPosition + 1;
    }
}
 
开发者ID:broadinstitute,项目名称:gatk,代码行数:29,代码来源:FuncotatorUtils.java

示例3: setRefAlleleAndStrand

/**
 * Set {@link GencodeFuncotation#refAllele} and {@link GencodeFuncotation#transcriptStrand} based on the strand and the allele itself.
 *
 * @param refAllele The reference {@link Allele} to set.  Assumed to be the FORWARD direction transcription (regardless of the value of {@code strand}).
 * @param strand    The {@link Strand} on which the gene in this funcotation occurs.
 * @return {@code this} {@link GencodeFuncotationBuilder}.
 */
public GencodeFuncotationBuilder setRefAlleleAndStrand(final Allele refAllele, final Strand strand) {

    FuncotatorUtils.assertValidStrand(strand);

    if (strand == Strand.POSITIVE) {
        gencodeFuncotation.setRefAllele(refAllele.getBaseString());
        gencodeFuncotation.setTranscriptStrand("+");
    } else {
        gencodeFuncotation.setRefAllele(
                ReadUtils.getBasesReverseComplement(refAllele.getBases())
        );
        gencodeFuncotation.setTranscriptStrand("-");
    }

    return this;
}
 
开发者ID:broadinstitute,项目名称:gatk,代码行数:23,代码来源:GencodeFuncotationBuilder.java

示例4: getBasesInWindowAroundReferenceAllele

/**
 * Get a string of bases around a variant (specified by reference and alternate alleles), including the reference allele itself.
 * ASSUMES: that the given {@link ReferenceContext} is already centered on the variant location.
 * @param refAllele The reference {@link Allele} for the variant in question.  If on {@link Strand#NEGATIVE}, must have already been reverse complemented.  Must not be {@code null}.
 * @param altAllele The alternate {@link Allele} for the variant in question.  If on {@link Strand#NEGATIVE}, must have already been reverse complemented.  Must not be {@code null}.
 * @param strand The {@link Strand} on which the variant in question lives.  Must not be {@code null}.  Must not be {@link Strand#NONE}.
 * @param referenceWindowInBases The number of bases to the left and right of the variant to return.  Must be > 0.
 * @param referenceContext The {@link ReferenceContext} centered around the variant in question.  Must not be {@code null}.
 * @return A string containing {@code referenceWindowInBases} bases to either side of the specified refAllele.
 */
public static String getBasesInWindowAroundReferenceAllele( final Allele refAllele,
                                                            final Allele altAllele,
                                                            final Strand strand,
                                                            final int referenceWindowInBases,
                                                            final ReferenceContext referenceContext) {
    Utils.nonNull( refAllele );
    Utils.nonNull( altAllele );
    assertValidStrand( strand );
    Utils.nonNull( referenceContext );

    // Calculate our window to include any extra bases but also have the right referenceWindowInBases:
    final int endWindow = refAllele.length() >= altAllele.length() ? referenceWindowInBases + refAllele.length() - 1 : referenceWindowInBases + altAllele.length() - 1;

    final String referenceBases;

    if ( strand == Strand.POSITIVE ) {
        // Get the reference sequence:
        referenceBases = new String(referenceContext.getBases(referenceWindowInBases, endWindow));
    }
    else {
        // Get the reference sequence:
        referenceBases = ReadUtils.getBasesReverseComplement(referenceContext.getBases(referenceWindowInBases, endWindow));
    }

    return referenceBases;
}
 
开发者ID:broadinstitute,项目名称:gatk,代码行数:36,代码来源:FuncotatorUtils.java

示例5: provideReferenceAndExonListForGatkExceptions

@DataProvider
Object[][] provideReferenceAndExonListForGatkExceptions() {

    return new Object[][] {
            {
                    new ReferenceContext(new ReferenceFileSource(TEST_REFERENCE), new SimpleInterval(TEST_REFERENCE_CONTIG, TEST_REFERENCE_START, TEST_REFERENCE_END)),
                    Collections.singletonList(
                            new SimpleInterval("2", TEST_REFERENCE_START + 500, TEST_REFERENCE_START + 550)
                    ),
                    Strand.POSITIVE
            },
            {
                    new ReferenceContext(new ReferenceFileSource(TEST_REFERENCE), new SimpleInterval(TEST_REFERENCE_CONTIG, TEST_REFERENCE_START, TEST_REFERENCE_END)),
                    Collections.singletonList(
                            new SimpleInterval("2", TEST_REFERENCE_START + 500, TEST_REFERENCE_START + 550)
                    ),
                    Strand.NEGATIVE
            },
            {
                    new ReferenceContext(new ReferenceFileSource(TEST_REFERENCE), new SimpleInterval(TEST_REFERENCE_CONTIG, TEST_REFERENCE_START, TEST_REFERENCE_END)),
                    Collections.singletonList(
                            new SimpleInterval("2", TEST_REFERENCE_START + 500, TEST_REFERENCE_START + 550)
                    ),
                    Strand.NONE
            },
    };
}
 
开发者ID:broadinstitute,项目名称:gatk,代码行数:27,代码来源:FuncotatorUtilsUnitTest.java

示例6: provideDataForGetStartPositionInTranscript

@DataProvider
Object[][] provideDataForGetStartPositionInTranscript() {

    final List<? extends Locatable> exons_forward = Arrays.asList(
            new SimpleInterval("chr1", 10,19),
            new SimpleInterval("chr1", 30,39),
            new SimpleInterval("chr1", 50,59),
            new SimpleInterval("chr1", 70,79),
            new SimpleInterval("chr1", 90,99)
    );

    final List<? extends Locatable> exons_backward = Arrays.asList(
            new SimpleInterval("chr1", 90,99),
            new SimpleInterval("chr1", 70,79),
            new SimpleInterval("chr1", 50,59),
            new SimpleInterval("chr1", 30,39),
            new SimpleInterval("chr1", 10,19)
    );

    return new Object[][] {
            { new SimpleInterval("chr1", 1, 1),     exons_forward, Strand.POSITIVE, -1 },
            { new SimpleInterval("chr1", 25, 67),   exons_forward, Strand.POSITIVE, -1 },
            { new SimpleInterval("chr1", 105, 392), exons_forward, Strand.POSITIVE, -1 },
            { new SimpleInterval("chr1", 10, 10),   exons_forward, Strand.POSITIVE,  1 },
            { new SimpleInterval("chr1", 99, 99),   exons_forward, Strand.POSITIVE, 50 },
            { new SimpleInterval("chr1", 50, 67),   exons_forward, Strand.POSITIVE, 21 },
            { new SimpleInterval("chr1", 67, 75),   exons_forward, Strand.POSITIVE, -1 },

            { new SimpleInterval("chr1", 1, 1),     exons_backward, Strand.NEGATIVE, -1 },
            { new SimpleInterval("chr1", 25, 67),   exons_backward, Strand.NEGATIVE, -1 },
            { new SimpleInterval("chr1", 105, 392), exons_backward, Strand.NEGATIVE, -1 },
            { new SimpleInterval("chr1", 10, 10),   exons_backward, Strand.NEGATIVE, 50 },
            { new SimpleInterval("chr1", 99, 99),   exons_backward, Strand.NEGATIVE,  1 },
            { new SimpleInterval("chr1", 50, 67),   exons_backward, Strand.NEGATIVE, -1 },
            { new SimpleInterval("chr1", 67, 75),   exons_backward, Strand.NEGATIVE, 15 },
    };
}
 
开发者ID:broadinstitute,项目名称:gatk,代码行数:37,代码来源:FuncotatorUtilsUnitTest.java

示例7: provideDataForGetTranscriptAlleleStartPosition

@DataProvider
Object[][] provideDataForGetTranscriptAlleleStartPosition() {

    return new Object[][] {
            { 1,  1, 10, Strand.POSITIVE,  1},
            { 5,  1, 10, Strand.POSITIVE,  5},
            { 10, 1, 10, Strand.POSITIVE, 10},

            { 1,  1, 10, Strand.NEGATIVE, 10},
            { 5,  1, 10, Strand.NEGATIVE,  6},
            { 10, 1, 10, Strand.NEGATIVE,  1},
    };
}
 
开发者ID:broadinstitute,项目名称:gatk,代码行数:13,代码来源:FuncotatorUtilsUnitTest.java

示例8: provideDataForTestCreateSpliceSiteCodonChange

@DataProvider
Object[][] provideDataForTestCreateSpliceSiteCodonChange() {

    return new Object[][] {
            {1000, 5, 1000, 1500, Strand.POSITIVE, 0, "c.e5-0"},
            {1000, 4, 1, 1500, Strand.POSITIVE,    0, "c.e4+500"},
            {1000, 3, 500, 1500, Strand.POSITIVE,  0, "c.e3-500"},

            {1000, 5, 1000, 1500, Strand.NEGATIVE, 0, "c.e5+0"},
            {1000, 4, 1, 1500, Strand.NEGATIVE,    0, "c.e4-500"},
            {1000, 3, 500, 1500, Strand.NEGATIVE,  0, "c.e3+500"},

            {1000, 5, 1500, 500, Strand.NEGATIVE,  0, "c.e5+500"},

            {1000, 5, 1000, 1500, Strand.POSITIVE, 1, "c.e5+1"},
            {1000, 4, 1, 1500, Strand.POSITIVE,    2, "c.e4+502"},
            {1000, 3, 500, 1500, Strand.POSITIVE,  3, "c.e3-497"},

            {1000, 5, 1000, 1500, Strand.NEGATIVE, 4, "c.e5+4"},
            {1000, 4, 1, 1500, Strand.NEGATIVE,    5, "c.e4-495"},
            {1000, 3, 500, 1500, Strand.NEGATIVE,  6, "c.e3+506"},

            {1000, 5, 1500, 500, Strand.NEGATIVE,  7, "c.e5+507"},

            {1000, 5, 1000, 1500, Strand.POSITIVE, -1, "c.e5-1"},
            {1000, 4, 1, 1500, Strand.POSITIVE,    -2, "c.e4+498"},
            {1000, 3, 500, 1500, Strand.POSITIVE,  -3, "c.e3-503"},

            {1000, 5, 1000, 1500, Strand.NEGATIVE, -4, "c.e5-4"},
            {1000, 4, 1, 1500, Strand.NEGATIVE,    -5, "c.e4-505"},
            {1000, 3, 500, 1500, Strand.NEGATIVE,  -6, "c.e3+494"},

            {1000, 5, 1500, 500, Strand.NEGATIVE,  -7, "c.e5+493"},
    };
}
 
开发者ID:broadinstitute,项目名称:gatk,代码行数:35,代码来源:FuncotatorUtilsUnitTest.java

示例9: provideDataForTestAssertValidStrand_ValidStrands

@DataProvider
Object[][] provideDataForTestAssertValidStrand_ValidStrands() {
    return new Object[][] {
            { Strand.POSITIVE },
            { Strand.NEGATIVE },
    };
}
 
开发者ID:broadinstitute,项目名称:gatk,代码行数:7,代码来源:FuncotatorUtilsUnitTest.java

示例10: getStrand

/** returns the strand */
public Strand getStrand()
	{
	switch(strand)
		{
		case '+': return Strand.POSITIVE;
		case '-': return Strand.NEGATIVE;
		default: return Strand.NONE;
		}
	}
 
开发者ID:lindenb,项目名称:jvarkit,代码行数:10,代码来源:KnownGene.java

示例11: getAlignedAlleleSequence

/**
 * Get the coding sequence-aligned allele based on stop and start position.
 * @param codingSequence Coding sequence from which the allele should be derived.  Must not be {@code null}.
 * @param alignedAlleleStart Start position of the allele (1-indexed, inclusive).  Must not be {@code null}.  Must be > 0.
 * @param alignedAlleleStop Stop position of the allele (1-indexed, inclusive).  Must not be {@code null}.  Must be > 0.
 * @param strand {@link Strand} on which the allele is coded.  Must not be {@code null}.  Must not be {@link Strand#NONE}.
 * @return The {@link String} representation of the allele.
 */
private static String getAlignedAlleleSequence(final String codingSequence,
                                               final Integer alignedAlleleStart,
                                               final Integer alignedAlleleStop,
                                               final Strand strand) {
    Utils.nonNull(codingSequence);
    Utils.nonNull(alignedAlleleStart);
    ParamUtils.isPositive( alignedAlleleStart, "Genome positions must be > 0." );
    Utils.nonNull(alignedAlleleStop);
    ParamUtils.isPositive( alignedAlleleStop, "Genome positions must be > 0." );
    assertValidStrand( strand );

    // Get our indices:
    // Subtract 1 because we're 1-based.
    int start = alignedAlleleStart - 1;
    int end = alignedAlleleStop;

    final String alignedAlleleSeq;

    if ( strand == Strand.POSITIVE ) {

        if ( end > codingSequence.length() ) {
            throw new TranscriptCodingSequenceException("Gencode transcript ends at position " + end + " but codingSequence is only " + codingSequence.length() + " bases long!");
        }
        else {
            alignedAlleleSeq = codingSequence.substring(start, end);
        }
    }
    else {
        // Negative strand means we need to reverse complement and go from the other end:
        start = codingSequence.length() - alignedAlleleStop;
        end = codingSequence.length() - alignedAlleleStart + 1;

        if ( end > codingSequence.length() ) {
            throw new TranscriptCodingSequenceException("Gencode transcript ends at position " + end + " but codingSequence is only " + codingSequence.length() + " bases long!");
        }
        else {
            alignedAlleleSeq = ReadUtils.getBasesReverseComplement(codingSequence.substring(start, end).getBytes());
        }
    }

    return alignedAlleleSeq;
}
 
开发者ID:broadinstitute,项目名称:gatk,代码行数:50,代码来源:FuncotatorUtils.java

示例12: getAlignedCodingSequenceAllele

/**
 * Gets the coding sequence for the allele with given start and stop positions, codon-aligned to the start of the reference sequence.
 * @param codingSequence The whole coding sequence for this transcript.  Must not be {@code null}.
 * @param alignedAlleleStart The codon-aligned position (1-based, inclusive) of the allele start.  Must not be {@code null}.
 * @param alignedAlleleStop The codon-aligned position (1-based, inclusive) of the allele stop.  Must not be {@code null}.
 * @param refAllele The reference {@link Allele}.  Must not be {@code null}.
 * @param refAlleleStart The position (1-based, inclusive) of where the reference allele starts.  Must not be {@code null}.  Must be > 0.
 * @param strand The {@link Strand} on which the alleles are found.  Must not be {@code null}.  Must not be {@link Strand#NONE}.
 * @return A {@link String} containing the reference allele coding sequence.
 */
public static String getAlignedCodingSequenceAllele(final String codingSequence,
                                                    final Integer alignedAlleleStart,
                                                    final Integer alignedAlleleStop,
                                                    final Allele  refAllele,
                                                    final Integer refAlleleStart,
                                                    final Strand strand) {
    Utils.nonNull(codingSequence);
    Utils.nonNull(alignedAlleleStart);
    ParamUtils.isPositive( alignedAlleleStart, "Genome positions must be > 0." );
    Utils.nonNull(alignedAlleleStop);
    ParamUtils.isPositive( alignedAlleleStop, "Genome positions must be > 0." );
    Utils.nonNull(refAllele);
    Utils.nonNull(refAlleleStart);
    ParamUtils.isPositive( refAlleleStart, "Genome positions must be > 0." );

    assertValidStrand( strand );

    String alignedAlleleSeq = getAlignedAlleleSequence(codingSequence, alignedAlleleStart, alignedAlleleStop, strand);

    // Check whether our reference sequence is derived from the reference or if it should be derived from the given
    // reference.
    final String expectedReferenceSequence;
    if ( strand == Strand.POSITIVE ) {
        expectedReferenceSequence = codingSequence.substring(refAlleleStart - 1, refAlleleStart - 1 + refAllele.length());
    }
    else {
        final int start = codingSequence.length() - (refAlleleStart - 1 + refAllele.length());
        final int end = codingSequence.length() - refAlleleStart;
        expectedReferenceSequence = ReadUtils.getBasesReverseComplement( codingSequence.substring(start, end).getBytes() );
    }

    // NOTE: This check appears to be reduntant, but in actuality, it is required.
    //       Because we reconstruct the coding sequence allele separately from the reference allele, we need to check this
    //       again to make sure we have the right alleles given our input.
    if ( !expectedReferenceSequence.equals(refAllele.getBaseString()) ) {
        // Oh noes!
        // Ref allele is different from reference sequence!
        // Oh well, we should use the reference we were given anyways...
        final String substitutedAlignedSeq = getAlternateSequence(codingSequence, refAlleleStart, refAllele, refAllele);

        // We use the positive strand here because we have already reverse complemented the sequence in the call
        // above.
        final String substitutedAlignedAlleleSeq = getAlignedAlleleSequence(substitutedAlignedSeq, alignedAlleleStart, alignedAlleleStop, Strand.POSITIVE);

        // Warn the user!
        logger.warn("Reference allele is different than the reference coding sequence!  Substituting given allele for sequence code (" + alignedAlleleSeq + "->" + substitutedAlignedAlleleSeq + ")");

        // Set up our return value:
        alignedAlleleSeq = substitutedAlignedAlleleSeq;
    }

    return alignedAlleleSeq;
}
 
开发者ID:broadinstitute,项目名称:gatk,代码行数:63,代码来源:FuncotatorUtils.java

示例13: createIntronFuncotation

/**
 * Create a {@link GencodeFuncotation} for a {@code variant} that occurs in an intron in the given {@code transcript}.
 * @param variant The {@link VariantContext} for which to create a {@link GencodeFuncotation}.
 * @param altAllele The {@link Allele} in the given {@code variant} for which to create a {@link GencodeFuncotation}.
 * @param reference The {@link ReferenceContext} for the given {@code variant}.
 * @param gtfFeature The {@link GencodeGtfGeneFeature} in which the given {@code variant} occurs.
 * @param transcript The {@link GencodeGtfTranscriptFeature} in which the given {@code variant} occurs.
 * @param referenceContext The {@link ReferenceContext} in which the given variant appears.
 * @return A {@link GencodeFuncotation} containing information about the given {@code variant} given the corresponding {@code transcript}.
 */
private static GencodeFuncotation createIntronFuncotation(final VariantContext variant,
                                                          final Allele altAllele,
                                                          final ReferenceContext reference,
                                                          final GencodeGtfGeneFeature gtfFeature,
                                                          final GencodeGtfTranscriptFeature transcript,
                                                          final ReferenceContext referenceContext) {

    // Setup the "trivial" fields of the gencodeFuncotation:
    final GencodeFuncotationBuilder gencodeFuncotationBuilder = createGencodeFuncotationBuilderWithTrivialFieldsPopulated(variant, altAllele, gtfFeature, transcript);

    // Determine the strand for the variant:
    final Strand strand = Strand.decode( transcript.getGenomicStrand().toString() );
    FuncotatorUtils.assertValidStrand(strand);

    // Get the strand-corrected alleles from the inputs.
    // Also get the reference sequence for the variant region.
    // (spanning the entire length of both the reference and the variant, regardless of which is longer).
    final Allele strandCorrectedRefAllele;
    final Allele strandCorrectedAltAllele;

    if ( strand == Strand.POSITIVE ) {
        strandCorrectedRefAllele = variant.getReference();
        strandCorrectedAltAllele = altAllele;
    }
    else {
        strandCorrectedRefAllele = Allele.create(ReadUtils.getBasesReverseComplement( variant.getReference().getBases() ), true);
        strandCorrectedAltAllele = Allele.create(ReadUtils.getBasesReverseComplement( altAllele.getBases() ), false);
    }

    final String referenceBases = FuncotatorUtils.getBasesInWindowAroundReferenceAllele(strandCorrectedRefAllele, strandCorrectedAltAllele, strand, referenceWindow, referenceContext);

    // Set our reference sequence in the Gencode Funcotation Builder:
    gencodeFuncotationBuilder.setReferenceContext( referenceBases );

    // Set as default INTRON variant classification:
    gencodeFuncotationBuilder.setVariantClassification(GencodeFuncotation.VariantClassification.INTRON);

    // Set GC Content:
    gencodeFuncotationBuilder.setGcContent( calculateGcContent( reference, gcContentWindowSizeBases ) );

    // Need to check if we're within the window for splice site variants:
    final GencodeGtfExonFeature spliceSiteExon = getExonWithinSpliceSiteWindow(variant, transcript, spliceSiteVariantWindowBases);
    if ( spliceSiteExon != null ) {
        // Set the variant classification:
        gencodeFuncotationBuilder.setVariantClassification(GencodeFuncotation.VariantClassification.SPLICE_SITE)
                                 .setSecondaryVariantClassification(GencodeFuncotation.VariantClassification.INTRON);

        // In deletions we have added a base to the front because of VCF requirements, thus we add an
        // offset of 1 to account for that:
        // (TODO: come to think of it this is really bad, because we're tying our parsing / computations to a data format).
        int offsetIndelAdjustment = 0;
        if ( GATKVariantContextUtils.isDeletion(variant.getReference(), altAllele) ) {
            offsetIndelAdjustment = 1;
        }

        gencodeFuncotationBuilder.setCodonChange(
                FuncotatorUtils.createSpliceSiteCodonChange(variant.getStart(), spliceSiteExon.getExonNumber(), spliceSiteExon.getStart(), spliceSiteExon.getEnd(), strand, offsetIndelAdjustment)
        );
    }

    return gencodeFuncotationBuilder.build();
}
 
开发者ID:broadinstitute,项目名称:gatk,代码行数:72,代码来源:GencodeFuncotationFactory.java

示例14: provideDataForGetAlignedCodingSequenceAllele

@DataProvider
    Object[][] provideDataForGetAlignedCodingSequenceAllele() {

        final String seq = "ATGAAAGGGGTGCCTATGCTAGATAGACAGATAGTGTGTGTGTGTGTGCGCGCGCGCGCGCGTTGTTAG";

        //CTA ACA ACG CGC GCG CGC GCG CAC ACA CAC ACA CAC TAT CTG TCT ATC TAG CAT AGG CAC CCC TTT CAT

//        final Allele refAllele,
//        final Integer refAlleleStart,

        return new Object[][] {
                { seq,  1, 3,  Allele.create("ATG", true), 1, Strand.POSITIVE, "ATG" },
                { seq,  4, 6,  Allele.create("AAA", true), 4, Strand.POSITIVE, "AAA" },
                { seq,  7, 9,  Allele.create("GGG", true), 7, Strand.POSITIVE, "GGG" },
                { seq, 10, 12, Allele.create("GTG", true), 10, Strand.POSITIVE, "GTG" },
                { seq, 13, 15, Allele.create("CCT", true), 13, Strand.POSITIVE, "CCT" },
                { seq, 16, 18, Allele.create("ATG", true), 16, Strand.POSITIVE, "ATG" },
                { seq, 19, 21, Allele.create("CTA", true), 19, Strand.POSITIVE, "CTA" },
                { seq,  1,  6, Allele.create("ATGAAA", true), 1, Strand.POSITIVE, "ATGAAA" },
                { seq,  4,  9, Allele.create("AAAGGG", true), 4, Strand.POSITIVE, "AAAGGG" },
                { seq,  7, 12, Allele.create("GGGGTG", true), 7, Strand.POSITIVE, "GGGGTG" },
                { seq, 10, 15, Allele.create("GTGCCT", true), 10, Strand.POSITIVE, "GTGCCT" },
                { seq, 13, 18, Allele.create("CCTATG", true), 13, Strand.POSITIVE, "CCTATG" },
                { seq, 16, 21, Allele.create("ATGCTA", true), 16, Strand.POSITIVE, "ATGCTA" },
                { seq, 19, 24, Allele.create("CTAGAT", true), 19, Strand.POSITIVE, "CTAGAT" },
                { seq, 1, seq.length(), Allele.create(seq, true), 1, Strand.POSITIVE, seq },

                { seq,  1, 3,  Allele.create("CTA", true), 1, Strand.NEGATIVE, "CTA" },
                { seq,  4, 6,  Allele.create("ACA", true), 4, Strand.NEGATIVE, "ACA" },
                { seq,  7, 9,  Allele.create("ACG", true), 7, Strand.NEGATIVE, "ACG" },
                { seq, 10, 12, Allele.create("CGC", true), 10, Strand.NEGATIVE, "CGC" },
                { seq, 13, 15, Allele.create("GCG", true), 13, Strand.NEGATIVE, "GCG" },
                { seq, 16, 18, Allele.create("CGC", true), 16, Strand.NEGATIVE, "CGC" },
                { seq, 19, 21, Allele.create("GCG", true), 19, Strand.NEGATIVE, "GCG" },
                { seq,  1,  6, Allele.create("CTAACA", true), 1, Strand.NEGATIVE, "CTAACA" },
                { seq,  4,  9, Allele.create("ACAACG", true), 4, Strand.NEGATIVE, "ACAACG" },
                { seq,  7, 12, Allele.create("ACGCGC", true), 7, Strand.NEGATIVE, "ACGCGC" },
                { seq, 10, 15, Allele.create("CGCGCG", true), 10, Strand.NEGATIVE, "CGCGCG" },
                { seq, 13, 18, Allele.create("GCGCGC", true), 13, Strand.NEGATIVE, "GCGCGC" },
                { seq, 16, 21, Allele.create("CGCGCG", true), 16, Strand.NEGATIVE, "CGCGCG" },
                { seq, 19, 24, Allele.create("GCGCAC", true), 19, Strand.NEGATIVE, "GCGCAC" },
                { seq, 1, seq.length(), Allele.create(ReadUtils.getBasesReverseComplement( seq.getBytes() ), true), 1, Strand.NEGATIVE, ReadUtils.getBasesReverseComplement( seq.getBytes() ) },
        };
    }
 
开发者ID:broadinstitute,项目名称:gatk,代码行数:44,代码来源:FuncotatorUtilsUnitTest.java

示例15: GenomeLocation

public GenomeLocation(final ChrString chromosome, final int location, final Strand strand, final MapBlock.BlockType feature) {
    this.chromosome = chromosome;
    this.location = location;
    direction = (strand == Strand.POSITIVE) ? 0 : 1;
    this.feature = feature;
}
 
开发者ID:bioinform,项目名称:varsim,代码行数:6,代码来源:GenomeLocation.java


注:本文中的htsjdk.tribble.annotation.Strand.POSITIVE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。