Examples of TagSettings


Examples of com.google.api.ads.dfa.axis.v1_19.TagSettings

    pricingSchedule.setEndDate(endDate);
    pricingSchedule.setPricingType(pricingType);
    placement.setPricingSchedule(pricingSchedule);

    // Set the placement tag settings.
    TagSettings tagSettings = new TagSettings();
    PlacementTagOption[] placementTagOptions = placementService.getRegularPlacementTagOptions();
    int[] tagTypes = new int[placementTagOptions.length];

    for (int i = 0; i < placementTagOptions.length; i++) {
      tagTypes[i] = (int) placementTagOptions[i].getId();
    }

    tagSettings.setTagTypes(tagTypes);
    placement.setTagSettings(tagSettings);

    // Save the placement.
    PlacementSaveResult placementSaveResult = placementService.savePlacement(placement);
View Full Code Here

Examples of com.google.api.ads.dfa.axis.v1_20.TagSettings

    pricingSchedule.setEndDate(endDate);
    pricingSchedule.setPricingType(pricingType);
    placement.setPricingSchedule(pricingSchedule);

    // Set the placement tag settings.
    TagSettings tagSettings = new TagSettings();
    PlacementTagOption[] placementTagOptions = placementService.getRegularPlacementTagOptions();
    int[] tagTypes = new int[placementTagOptions.length];

    for (int i = 0; i < placementTagOptions.length; i++) {
      tagTypes[i] = (int) placementTagOptions[i].getId();
    }

    tagSettings.setTagTypes(tagTypes);
    placement.setTagSettings(tagSettings);

    // Save the placement.
    PlacementSaveResult placementSaveResult = placementService.savePlacement(placement);
View Full Code Here

Examples of org.moltools.apps.probemaker.design.TagSettings

          ti++;
        }
        TagLibrary[] libraries = libs.toArray(new TagLibrary[libs.size()]);
        int[] order = new int[libraries.length];
        for (int i = 0;i<order.length;i++) order[i] = i;
        TagSettings tagSettings = new DefaultTagSettings(libraries,order);
        p.setTagSettings(tagSettings);

        System.out.println("  Loading targets"); //$NON-NLS-1$

        new TargetIOTask(p,callback,new Reader[] { new FileReader(targetFile) },tif).run();
View Full Code Here

Examples of org.moltools.apps.probemaker.design.TagSettings

          ti++;
        }
        TagLibrary[] libraries = libs.toArray(new TagLibrary[libs.size()]);
        int[] order = new int[libraries.length];
        for (int i = 0;i<order.length;i++) order[i] = i;
        TagSettings tagSettings = new DefaultTagSettings(libraries,order);
        p.setTagSettings(tagSettings);

        System.out.println("  Loading targets"); //$NON-NLS-1$

        new TargetIOTask(p,callback,new Reader[] { new FileReader(targetFile) },tif).run();
View Full Code Here

