Changeset 525


Ignore:
Timestamp:
Dec 21, 2007, 1:27:55 PM (13 years ago)
Author:
mbayer
Message:
  • basic Affy support implemented
  • next steps required now: mappings filenames to factor values, annotation handling, more complex two channel experiments (dye swaps, no ref sample)
Location:
branches/uk_ac_ebi_Tab2MageImporter
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/experiment.jsp

    r524 r525  
    119119 
    120120
    121 <h2>Tab2MAGE Importer -- Your Experiment</h2>
     121<h1>Tab2MAGE Importer -- Your Experiment</h1>
    122122Page 1 of 3
    123123<p>
     
    375375      <td class="boldText">Experiment Description:</td>
    376376      <td class="input"><textarea rows="4" cols="30"
    377         name="description">description goes here</textarea></td>
     377        name="description">This is a totally contrived example experiment.</textarea></td>
    378378      <td class="helpText">A short paragraph describing the purpose of the experiment.</td>
    379379    </tr>
     
    454454      <td class="plainLabel" style="border-style: none;">Pages:</td>
    455455      <td class="input" style="border-style: none;"><input type="text" size="10" name="pages"
    456         value="1234-1235" /></td>
     456        value="123-135" /></td>
    457457      <td style="border-style: none;"></td>
    458458    </tr>
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/hybridizations.jsp

    r524 r525  
    122122<input type="hidden" name="parameter:zipFile" value=""  id="zipFile">
    123123
    124 <h2>Tab2MAGE Importer -- Your Hybridizations</h2>
     124<h1>Tab2MAGE Importer -- Your Hybridizations</h1>
    125125Page 3 of 3
    126126<p>
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/protocols.jsp

    r524 r525  
    121121<input type="hidden" name="ID" value="<%=ID%>">
    122122
    123 <h2>Tab2MAGE Importer -- Your Protocols</h2>
     123<h1>Tab2MAGE Importer -- Your Protocols</h1>
    124124Page 2 of 3
    125125<p>
  • branches/uk_ac_ebi_Tab2MageImporter/src/uk/ac/ebi/nugo/plugins/Tab2MageWriter.java

    r521 r525  
    1616
    1717  Directory dir;
     18
    1819  SessionControl sc;
    1920  String t2mContent = "";
    2021  ParameterValues job;
    2122  String[] paramNames;
    22 
     23 
    2324  String domain;
    2425  String accession;
     
    8182  // ===================================================methods================================================
    8283
    83   // sets all the values of the local variables to those found in the job object
     84  // sets all the values of the local variables to those found in the job
     85  // object
    8486  private void initJobParamValues()
    8587  {
     
    144146    // section needs to look like this:
    145147    /*
    146      * accession name text parameters type P-DIET-1 treatment text grow P-EXTR-1 extraction text extraction P-LABL-1 labeling text labeling P-HYBR-1 hybridization text hybridization
     148     * accession name text parameters type P-DIET-1 treatment text
     149     * grow P-EXTR-1 extraction text extraction P-LABL-1 labeling
     150     * text labeling P-HYBR-1 hybridization text hybridization
    147151     * P-SCAN-1 scanning text scanning
    148152     */
     
    178182    // header for this section
    179183    t2mContent += "Hybridization section\n";
    180    
     184
    181185    // print column headers for the section
    182     String [] colHeaders  = new String [] {"File[raw]","Array[accession]","BioSource","BioMaterialCharacteristics[Organism]","BioMaterialCharacteristics[OrganismPart]","BioMaterialCharacteristics[CellType]","Sample","Protocol[grow]","Extract","Protocol[extraction]","LabeledExtract","Protocol[labeling]","Dye","Hybridization","Protocol[hybridization]","Scan","Protocol[scanning]","FactorValue[Treatment Type]"};
     186    String[] colHeaders = new String[]
     187    { "File[raw]", "Array[accession]", "BioSource", "BioMaterialCharacteristics[Organism]",
     188            "BioMaterialCharacteristics[OrganismPart]",
     189            "BioMaterialCharacteristics[CellType]", "Sample", "Protocol[grow]",
     190            "Extract", "Protocol[extraction]", "LabeledExtract",
     191            "Protocol[labeling]", "Dye", "Hybridization",
     192            "Protocol[hybridization]", "Scan", "Protocol[scanning]",
     193            "FactorValue[Treatment Type]" };
    183194    for (int i = 0; i < colHeaders.length; i++)
    184195    {
     
    187198    t2mContent += "\n";
    188199
    189 
    190 // //////////////////////////////////////////////////////////////////////////////////////////////////////////
    191 
    192 
    193     int count = 1;
    194    
    195     int numSubjects = Integer.parseInt(numReplicates);
    196     String [] allTissues = tissues.split(",");
    197     int numTissues = allTissues.length;
    198     int numGroups = Integer.parseInt(numTreatmentGroups);
    199    
    200     // for each treatment group
    201     for(int i = 1; i<= numGroups; i++)
    202     {
    203       int subjectCount=0;
    204       // for each subject within each group
    205       for(int j=1; j <= numSubjects; j++)
     200    //single channel data -- currently only Affy
     201    //we only need a single record for each tissue in each subject here
     202    if (platform.equalsIgnoreCase("affymetrix"))
     203    {
     204      int count = 1;
     205
     206      int numSubjects = Integer.parseInt(numReplicates);
     207      String[] allTissues = tissues.split(",");
     208      int numTissues = allTissues.length;
     209      int numGroups = Integer.parseInt(numTreatmentGroups);
     210
     211      // for each treatment group
     212      for (int i = 1; i <= numGroups; i++)
    206213      {
    207         subjectCount = (i-1)*numSubjects+j;
    208         // for each target tissue
    209         for(int k= 1; k<=numTissues; k++)
    210         {
    211           //this whole first block prints the data for the first channel
    212          
    213           // file count first
    214           t2mContent += "file" + count + ".gpr" + "\t" +
    215           // accession no. i.e the array design
    216           accession + "\t" +
    217           // bio source
    218           "group-" + i + "-subject-" + subjectCount  + "\t" +
    219           // BioMaterialCharacteristics[Organism]
    220           organism  + "\t" +
    221           // BioMaterialCharacteristics[OrganismPart]
    222           allTissues[k-1]  + "\t" +
    223           // BioMaterialCharacteristics[CellType]
    224           ""   + "\t" +
    225           // sample
    226           "group-" + i + "-subject-" + subjectCount + ".sample-" + k + "\t" +
    227           // Protocol[grow]
    228           "P-DIET-1" + "\t" +
    229           // Extract
    230           "group-" + i + "-subject-" + subjectCount + ".sample-" + k  + "-extract" + "\t" +
    231           // Protocol[extraction]
    232           "P-EXTR-1"  + "\t" +
    233           // LabeledExtract
    234           "group-" + i + "-subject-" + subjectCount + ".sample-" + k  + "-extract-le" + "\t" +
    235           // Protocol[labeling]
    236           "P-LABL-1" + "\t" +
    237           // Dye
    238           "Cy3"+ "\t" +
    239           // Hybridization
    240           "hybridization-" + count + "\t" +
    241           // Protocol[hybridization]
    242           "P-HYBR-1" + "\t" +
    243           // Scan
    244           "scan-" + count  + "\t" +
    245           // Protocol[scanning]
    246           "P-SCAN-1" + "\t" +
    247           // FactorValue[Treatment Type]
    248           "trt_group" + i + "\t";
    249          
    250           //new line
    251           t2mContent += "\n";
    252          
    253           //the second block prints the data for the second channel
    254          
    255           // file count first
    256           t2mContent += "file" + count + ".gpr" + "\t" +
    257           // accession no. i.e the array design
    258           accession + "\t" +
    259           // bio source
    260           "reference" + "\t" +
    261           // BioMaterialCharacteristics[Organism]
    262           organism  + "\t" +
    263           // BioMaterialCharacteristics[OrganismPart]
    264           "multi-tissue"  + "\t" +
    265           // BioMaterialCharacteristics[CellType]
    266           "multi-cell type"   + "\t" +
    267           // sample
    268           "reference" + "\t" +
    269           // Protocol[grow]
    270           "P-DIET-1" + "\t" +
    271           // Extract
    272           "reference" + "\t" +
    273           // Protocol[extraction]
    274           "P-EXTR-1"  + "\t" +
    275           // LabeledExtract
    276           "reference" + "\t" +
    277           // Protocol[labeling]
    278           "P-LABL-1" + "\t" +
    279           // Dye
    280           "Cy5"+ "\t" +
    281           // Hybridization
    282           "h" + count + "\t" +
    283           // Protocol[hybridization]
    284           "P-HYBR-1" + "\t" +
    285           // Scan
    286           "scan-" + count  + "\t" +
    287           // Protocol[scanning]
    288           "P-SCAN-1" + "\t" +
    289           // FactorValue[Treatment Type]
    290           "reference" + "\t" ;
    291          
    292           //new line
    293           t2mContent += "\n";
    294          
    295           count++;
     214        int subjectCount = 0;
     215        // for each subject within each group
     216        for (int j = 1; j <= numSubjects; j++)
     217        {
     218          subjectCount = (i - 1) * numSubjects + j;
     219          // for each target tissue
     220          for (int k = 1; k <= numTissues; k++)
     221          {
     222
     223            // file count first
     224            t2mContent += "file" + count + ".CEL" + "\t" +
     225            // accession no. i.e the array
     226            // design
     227            accession + "\t" +
     228            // bio source
     229            "group-" + i + "-subject-" + subjectCount + "\t" +
     230            // BioMaterialCharacteristics[Organism]
     231            organism + "\t" +
     232            // BioMaterialCharacteristics[OrganismPart]
     233            allTissues[k - 1] + "\t" +
     234            // BioMaterialCharacteristics[CellType]
     235            "" + "\t" +
     236            // sample
     237            "group-" + i + "-subject-" + subjectCount + ".sample-" + k + "\t" +
     238            // Protocol[grow]
     239            "P-DIET-1" + "\t" +
     240            // Extract
     241            "group-" + i + "-subject-" + subjectCount + ".sample-" + k + "-extract" + "\t" +
     242            // Protocol[extraction]
     243            "P-EXTR-1" + "\t" +
     244            // LabeledExtract
     245            "group-" + i + "-subject-" + subjectCount + ".sample-" + k + "-extract-le" + "\t" +
     246            // Protocol[labeling]
     247            "P-LABL-1" + "\t" +
     248            // Dye
     249            "biotin" + "\t" +
     250            // Hybridization
     251            "hybridization-" + count + "\t" +
     252            // Protocol[hybridization]
     253            "P-HYBR-1" + "\t" +
     254            // Scan
     255            "scan-" + count + "\t" +
     256            // Protocol[scanning]
     257            "P-SCAN-1" + "\t" +
     258            // FactorValue[Treatment Type]
     259            "trt_group" + i + "\t";
     260
     261            // new line
     262            t2mContent += "\n";
     263            count++;
     264          }
    296265        }
    297266      }
    298267    }
    299    
    300            
    301 // //////////////////////////////////////////////////////////////////////////////////////////////////////////
    302        
     268
     269    else //non Affy data, i.e. two channel
     270    {
     271
     272      int count = 1;
     273
     274      int numSubjects = Integer.parseInt(numReplicates);
     275      String[] allTissues = tissues.split(",");
     276      int numTissues = allTissues.length;
     277      int numGroups = Integer.parseInt(numTreatmentGroups);
     278
     279      // for each treatment group
     280      for (int i = 1; i <= numGroups; i++)
     281      {
     282        int subjectCount = 0;
     283        // for each subject within each group
     284        for (int j = 1; j <= numSubjects; j++)
     285        {
     286          subjectCount = (i - 1) * numSubjects + j;
     287          // for each target tissue
     288          for (int k = 1; k <= numTissues; k++)
     289          {
     290            // this whole first block prints
     291            // the data for the first
     292            // channel
     293
     294            // file count first
     295            t2mContent += "file" + count + ".gpr" + "\t" +
     296            // accession no. i.e the array
     297            // design
     298            accession + "\t" +
     299            // bio source
     300            "group-" + i + "-subject-" + subjectCount + "\t" +
     301            // BioMaterialCharacteristics[Organism]
     302            organism + "\t" +
     303            // BioMaterialCharacteristics[OrganismPart]
     304            allTissues[k - 1] + "\t" +
     305            // BioMaterialCharacteristics[CellType]
     306            "" + "\t" +
     307            // sample
     308            "group-" + i + "-subject-" + subjectCount + ".sample-" + k + "\t" +
     309            // Protocol[grow]
     310            "P-DIET-1" + "\t" +
     311            // Extract
     312            "group-" + i + "-subject-" + subjectCount + ".sample-" + k + "-extract" + "\t" +
     313            // Protocol[extraction]
     314            "P-EXTR-1" + "\t" +
     315            // LabeledExtract
     316            "group-" + i + "-subject-" + subjectCount + ".sample-" + k + "-extract-le" + "\t" +
     317            // Protocol[labeling]
     318            "P-LABL-1" + "\t" +
     319            // Dye
     320            "Cy3" + "\t" +
     321            // Hybridization
     322            "hybridization-" + count + "\t" +
     323            // Protocol[hybridization]
     324            "P-HYBR-1" + "\t" +
     325            // Scan
     326            "scan-" + count + "\t" +
     327            // Protocol[scanning]
     328            "P-SCAN-1" + "\t" +
     329            // FactorValue[Treatment Type]
     330            "trt_group" + i + "\t";
     331
     332            // new line
     333            t2mContent += "\n";
     334
     335            // the second block prints the
     336            // data for the second channel
     337
     338            // file count first
     339            t2mContent += "file" + count + ".gpr" + "\t" +
     340            // accession no. i.e the array
     341            // design
     342            accession + "\t" +
     343            // bio source
     344            "reference" + "\t" +
     345            // BioMaterialCharacteristics[Organism]
     346            organism + "\t" +
     347            // BioMaterialCharacteristics[OrganismPart]
     348            "multi-tissue" + "\t" +
     349            // BioMaterialCharacteristics[CellType]
     350            "multi-cell type" + "\t" +
     351            // sample
     352            "reference" + "\t" +
     353            // Protocol[grow]
     354            "P-DIET-1" + "\t" +
     355            // Extract
     356            "reference" + "\t" +
     357            // Protocol[extraction]
     358            "P-EXTR-1" + "\t" +
     359            // LabeledExtract
     360            "reference" + "\t" +
     361            // Protocol[labeling]
     362            "P-LABL-1" + "\t" +
     363            // Dye
     364            "Cy5" + "\t" +
     365            // Hybridization
     366            "h" + count + "\t" +
     367            // Protocol[hybridization]
     368            "P-HYBR-1" + "\t" +
     369            // Scan
     370            "scan-" + count + "\t" +
     371            // Protocol[scanning]
     372            "P-SCAN-1" + "\t" +
     373            // FactorValue[Treatment Type]
     374            "reference" + "\t";
     375
     376            // new line
     377            t2mContent += "\n";
     378
     379            count++;
     380          }
     381        }
     382      }
     383    }
     384
     385    // //////////////////////////////////////////////////////////////////////////////////////////////////////////
     386
    303387  }
    304388
     
    334418    }
    335419  }
    336  
    337420
    338421  // -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
    375458    int numTreats = Integer.parseInt(numTreatmentGroups);
    376459    int numTissues = tissues.split(",").length;
    377     // Number of hybridizations (NH) = Number of subjects (NS) x Number of Target Tissue (NTT) x Number of Study groups (NSG)
     460    // Number of hybridizations (NH) = Number of subjects (NS) x
     461    // Number of Target Tissue (NTT) x Number of Study groups (NSG)
    378462    return numReps * numTissues * numTreats;
    379463  }
     
    384468  {
    385469    /*
    386     --org Homo_sapiens
    387     --array Agilent1
    388     --single 2
    389     --ref yes
    390     --dye no
    391     --trtgroup 6
    392     --factors compound(aspirin,ibuprofen);dose(none,medium,high)
    393     --target liver,heart,brain
    394     --subject 4
    395     */
    396 
    397     //experiment section
     470     * --org Homo_sapiens --array Agilent1 --single 2 --ref yes
     471     * --dye no --trtgroup 6 --factors
     472     * compound(aspirin,ibuprofen);dose(none,medium,high) --target
     473     * liver,heart,brain --subject 4
     474     */
     475
     476    // experiment section
    398477    experimentId = "2";
    399478    domain = "scri.ac.uk";
     
    415494    year = "2007";
    416495    pubmedId = "11009762";
    417    
    418     //protocols
     496
     497    // protocols
    419498    treatmentProtocol = "my treatment protocol text";
    420499    extractionProtocol = " my extraction protocol text";
     
    427506    hybridizationProtocolParams = "param4";
    428507    scanningProtocolParams = " param5";
    429    
    430     //hybs
    431     platform = "Agilent";
     508
     509    // hybs
     510    platform = "Affymetrix";
    432511    organism = "Homo_sapiens";
    433512    numDesigns = "1";
Note: See TracChangeset for help on using the changeset viewer.