Package net.sf.cram.encoding.read_features

Examples of net.sf.cram.encoding.read_features.ReadBase


    // ReadBase overwrites bases:
    for (ReadFeature v : variations) {
      switch (v.getOperator()) {
      case ReadBase.operator:
        ReadBase rb = (ReadBase) v;
        bases[v.getPosition() - 1] = rb.getBase();
        break;
      default:
        break;
      }
    }
View Full Code Here


          int pos = prevPos + fp.readData();
          prevPos = pos;

          switch (operator) {
          case ReadBase.operator:
            ReadBase rb = new ReadBase(pos, bc.readData(),
                qc.readData());
            rf.add(rb);
            break;
          case Substitution.operator:
            Substitution sv = new Substitution();
View Full Code Here

        fp.writeData(f.getPosition() - prevPos);
        prevPos = f.getPosition();

        switch (f.getOperator()) {
        case ReadBase.operator:
          ReadBase rb = (ReadBase) f;
          bc.writeData(rb.getBase());
          qc.writeData(rb.getQualityScore());
          break;
        case Substitution.operator:
          Substitution sv = (Substitution) f;
          if (sv.getCode() < 0)
            bsc.writeData(substitutionMatrix.code(
View Full Code Here

              seq[p] = "ACGT".getBytes()[random.nextInt(4)];
            iv.setSequence(seq);
            record.getReadFeatures().add(iv);
            break;
          case ReadBase.operator:
            ReadBase rb = new ReadBase(newPos,
                "ACGT".getBytes()[random.nextInt(4)],
                (byte) (33 + random.nextInt(40)));
            record.getReadFeatures().add(rb);
            break;
          case BaseQualityScore.operator:
View Full Code Here

TOP

Related Classes of net.sf.cram.encoding.read_features.ReadBase

Copyright © 2018 www.massapicom. 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.