Examples of org.moltools.apps.probemaker.design.TagSettings

    project.setSettings(SettingsXMLHandler.getSettings(projE.getChild(SettingsXMLHandler.SETTINGS,ns)));

    increaseProgress();  
    setStatus("Reading tag libraries",0);           //$NON-NLS-1$

    TagSettings tagSettings = getTagSettings(projE.getChild(LIBRARIES,ns));
    project.setTagSettings(tagSettings);
    project.getTagAllocationTable().setTagLibraries(tagSettings.getTagLibraries(),project.getSettings().getDesignParameters());

    increaseProgress();
    setStatus("Reading probes",0);          //$NON-NLS-1$

    //Read and create all probe groups
    Element probeList = projE.getChild(PROBE_LIST,ns);   
    Map<String, ProbeGroup> probeGroups = new HashMap<String, ProbeGroup>();   
    for (Iterator<?> i = probeList.getChildren().iterator();i.hasNext();) {

      Element probeE = (Element) i.next();
      String id = probeE.getAttributeValue(ID,ns);
      setStatus(id,1);

      String probeName = probeE.getChildText(NAME,ns);
      String typeStr = probeE.getChildText(TYPE,ns);
      String rankStr = probeE.getChildText(RANK,ns);

      byte type = Byte.parseByte(typeStr);
      byte rank = Byte.parseByte(rankStr);

      //Set the probe group, if any
      ProbeGroup pg = null;     
      Element groupE = probeE.getChild(PROBE_GROUP,ns);
      if (groupE != null) {
        String groupID = groupE.getAttributeValue(ID,ns);
        Attribute att = groupE.getAttribute(TARGET_GROUP,ns);
        TargetGroup tg = null;
        if (att!=null) {
          String tGroupID = att.getValue();
          tg = targetGroups.get(tGroupID);
        }
        pg = probeGroups.get(groupID);
        if (pg != null) {
          pg = new ProbeGroup(tg,groupID);
          probeGroups.put(groupID, pg);
        }
      }     

      //TSSPair
      Element tssPairE = probeE.getChild(TSS_PAIR,ns);     
      String targetID = tssPairE.getAttributeValue(TARGET_ID,ns);
      ProbeMakerTarget target = null;
      try {
        target = project.getTargets().getSequenceByID(targetID);
      }
      catch (IDNotFoundException e) {
        //target=null;
      }

      Map<String, PropertyAcceptorNucleotideSequence> tssMap = new HashMap<String, PropertyAcceptorNucleotideSequence>();
      for (Iterator<?> i2 = tssPairE.getChildren(TSS,ns).iterator();i2.hasNext();) {
        Element tssE = (Element) i2.next();
        String key = tssE.getAttributeValue("key",ns);         //$NON-NLS-1$
        String tssID = tssE.getAttributeValue(ID,ns);
        String tssTypeStr = tssE.getChildText(TYPE,ns);
        String tssSeqStr = tssE.getChildText(SEQUENCE,ns);
        String tmStr = tssE.getChildText(TM,ns);
        PropertyAcceptorNucleotideSequence tss = ProbeMakerSequenceFactory.createTSS(
            new SimpleNucleotideSequence(tssID, tssSeqStr, Byte.parseByte(tssTypeStr)),
            targetID);
        ProbeMakerPropertyUtils.setHybridizationTemp(tss,Float.parseFloat(tmStr));       
        addMessagesFromElement(tss,tssE.getChild("messageList",ns)); //$NON-NLS-1$
        tssMap.put(key,tss);       
     

      PropertyAcceptorNucleotideSequence five = null;
      PropertyAcceptorNucleotideSequence three = null;
      five = tssMap.get(TSSPair.KEY_FIVE_PRIME);
      three = tssMap.get(TSSPair.KEY_THREE_PRIME);     
      TSSPair tssP = ProbeMakerSequenceFactory.createTSSPair(five,three,target);
      addMessagesFromElement(tssP,tssPairE.getChild("messageList",ns)); //$NON-NLS-1$

      //Tags
      int upstream = -1;
      int downstream = -1;
      Map<NucleotideSequence,SequenceDB<? extends NucleotideSequence>> tags = new LinkedHashMap<NucleotideSequence, SequenceDB<? extends NucleotideSequence>>();     
      Collection<?> subEList = probeE.getChild(SUB_SEQUENCES,ns).getChildren();
      Element[] subEs = subEList.toArray(new Element[subEList.size()]);
      for (int pos = 0;pos<subEs.length;pos++) {
        if (subEs[pos].getName().equals(TSS)) {
          if (upstream == -1) {
            upstream = pos;
          }
          else if (downstream == -1) {
            downstream = subEs.length - pos - 1;
          }
          else {
            throw new IllegalArgumentException("Only two TSSs per probe allowed"); //$NON-NLS-1$
          }
        }
        else if (subEs[pos].getName().equals(TAG_ID)) {
          String tagID = subEs[pos].getAttributeValue(ID,ns);
          KeyValue kv = getLibraryTag(tagSettings.getTagLibraries(),tagID);
          if (kv != null) {
            NucleotideSequence tag = (NucleotideSequence) kv.getKey();
            SequenceDB<NucleotideSequence> lib = (SequenceDB<NucleotideSequence>) kv.getValue();
            tags.put(tag,lib);
          }
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.