Changeset 665


Ignore:
Timestamp:
Apr 17, 2008, 12:46:13 AM (15 years ago)
Author:
Jari Häkkinen
Message:

Added support for using configurable columns. Useful if BASE extra values are used for intensity and background SD.

Location:
plugins/base1/se.lu.thep.wenni/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • plugins/base1/se.lu.thep.wenni/trunk/INSTALL

    r593 r665  
    55Copyright (C) 2005, 2006 Jari Häkkinen, Peter Johansson
    66Copyright (C) 2007 Peter Johansson
     7Copyright (C) 2008 Jari Häkkinen
    78
    89This file is part of WeNNI,
     
    3435stand-alone. The base2 mode is default and the mode you should use if
    3536you plan on running WeNNI as plugin to BASE2. The base1 mode is the
    36 old (classic) mode similar WeNNI 0.6 (or earlier). This is the mode
     37old (classic) mode similar to WeNNI 0.6 (or earlier). This is the mode
    3738you should use if you plan on using WeNNI as a plugin to BASE1. The
    3839stand-alone mode is intended for you who want to use the WeNNI
     
    6869installed in `<DIR>/se/lu/thep/wenni/`. Default `DIR` is set to
    6970`path/to/base/www/plugins/`. You may use `with-gsl=DIR` to provide
    70 information on GSL location. The option `enable-debug` turns on debug
     71information on GSL location. The option `enable-debug` turns on debug
    7172options on the compilation of binary `nni` (e.g. enables assertions).
    7273
     
    246247   above. If you prefer to make the change in the file you should
    247248   manipulate the line looking like
     249
    248250         'execName        thep.lu.se/jari/wenni/wenni.pl'
    249251
     252   If you want use other than the default fields for intensity1,
     253   intensity2, BCh1SD, and BCh2SD, you need to indicate this in the
     254   WeNNIParams section of the plug-in definition file. Change the 5th
     255   column of parameters 4 through 7 appropriately, i.e., if the
     256   standard deviation is defined in another column than the default
     257   change lines 6 and 7:
     258
     259      6 h BCh1SD    30  _xc_BCh1SD    0
     260      7 h BCh2SD    30  _xc_BCh2SD    0
     261
    250262
    251263viii) Now you should go to the README file.
  • plugins/base1/se.lu.thep.wenni/trunk/README

    r352 r665  
    55Copyright (C) 2005, 2006 Jari Häkkinen, Peter Johansson
    66Copyright (C) 2007 Peter Johansson
     7Copyright (C) 2008 Jari Häkkinen
    78
    89This file is part of WeNNI,
     
    2627----------------------------------------------------------------------
    2728
    28 This directory contains the 0.7 release of WeNNI.
     29This directory contains the future 0.7 release of WeNNI.
    2930
    3031Send comments, suggestion, complaints, or questions about this
     
    293294   Command syntax:
    294295
    295       wenni.pl --option value < basefile_in.data > basefile_out.dat
     296      wenni.pl --option value < basefile_in.data > basefile_out.data
    296297
    297298   wenni.pl will read options from basefile_in.data, but the settings
  • plugins/base1/se.lu.thep.wenni/trunk/base/base1/base_plugin_script/plugin_WeNNI.base.in

    r340 r665  
    22222 f beta  Beta  30  0.6   0
    23233 i neighbours  Neighbours  30  4   0
     244 h intensity1    30  intensity1    0
     255 h intensity2    30  intensity2    0
     266 h BCh1SD    30  BCh1SD    0
     277 h BCh2SD    30  BCh2SD    0
    2428
  • plugins/base1/se.lu.thep.wenni/trunk/base/base1/base_plugin_script/wenni.pl

    r115 r665  
    2929sub basefile_options($$);
    3030sub BaseFileConverter($);
    31 sub cleanup($);
     31sub cleanup($$);
    3232sub cmdline_options($);
    3333sub nni($);
    34 sub NNIFileConverter($$);
     34sub NNIFileConverter($);
    3535sub result($$);
    3636
     
    4949# determine beta and number of neighbours. Presedence order is (low to
    5050# high priority): default value, basefile value, command line value.
    51 my %option=( beta => 0.6, datatype => "derived",
    52              neighbours => 4, nodelete => 0 );
     51my %option=(
     52    beta => 0.6,
     53    datatype => "derived",
     54    intensity1 => "intensity1",
     55    intensity2 => "intensity2",
     56    neighbours => 4,
     57    nodelete => 0,
     58    BCh1SD => "BCh1SD",
     59    BCh2SD => "BCh2SD"
     60    );
    5361basefile_options(\%option,$basefile);
    5462foreach my $key (keys %cmdline_option) {
     
    5967}
    6068
    61 BaseFileConverter($option{'datatype'});
    62 NNIFileConverter($option{'beta'},$option{'datatype'});
     69BaseFileConverter(\%option);
     70NNIFileConverter(\%option);
    6371nni($option{'neighbours'});
    64 result($basefile,$option{'datatype'});
     72result($basefile,\%option);
    6573if (!$option{'nodelete'}) {
    66     cleanup($basefile);
     74    cleanup($basefile,\%option);
    6775}
    6876
     
    92100
    93101sub BaseFileConverter($) {
    94     my $datatype=$_[0];
     102    my $option=$_[0];
    95103    my $command="$FindBin::Bin/BaseFileConverter";
    96104    $command.=" BASEfile.data";
    97105    $command.=" wenni_";
    98     if ($datatype eq "derived") {
    99       $command.=" -assayFields intensity1";
    100       $command.=" -assayFields intensity2";
     106    if ($option{"datatype"} eq "derived") {
     107      $command.=" -assayFields $$option{intensity1}";
     108      $command.=" -assayFields $$option{intensity2}";
    101109    }
    102110    else {
     
    106114      $command.=" -assayFields BCh2Mean";
    107115    }
    108     $command.=" -assayFields BCh1SD";
    109     $command.=" -assayFields BCh2SD";
     116    $command.=" -assayFields $$option{BCh1SD}";
     117    $command.=" -assayFields $$option{BCh2SD}";
    110118    return system("$command");
    111119}
    112120
    113 sub cleanup($) {
     121sub cleanup($$) {
    114122    my $basefile=$_[0];
     123    my $option=$_[1];
    115124    unlink($basefile);
    116125    unlink("wenni_BCh1Mean.data");
    117     unlink("wenni_BCh1SD.data");
     126    unlink("wenni_$$option{BCh1SD}.data");
    118127    unlink("wenni_BCh2Mean.data");
    119     unlink("wenni_BCh2SD.data");
     128    unlink("wenni_$$option{BCh2SD}.data");
    120129    unlink("wenni_FCh1Mean.data");
    121130    unlink("wenni_FCh2Mean.data");
    122131    unlink("wenni_imputed.data");
    123     unlink("wenni_intensity1.data");
    124     unlink("wenni_intensity2.data");
     132    unlink("wenni_$$option{intensity1}.data");
     133    unlink("wenni_$$option{intensity2}.data");
    125134    unlink("wenni_logratio.data");
    126135    unlink("wenni_weight.data");
     
    187196}
    188197
    189 sub NNIFileConverter($$) {
    190     my $beta=$_[0];
    191     my $datatype=$_[1];
     198sub NNIFileConverter($) {
     199    my $option=$_[0];
    192200    my $command="$FindBin::Bin/NNIFileConverter";
    193     $command.=" -beta $beta";
    194     if ($datatype eq "derived") {
    195       $command.=" -fg1 wenni_intensity1.data";
    196       $command.=" -fg2 wenni_intensity2.data";
     201    $command.=" -beta $$option{'beta'}";
     202    if ($$option{'datatype'} eq "derived") {
     203      $command.=" -fg1 wenni_$$option{intensity1}.data";
     204      $command.=" -fg2 wenni_$$option{intensity2}.data";
    197205      $command.=" -datatype derived";
    198206    }
     
    204212        $command.=" -datatype raw";
    205213    }
    206     $command.=" -bgstd1 wenni_BCh1SD.data";
    207     $command.=" -bgstd2 wenni_BCh2SD.data";
     214    $command.=" -bgstd1 wenni_$$option{BCh1SD}.data";
     215    $command.=" -bgstd2 wenni_$$option{BCh2SD}.data";
    208216    $command.=" -logratio wenni_logratio.data";
    209217    $command.=" -weight wenni_weight.data";
     
    213221sub result($$) {
    214222    my $basefile=$_[0];
    215     my $datatype=$_[1];
     223    my $option=$_[1];
     224    my $datatype=$$option{'datatype'};
    216225    print "BASEfile\n";
    217226    print "section\tspots\n";
     
    255264    }
    256265    else {
    257         open(F1FILE,"<wenni_intensity1.data");
    258         open(F2FILE,"<wenni_intensity2.data");
     266        open(F1FILE,"<wenni_$$option{intensity1}.data");
     267        open(F2FILE,"<wenni_$$option{intensity2}.data");
    259268    }
    260269    while (<IMPUTEFILE>) {
Note: See TracChangeset for help on using the changeset viewer.