Changeset 548


Ignore:
Timestamp:
Jan 22, 2008, 10:42:12 AM (13 years ago)
Author:
mbayer
Message:

new page added to gather additional info needed for autogeneration of t2m file

Location:
branches/uk_ac_ebi_Tab2MageImporter
Files:
3 added
12 edited

Legend:

Unmodified
Added
Removed
  • branches/uk_ac_ebi_Tab2MageImporter/TODO.txt

    r547 r548  
    11- naming of plugin and classes?
    2 - sort out copy right and ownership issues
     2- sort out copyright and ownership issues
    33- check in Charles' code
    44- implement more complex use cases (pooling, dyeswap, no ref sample)
    55- status report does not get written in all cases
     6- add support for users using their own name bases for samples and perhaps extracts
     7- adapt no of rows in table in mappings.jsp so it matches the correct number required
     8- error handling, checks and validation
     9- throw an error if dye-swap and reference set both to yes
     10- if pooling, include a pooling protocol in the pooling section
     11- implement failure conditions i.e. unsupported cases
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/configureImporter.jsp

    r547 r548  
    148148<input type="hidden"name="parameter:mappingsMode" value="<%=inputDataBean.getMappingsMode()%>" />
    149149<input type="hidden"name="parameter:spreadSheetMappings" value="<%= inputDataBean.getSpreadSheetMappings()%>"/>
     150<input type="hidden"name="parameter:samplePairing" value="<%= inputDataBean.getSamplePairing()%>"/>
     151<input type="hidden"name="parameter:timeCourse" value="<%= inputDataBean.getTimeCourse()%>"/>
     152<input type="hidden"name="parameter:timePoints" value="<%= inputDataBean.getTimePoints()%>"/>
     153<input type="hidden"name="parameter:proceed" value="<%= inputDataBean.getProceed()%>"/>
    150154
    151155<input type="hidden"name="parameter:fileList" value=""/>
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/experiment.jsp

    r544 r548  
    3434
    3535<script>
    36 self.resizeTo(800,800);
     36self.resizeTo(800,1100);
    3737</script>
    3838
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/hybridizations.jsp

    r544 r548  
    178178    <td class="boldText">Number of treatment groups:</td>
    179179    <td class="input"><input type="text" size="3" name="numTreatmentGroups" value="2"/></td>
    180     <td>The number of permutations of factor values. <p>
     180    <td>The number of discrete combinations of factor values, i.e. the product of the number of factor levels(values) from all factors. <p>
    181181    Example: an experiment with 2 factors and 3 factor values in each will have 6 treatment groups (2 X 3).
    182182    </td>
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/mappings.jsp

    r547 r548  
    165165
    166166  //work out the number of hybridizations
     167  String platform = inputDataBean.getPlatform();
     168  //work out whether this is a single or dual channel experiment
     169  boolean singleChannel = false;
     170  if (platform.equalsIgnoreCase("affymetrix"))
     171  {
     172    singleChannel = true;
     173  }
    167174  int numReplicates = Integer.parseInt(inputDataBean.getNumReplicates());
    168175  int numTreatmentGroups = Integer.parseInt(inputDataBean.getNumTreatmentGroups());
    169176  int numTissues = inputDataBean.getTissues().split("\n").length;
    170   int numHybs = Tab2MageWriter.calcNumHybs(numReplicates, numTreatmentGroups, numTissues);
     177  int numHybs = Tab2MageWriter.calcNumHybs(singleChannel,numReplicates, numTreatmentGroups, numTissues);
    171178  System.out.println("numHybs = " + numHybs);
    172179  System.out.println("products.length = " + products.length);
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/submit.jsp

    r547 r548  
    5858    "hybridizationProtocolParams","scanningProtocolParams","platform","organism",
    5959    "numDesigns","dyeSwap","refSample","numTreatmentGroups","expFactors","numReplicates",
    60     "tissues","pooling","path"};
     60    "tissues","pooling","path","samplePairing","timeCourse","timePoints"};
    6161   
    6262    String [] friendlyNames = new String []{"Domain","Accession","Quality Control","Experimental Design",
    6363    "Experiment Name","Description","Release Date","Submission Date","Submitter","Organization",
    64     "Publication Title","Authors","Journal","Volume","Issue","Pages","Year","Pubmed ID","Treatment SProtocol",
     64    "Publication Title","Authors","Journal","Volume","Issue","Pages","Year","Pubmed ID","Treatment Protocol",
    6565    "Extraction Protocol","Labeling Protocol","Hybridization Protocol","Scanning Protocol",
    6666    "Treatment Protocol Parameters","Extraction Protocol Parameters","Labeling Protocol Parameters",
    6767    "Hybridization Protocol Parameters","Scanning Protocol Parameters","Platform","Organism",
    6868    "Number of Array Designs","Dye Swap","Reference Sample","Number of Treatment Groups","Experimental Factors","Number of Replicates per Group",
    69     "Tissues","Pooling","Zip File"};
     69    "Tissues","Pooling","Zip File","Sample Pairing Rationale","Time Course","Time Points"};
    7070
    7171  //print out all relevant parameter values in the bean
     
    149149<input type="hidden"name="parameter:mappingsMode" value="<%=inputDataBean.getMappingsMode()%>" />
    150150<input type="hidden"name="parameter:spreadSheetMappings" value="<%= inputDataBean.getSpreadSheetMappings()%>"/>
     151<input type="hidden"name="parameter:samplePairing" value="<%= inputDataBean.getSamplePairing()%>"/>
     152<input type="hidden"name="parameter:timeCourse" value="<%= inputDataBean.getTimeCourse()%>"/>
     153<input type="hidden"name="parameter:timePoints" value="<%= inputDataBean.getTimePoints()%>"/>
     154<input type="hidden"name="parameter:proceed" value="<%= inputDataBean.getProceed()%>"/>
    151155
    152156<input type="hidden"name="parameter:fileList" value=""/>
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/userchoice2.jsp

    r543 r548  
    4141  if(document.getElementById("legacyDataNo").checked)
    4242  {
    43     form.action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/submit.jsp?ID=<%=ID%>";
     43    form.action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/autogenerate.jsp?ID=<%=ID%>";
    4444  }
    4545
     
    8484<p>If you choose 'yes' you will be asked for mappings between filenames, samples and factor value combinations on the next pages.
    8585</p>
    86 <p>If you choose 'no' the Tab2MAGE importer will autogenerate names for files and samples on your behalf and proceed with the import automatically.
     86<p>If you choose 'no' the Tab2MAGE importer will autogenerate names for files and samples on your behalf.
    8787</p>
    8888
  • branches/uk_ac_ebi_Tab2MageImporter/src/uk/ac/ebi/nugo/plugins/DataBean.java

    r547 r548  
    5555  public String mappingsMode;
    5656  public String spreadSheetMappings;
     57  public String samplePairing;
     58  public String timeCourse;
     59  public String timePoints;
     60  public String proceed;
    5761 
    5862  public DataBean()
     
    468472    this.spreadSheetMappings = spreadSheetMappings;
    469473  }
     474
     475  public String getProceed()
     476  {
     477    return proceed;
     478  }
     479
     480  public void setProceed(String proceed)
     481  {
     482    this.proceed = proceed;
     483  }
     484
     485  public String getSamplePairing()
     486  {
     487    return samplePairing;
     488  }
     489
     490  public void setSamplePairing(String samplePairing)
     491  {
     492    this.samplePairing = samplePairing;
     493  }
     494
     495  public String getTimeCourse()
     496  {
     497    return timeCourse;
     498  }
     499
     500  public void setTimeCourse(String timeCourse)
     501  {
     502    this.timeCourse = timeCourse;
     503  }
     504
     505  public String getTimePoints()
     506  {
     507    return timePoints;
     508  }
     509
     510  public void setTimePoints(String timePoints)
     511  {
     512    this.timePoints = timePoints;
     513  }
    470514 
    471515 
  • branches/uk_ac_ebi_Tab2MageImporter/src/uk/ac/ebi/nugo/plugins/Tab2MageImporter.java

    r547 r548  
    9999    "numDesigns","dyeSwap","refSample","numTreatmentGroups","expFactors","numReplicates",
    100100    "tissues","pooling","path", "subjectNames", "fileList", "subjectList", "tissueList","combinationList", "useWizard",
    101     "legacyData","mappingsMode","spreadSheetMappings"};
     101    "legacyData","mappingsMode","spreadSheetMappings","samplePairing","timeCourse","timePoints","proceed"};
    102102
    103103
  • branches/uk_ac_ebi_Tab2MageImporter/src/uk/ac/ebi/nugo/plugins/Tab2MageWriter.java

    r547 r548  
    2626  String t2mContent = "";
    2727  ParameterValues job;
     28  boolean singleChannel = false;
     29 
    2830  String[] paramNames;
    29 
    3031  String[] factorNames;
    3132  String [] fileNames;
     
    8283  public String mappingsMode;
    8384  public String spreadSheetMappings;
     85  public String samplePairing;
     86  public String timeCourse;
     87  public String timePoints;
     88  public String proceed;
    8489
    8590
     
    122127      }
    123128
    124       //this extracts the individaul factor names from the String that comes from the web page
     129      //work out whether this is a single or dual channel experiment
     130      if (platform.equalsIgnoreCase("affymetrix"))
     131      {
     132        singleChannel = true;
     133      }
     134      //this extracts the individual factor names from the String that comes from the web page
    125135      extractFactorNames();
    126136      //now extract the factor values and store them suitably so we can access them
     
    182192      combinations = new String [entries.length][];
    183193     
     194      //now populate the 2d array of factor value combinations as above
    184195      for (int i = 0; i < entries.length; i++)
    185196      {
     
    319330    t2mContent += "\n";
    320331
    321     //determine whether this is a single or dual channel experiment
    322     boolean singleChannel = false;
     332
    323333    //the number of times we have to print the block of data below
    324334    //with dual channel platforms we have to print each block (row) twice
    325335    int numPrintRepeats = 2;
    326     if (platform.equalsIgnoreCase("affymetrix"))
    327     {
    328       singleChannel = true;
     336    if (singleChannel)
     337    {     
    329338      numPrintRepeats = 1;
    330339    }
    331340
    332 
    333341    //we need a single record for each tissue in each subject here
    334 
    335342    int count = 1;
    336 
    337343    int numSubjects = Integer.parseInt(numReplicates);
    338344    String[] allTissues = tissues.split(",");
     
    518524  // -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    519525
    520   public static int calcNumHybs(int numReplicates, int numTreatmentGroups, int numTissues)
    521   {
    522     // Number of hybridizations (NH) = Number of subjects (NS) x
    523     // Number of Target Tissue (NTT) x Number of Study groups (NSG)
    524     return numReplicates * numTissues * numTreatmentGroups;
     526  public static int calcNumHybs(boolean dyeSwap, boolean pooling, int numDesigns, int numReplicates, int numTreatmentGroups, int numTissues)
     527  {
     528    int numHybs = 0;
     529
     530    /*
     531    Basic assumption:
     532      no pooling, one source ->one sample->one extract->one labeled extract->one hyb
     533      Number of hybridizations (NH) = Number of subjects (NS) x Number of Target Tissue (NTT) x Number of Study groups (NSG)
     534     */
     535    numHybs = numReplicates * numTissues * numTreatmentGroups;
     536
     537    //a number of conditions can then modify the basic number of hybs:
     538
     539    //dye swap results in twice the number of hybs
     540    //NHdye-swap=2 x NH
     541    if(dyeSwap)
     542    {     
     543      numHybs = numHybs *2;
     544    }
     545   
     546    //if several array designs are used all hybs must be applied to each of them
     547    //NHmultiple designs=Nad x NH
     548    if(numDesigns > 1)
     549    {
     550      numHybs = numHybs * numDesigns;
     551    }
     552   
     553    //pooling reduces the number of hybs as the biological replication gets cancelled out
     554    //NH(if pooling)= NH/Number of subjects (NS)
     555    if(pooling)
     556    {
     557      numHybs = numHybs/numReplicates;
     558    }
     559
     560
     561
     562    return numHybs;
    525563  }
    526564
Note: See TracChangeset for help on using the changeset viewer.