Package net.sf.cram.encoding.read_features

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


    BitCodec<InsertBase> codec = new BitCodec<InsertBase>() {

      @Override
      public InsertBase read(BitInputStream bis) throws IOException {
        InsertBase ib = new InsertBase();
        ib.setBase(baseCodec.read(bis));
        return ib;
      }

      @Override
      public long write(BitOutputStream bos, InsertBase ib)
          throws IOException {
        return baseCodec.write(bos, ib.getBase());
      }

      @Override
      public long numberOfBits(InsertBase ib) {
        return baseCodec.numberOfBits(ib.getBase());
      }
    };

    DefaultMutableTreeNode node = buildNode(codec, "Single insertion codec");
    parent.add(node);
View Full Code Here


        zeroBasedPositionInRead, zeroBasedPositionInRead
            + cigarElementLength);

    for (int i = 0; i < insertedBases.length; i++) {
      // single base insertion:
      InsertBase ib = new InsertBase();
      ib.setPosition(zeroBasedPositionInRead + 1 + i);
      ib.setBase(insertedBases[i]);
      features.add(ib);
      if (losslessQS || scores == null || scores.length < bases.length)
        continue;
      boolean qualityMasked = (scores[i] < uncategorisedQualityScoreCutoff);
      if (captureInsertScores || qualityMasked) {
View Full Code Here

      case Deletion.operator:
        Deletion dv = (Deletion) v;
        posInSeq += dv.getLength();
        break;
      case InsertBase.operator:
        InsertBase ib = (InsertBase) v;
        bases[posInRead++ - 1] = ib.getBase();
        break;
      }
    }
    for (; posInRead <= readLength; posInRead++)
      bases[posInRead - 1] = ref[alignmentStart + posInSeq++];
View Full Code Here

          case RefSkip.operator:
            RefSkip rsv = new RefSkip(pos, refSkipCodec.readData());
            rf.add(rsv);
            break;
          case InsertBase.operator:
            InsertBase ib = new InsertBase(pos, bc.readData());
            rf.add(ib);
            break;
          case BaseQualityScore.operator:
            BaseQualityScore bqs = new BaseQualityScore(pos,
                qc.readData());
View Full Code Here

        case RefSkip.operator:
          RefSkip rsv = (RefSkip) f;
          refSkipCodec.writeData(rsv.getLength());
          break;
        case InsertBase.operator:
          InsertBase ib = (InsertBase) f;
          bc.writeData(ib.getBase());
          break;
        case BaseQualityScore.operator:
          BaseQualityScore bqs = (BaseQualityScore) f;
          qc.writeData(bqs.getQualityScore());
          break;
View Full Code Here

            BaseQualityScore qs = new BaseQualityScore(newPos,
                (byte) (33 + random.nextInt(40)));
            record.getReadFeatures().add(qs);
            break;
          case InsertBase.operator:
            InsertBase ib = new InsertBase();
            ib.setPosition(newPos);
            ib.setBase("ACGT".getBytes()[random.nextInt(4)]);
            record.getReadFeatures().add(ib);
            break;

          default:
            break;
View Full Code Here

TOP

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

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.