Examples of IntervalList


Examples of htsjdk.samtools.util.IntervalList

    public void testInvalidPicardIntervalHandling(GATKArgumentCollection argCollection, GenomeLocParser genomeLocParser,
                                                  String contig, int intervalStart, int intervalEnd ) throws Exception {

        SAMFileHeader picardFileHeader = new SAMFileHeader();
        picardFileHeader.addSequence(genomeLocParser.getContigInfo("chr1"));
        IntervalList picardIntervals = new IntervalList(picardFileHeader);
        picardIntervals.add(new Interval(contig, intervalStart, intervalEnd, true, "dummyname"));

        File picardIntervalFile = createTempFile("testInvalidPicardIntervalHandling", ".intervals");
        picardIntervals.write(picardIntervalFile);

        List<IntervalBinding<Feature>> intervalArgs = new ArrayList<IntervalBinding<Feature>>(1);
        intervalArgs.add(new IntervalBinding<Feature>(picardIntervalFile.getAbsolutePath()));

        IntervalUtils.loadIntervals(intervalArgs, argCollection.intervalArguments.intervalSetRule, argCollection.intervalArguments.intervalMerging, argCollection.intervalArguments.intervalPadding, genomeLocParser);
View Full Code Here

Examples of net.sf.picard.util.IntervalList

        String chr_id = "chr1";
        int start = 1;
        int end = 20;
//        int end = 247199724;
        Interval interval = new Interval(chr_id, start, end);
        IntervalList il = new IntervalList(samReader.getFileHeader());
        il.add(interval);
       
        SamLocusIterator sli = new SamLocusIterator(samReader, il, true);

        FileWriter fw = new FileWriter("/data/kimjh/WGS/simulation_test_chr1/seperate_10p/gatk/depth_diff.txt");
        BufferedWriter bw = new BufferedWriter(fw);
View Full Code Here

Examples of net.sf.picard.util.IntervalList

        this.avgSeqQWindow = avgSeqQWindow;
    }

    public void setDeletionInfo(SAMFileReader samReader, ArrayList overlappedAreaList) {
        Interval interval = new Interval(getChr(), getWindowStart(), getWindowEnd());
        IntervalList il = new IntervalList(samReader.getFileHeader());
        il.add(interval);

        ArrayList locusList = new ArrayList();

        SamLocusIterator sli = new SamLocusIterator(samReader, il, true);
        for (Iterator<SamLocusIterator.LocusInfo> iter = sli.iterator(); iter.hasNext();) {
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.layout.IntervalList

  }

  public void preProcessing(Orientation orientation) {

    // process auto tokens
    IntervalList intervals = new IntervalList();
    for (LayoutComponent component : getLayoutContainer().getComponents()) {

      if (component != null) {
        if (component instanceof LayoutContainer) {
          ((LayoutContainer) component).getLayoutManager().preProcessing(orientation);
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.layout.IntervalList

        } else {
          heads[i].setCurrent(Measure.ZERO);
        }
      }

      IntervalList intervalList = new IntervalList();
      for (int j = 0; j < heads2.length; j++) {
        Cell cell = grid.getCell(i, j, orientation);
        if (cell instanceof OriginCell) {
          OriginCell origin = (OriginCell) cell;
          LayoutComponent component = cell.getComponent();

          if (component instanceof LayoutContainer && (component.isRendered() || isRigid())) {
            ((LayoutContainer) component).getLayoutManager().preProcessing(orientation);
          }

          if (token instanceof AutoLayoutToken || token instanceof RelativeLayoutToken) {
            if (origin.getSpan(orientation) == 1 && (component.isRendered() || isRigid())) {
              intervalList.add(new Interval(component, orientation));
            } else {
              if (LOG.isDebugEnabled()) {
                LOG.debug("Components with span > 1 will be ignored in 'auto' layout rows/columns.");
                // todo: give this information to the developer
              }
            }
          }
        }
      }

      intervalList.evaluate();
      if (token instanceof AutoLayoutToken || token instanceof RelativeLayoutToken) {
        heads[i].setIntervalList(intervalList);
      }
      if (token instanceof AutoLayoutToken) {
        heads[i].setCurrent(intervalList.getCurrent());
      }
      i++;
    }

/*
 
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.layout.IntervalList

  }

  public void preProcessing(Orientation orientation) {

    // process auto tokens
    IntervalList intervals = new IntervalList();
    for (LayoutComponent component : getLayoutContainer().getComponents()) {

      if (component != null) {
        if (component instanceof LayoutContainer && component.isRendered()) {
          ((LayoutContainer) component).getLayoutManager().preProcessing(orientation);
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.layout.IntervalList

  }

  public void preProcessing(Orientation orientation) {

    // process auto tokens
    IntervalList intervals = new IntervalList();
    for (LayoutComponent component : getLayoutContainer().getComponents()) {

      if (component instanceof LayoutContainer && component.isRendered()) {
        ((LayoutContainer) component).getLayoutManager().preProcessing(orientation);
      }

      if (orientation == Orientation.HORIZONTAL && horizontalAuto
          || orientation == Orientation.VERTICAL && verticalAuto) {
        intervals.add(new Interval(component, orientation));
      }
    }

    if (intervals.size() >= 1) {
      intervals.evaluate();
      Measure size = intervals.getCurrent();
/*
      size = size.add(LayoutUtils.getBorderBegin(orientation, getLayoutContainer()));
      size = size.add(LayoutUtils.getBorderEnd(orientation, getLayoutContainer()));
*/
      LayoutUtils.setCurrentSize(orientation, getLayoutContainer(), size);
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.layout.IntervalList

   * 10/100/1000
   * 1000/10000/100000
   */
  @Test
  public void test2MinPrefMax() {
    IntervalList list = new IntervalList();
    list.add(new Interval(px(10), px(100), px(1000), null));
    list.add(new Interval(px(1000), px(10000), px(100000), null));
    list.evaluate();
    Assert.assertEquals(px(1000), list.getCurrent());
    Assert.assertEquals(px(1000), list.getMinimum());
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.layout.IntervalList

   * 10/100/1000
   * 2000/20000/200000
   */
  @Test
  public void test4MinPrefMax() {
    IntervalList list = new IntervalList();
    list.add(new Interval(px(10), px(100), px(1000), null));
    list.add(new Interval(px(2000), px(20000), px(200000), null));
    list.evaluate();
    Assert.assertEquals(px(2000), list.getCurrent());
    Assert.assertEquals(px(2000), list.getMinimum());
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.layout.IntervalList

   * ./200/.
   * ././3000
   */
  @Test
  public void test3MinPrefMaxWithGaps() {
    IntervalList list = new IntervalList();
    list.add(new Interval(px(10), null, null, null));
    list.add(new Interval(null, px(200), null, null));
    list.add(new Interval(null, null, px(3000), null));
    list.evaluate();
    Assert.assertEquals(px(200), list.getCurrent());
    Assert.assertEquals(px(10), list.getMinimum());
  }
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.