Changeset 4566


Ignore:
Timestamp:
Apr 28, 2015, 1:15:50 PM (7 years ago)
Author:
Fredrik Levander
Message:

Refs #821. Introducing choice between apex intensities and integrated intensities in feature report.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/servlet/src/org/proteios/action/feature/CreateFeatureComparisonJob.java

    r4539 r4566  
    5656  public static final VInteger VMINSAMPLESWITHVALUES = new VInteger("minSamples", 0, 10000, true);
    5757  public static final VBoolean VIDENTIFIEDONLY = new VBoolean("isIdentifiedOnly", false);
     58  public static final VBoolean VUSEINTEGRATED = new VBoolean("useIntegrated", false);
    5859 
    5960  /*
     
    7475    String filename = getValidString(VFILENAME);
    7576    Integer minSamplesWithValues = getValidInteger(VMINSAMPLESWITHVALUES);
     77    Boolean useIntegrated = getValidBoolean(VUSEINTEGRATED);
     78    if (useIntegrated == null)
     79      useIntegrated = new Boolean(false);
    7680    Boolean isIdentifiedOnly = getValidBoolean(VIDENTIFIEDONLY);
    7781    if (isIdentifiedOnly == null)
     
    106110    job.setParameterValue("filename", new StringParameterType(), filename);
    107111    job.setParameterValue("minSamplesWithValues", new IntegerParameterType(), minSamplesWithValues);
     112    job.setParameterValue("useIntegratedIntensity", new BooleanParameterType(), useIntegrated);
    108113    job.setParameterValue("identifiedOnly", new BooleanParameterType(),isIdentifiedOnly);
    109114    job.setName("Compare features");
    110     job.setDescription("Project:" + project+ ", outfile:"+filename+", identified only:"+isIdentifiedOnly+", min samples with values:"+minSamplesWithValues);
     115    job.setDescription("Project:" + project+ ", outfile:"+filename+", integrated intensities:"+useIntegrated+", identified only:"+isIdentifiedOnly+", min samples with values:"+minSamplesWithValues);
    111116    dc.saveItem(job);
    112117    dc.commit();
  • trunk/client/servlet/src/org/proteios/action/feature/FeatureComparisonForm.java

    r4539 r4566  
    5252    minF.setHelp("Only report feature with values in at least this number of samples");
    5353    properties.add(minF);
     54    Checkbox<VBoolean> useIntegrated = new Checkbox<VBoolean>(
     55        CreateFeatureComparisonJob.VUSEINTEGRATED);
     56    useIntegrated.setLabel("IntegratedIntensity");
     57    useIntegrated.setValue("true");
     58    useIntegrated.isChecked(true);
     59    useIntegrated.setHelp("Check to use integrated (summed) intensity values. Otherwise apex intensities are used");
     60    properties.add(useIntegrated);
    5461    Checkbox<VBoolean> isIdentifiedOnly = new Checkbox<VBoolean>(
    5562        CreateFeatureComparisonJob.VIDENTIFIEDONLY);
  • trunk/plugin/src/org/proteios/plugins/FeatureComparison.java

    r4560 r4566  
    8181    private Integer minSamples = 1;
    8282    private Boolean identifiedOnly = false;
     83    private Boolean useIntegratedIntensity = true;
    8384
    8485  public MainType getMainType()
     
    9192  {
    9293    return new AboutImpl("Feature Comparison Report",
    93       "Generate table with feature comparison", "0.3",
    94       "2012-2103, Immunotechnology, Lund University", null, null,
     94      "Generate table with feature comparison", "0.4",
     95      "2012-2015, Immunotechnology, Lund University", null, null,
    9596      "http://www.proteios.org  ");
    9697  }
     
    121122      minSamples = (Integer) job.getValue("minSamplesWithValues");
    122123      identifiedOnly = ((Boolean) job.getValue("identifiedOnly")).booleanValue();
     124      useIntegratedIntensity = ((Boolean) job.getValue("useIntegratedIntensity")).booleanValue();
    123125      ItemFactory factory = new ItemFactory(dc);
    124126      File outCoreFile = factory.create(File.class);
     
    134136      // Write report header
    135137      writer.println("Feature Comparison Report");
    136       writer.println("Minimum samples with values:"+minSamples+". Only writing features with assigned identitites:"+identifiedOnly);
     138      writer.println("Minimum samples with values:"+minSamples+". Only writing features with assigned identitites:"+identifiedOnly+". Using integrated intensity values (otherwise apex intensities):"+useIntegratedIntensity);
    137139      writer
    138140        .println("File generated by Proteios SE " + proteiosVersion + " build " + proteiosBuildNumber + " (" + timestamp + ")");
     
    264266      if (values[msFiles.indexOf(feature.getMsFile())] == null)
    265267      {
    266         values[msFiles.indexOf(feature.getMsFile())] = feature
    267           .getIntegratedIntensity();
     268        values[msFiles.indexOf(feature.getMsFile())] = useIntegratedIntensity ? feature
     269          .getIntegratedIntensity() : feature.getApexIntensity();
    268270        nEntries++;
    269271      }
    270272      else
    271273      {
    272         values[msFiles.indexOf(feature.getMsFile())] += feature
    273           .getIntegratedIntensity().floatValue();
     274        if (useIntegratedIntensity)
     275        {
     276          values[msFiles.indexOf(feature.getMsFile())] += feature.getIntegratedIntensity().floatValue();
     277        }
     278        else
     279        {
     280          values[msFiles.indexOf(feature.getMsFile())] = Math.max(values[msFiles.indexOf(feature.getMsFile())],feature.getApexIntensity());
     281        }
    274282      }
    275283      nValues++;
     
    309317            if (featureRow.values[i] != null)
    310318            {
    311               featureRow.values[i] += values[i];
     319              if (useIntegratedIntensity)
     320              {
     321                featureRow.values[i] += values[i];
     322              }
     323              else
     324              {
     325                featureRow.values[i] = Math.max(values[i], featureRow.values[i]);
     326              }
    312327            }
    313328            else
Note: See TracChangeset for help on using the changeset viewer.