Examples of Strand


Examples of org.broad.igv.feature.Strand

                    int index = Integer.parseInt(tokens[numColumn]);

                    String chr1 = genome.getChromosomeAlias(tokens[chr1Column]);
                    int pos1 = Integer.parseInt(tokens[pos1Column]);
                    String str1 = tokens[str1Column];
                    Strand strand1 = (str1.equals("0") || str1.equals("(+)")) ? Strand.POSITIVE : Strand.NEGATIVE;

                    String chr2 = genome.getChromosomeAlias(tokens[chr2Column]);
                    int pos2 = Integer.parseInt(tokens[pos2Column]);
                    String str2 = tokens[str2Column];
                    Strand strand2 = (str2.equals("0") || str2.equals("(+)")) ? Strand.POSITIVE : Strand.NEGATIVE;

                    DRangerFeature feature = new DRangerFeature(chr1, pos1, strand1, chr2, pos2, strand2);
                    feature.setIndex(index);

                    if (tumreadsColumn > 0) {
View Full Code Here

Examples of org.broad.igv.feature.Strand

                    int exonEnd = exonStart + 1;
                    if (tmp.length > 1) {
                        exonEnd = Integer.parseInt(tmp[1]);
                    }

                    Strand strand = isNegative ? Strand.NEGATIVE : Strand.POSITIVE;
                    Exon r = new Exon(chromosome, exonStart, exonEnd, strand);
                    start = Math.min(start, exonStart);
                    end = Math.max(end, exonEnd);
                    exons.add(r);
View Full Code Here

Examples of org.broad.igv.feature.Strand

        String chr = genome == null ? StringUtils.intern(chrToken) : genome.getChromosomeAlias(chrToken);

        int start = Integer.parseInt(tokens[startColumn]);
        int end = Integer.parseInt(tokens[endColumn]);
        String strandString = tokens[strandColumn];
        Strand strand = Strand.NONE;
        if (strandString != null) {
            if (strandString.trim().equals("+")) {
                strand = Strand.POSITIVE;
            } else if (strandString.trim().equals("-")) {
                strand = Strand.NEGATIVE;
View Full Code Here

Examples of org.broad.igv.feature.Strand

                Alignment alignment = iter.next();
                if (passFilter(alignment)) {
                    //Sort into the read strand or first-in-pair strand,
                    //depending on input flag. Note that this can
                    //be very unreliable depending on data
                    Strand strand;
                    if (firstInPair) {
                        strand = alignment.getFirstOfPairStrand();
                    } else if (secondInPair) {
                        strand = alignment.getSecondOfPairStrand();
                    } else {
                        strand = alignment.getReadStrand();
                    }
                    if (strand.equals(Strand.NONE)) {
                        //TODO move this into passFilter, or move passFilter here
                        continue;
                    }
                    boolean readNegStrand = alignment.isNegativeStrand();
View Full Code Here

Examples of org.broad.igv.feature.Strand

        private MethylScore createUSCScore(BedFeature feat, String[] restOfFields) {
            //String name = restOfFields[0];
            //int score = Integer.parseInt(restOfFields[1]);
            char strandChar = restOfFields[2].charAt(0);
            Strand strand = strandChar == '+' ? Strand.POSITIVE : (strandChar == '-' ? Strand.NEGATIVE : Strand.NONE);
            float percentMethyl = Float.parseFloat(restOfFields[3]);
            int count = Integer.parseInt(restOfFields[4]);
            return new MethylScore(feat.getChromosome(), feat.getStartBase(), feat.getEndBase(), strand, percentMethyl, count);
        }
View Full Code Here

Examples of org.broad.igv.feature.Strand

                case START:
                    return centerAlignment.getStart();
                case STRAND:
                    return centerAlignment.isNegativeStrand() ? -1 : 1;
                case FIRST_OF_PAIR_STRAND:
                    Strand strand = centerAlignment.getFirstOfPairStrand();
                    int score = 2;
                    if (strand != Strand.NONE) {
                        score = strand == Strand.NEGATIVE ? 1 : -1;
                    }
                    return score;
View Full Code Here

Examples of org.broad.igv.feature.Strand

                        queryEnd = Integer.parseInt(tokens[queryEndIdx]);
                    }
                    catch (NumberFormatException ne) {
                        throw new RuntimeException("Non-numeric value found in either start or end column");
                    }
                    Strand queryStrand = Strand.NONE;
                    if (!tabblastn) {
                        int str = Integer.parseInt(tokens[queryStrandIdx]);
                        queryStrand = str == 1 ? Strand.POSITIVE : Strand.NEGATIVE;
                    }

                    String subjectChr = tokens[subjectChrIdx];

                    int subjectStart;
                    int subjectEnd;
                    try {
                        subjectStart = Integer.parseInt(tokens[subjectStartIdx]);
                        subjectEnd = Integer.parseInt(tokens[subjectEndIdx]);
                    }
                    catch (NumberFormatException ne) {
                        throw new RuntimeException("Non-numeric value found in " +
                                " either subject start or end column");
                    }
                    Strand subjectStrand = Strand.NONE;
                    if (!tabblastn) {
                        try {
                            int str = Integer.parseInt(tokens[subjectStrandIdx]);
                            subjectStrand = str == 1 ? Strand.POSITIVE : Strand.NEGATIVE;
                        }
View Full Code Here

Examples of org.broad.igv.feature.Strand

                } else {
                    c = posStrandColor;
                }
                break;
            case FIRST_OF_PAIR_STRAND:
                final Strand fragmentStrand = alignment.getFirstOfPairStrand();
                if (fragmentStrand == Strand.NEGATIVE) {
                    c = negStrandColor;
                } else if (fragmentStrand == Strand.POSITIVE) {
                    c = posStrandColor;
                }
View Full Code Here

Examples of org.broad.igv.feature.Strand

            end = Integer.parseInt(tokens[col]);
        } catch (NumberFormatException ne) {
            String msg = String.format("Column %d must contain a numeric value. %s", col + 1, ne.getMessage());
            throw new ParserException(msg, -1, line);
        }
        Strand strand = convertStrand(tokens[6]);

        String attributeString = tokens[8];

        MultiMap<String, String> attributes = new MultiMap<String, String>();
View Full Code Here

Examples of org.broad.igv.feature.Strand

    public Object getHeader() {
        return header;
    }

    private Strand convertStrand(String strandString) {
        Strand strand = Strand.NONE;
        if (strandString.equals("-")) {
            strand = Strand.NEGATIVE;
        } else if (strandString.equals("+")) {
            strand = Strand.POSITIVE;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.