Changeset 643
- Timestamp:
- Apr 9, 2008, 4:14:32 PM (15 years ago)
- Location:
- plugins/base2/uk.ac.ebi.tab2mage/branches/tab2mageimporter
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/base2/uk.ac.ebi.tab2mage/branches/tab2mageimporter/build.xml
r639 r643 69 69 70 70 <target name="copyToServer" depends="build.plugin,copyJSPs"> 71 <copy file="${plugin.name}.jar" todir="${tomcat.home}\webapps\base\ plugins" verbose="false" />72 <copy file="${utils.name}.jar" todir="${tomcat.home}\webapps\base\ plugins" verbose="false" />71 <copy file="${plugin.name}.jar" todir="${tomcat.home}\webapps\base\WEB-INF\lib" verbose="false" /> 72 <copy file="${utils.name}.jar" todir="${tomcat.home}\webapps\base\WEB-INF\lib" verbose="false" /> 73 73 <!-- now restart tomcat to reload the application --> 74 74 <echo message="tomcat home = "/> -
plugins/base2/uk.ac.ebi.tab2mage/branches/tab2mageimporter/jsp/uk/ac/ebi/nugo/plugins/hybridizations.jsp
r639 r643 159 159 <select name="platform"> 160 160 <option onclick="hideTwoChannelQuestions();">Affymetrix</option> 161 <option onclick="showTwoChannelQuestions();" >Agilent</option>161 <option onclick="showTwoChannelQuestions();" selected="selected" >Agilent</option> 162 162 <option onclick="showTwoChannelQuestions();">AIDA</option> 163 163 <option onclick="showTwoChannelQuestions();">BZScan</option> 164 164 <option onclick="showTwoChannelQuestions();">ChipSkipper</option> 165 <option onclick="showTwoChannelQuestions();" selected="selected">GenePix</option>165 <option onclick="showTwoChannelQuestions();" >GenePix</option> 166 166 <option onclick="showTwoChannelQuestions();">GeneTAC</option> 167 167 <option onclick="showTwoChannelQuestions();">Illumina</option> … … 178 178 <tr> 179 179 <td class="boldText">Experimental organism:<font color="red"><b> *</b></font></td> 180 <td class="input"><input type="text" size="50" name="organism" value=" Solanum spp."/></td>180 <td class="input"><input type="text" size="50" name="organism" value="Mus musculus"/></td> 181 181 <td>The full scientific name of the experimental organism used.</td> 182 182 </tr> … … 185 185 <tr> 186 186 <td class="boldText">Number of hybridizations:<font color="red"><b> *</b></font></td> 187 <td class="input"><input type="text" size="3" name="numHybs" value=" 4"/></td>187 <td class="input"><input type="text" size="3" name="numHybs" value="12"/></td> 188 188 <td>The total number of hybridizations in the experiment. <b>Please note: for two-channel experiments there are two hybridizations per chip.</b> 189 189 </td> … … 215 215 <tr> 216 216 <td class="boldText">Target tissues:<font color="red"><b> *</b></font></td> 217 <td class="input"><textarea rows="4" cols="32" name="tissues"> enterocyte</textarea></td>217 <td class="input"><textarea rows="4" cols="32" name="tissues">heart</textarea></td> 218 218 <td>List all target tissues -- one per line, in no particular order, each tissue once only.</td> 219 219 </tr> … … 228 228 <tr class="noBorder" > 229 229 230 <td style="vertical-align: middle;border-style: none;"><input type="text" name="path" size="35" value=" "></td>230 <td style="vertical-align: middle;border-style: none;"><input type="text" name="path" size="35" value="/home/michab/E-MEXP-1340.raw.zip"></td> 231 231 232 232 <td style="vertical-align: middle;border-style: none;"> -
plugins/base2/uk.ac.ebi.tab2mage/branches/tab2mageimporter/jsp/uk/ac/ebi/nugo/plugins/mappings.jsp
r639 r643 1 <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> 1 <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 pageEncoding="ISO-8859-1"%> 2 3 <%@ page import="java.util.*"%> 3 4 <%@ page import="java.util.zip.*"%> … … 7 8 <%@ page import="uk.ac.ebi.nugo.plugins.*"%> 8 9 9 <jsp:useBean id="inputDataBean" class="uk.ac.ebi.nugo.plugins.DataBean" scope="session" /> 10 11 <jsp:useBean id="inputDataBean" class="uk.ac.ebi.nugo.plugins.DataBean" 12 scope="session" /> 10 13 <!-- submits the form data back to the bean assuming that each form element is matched to a variable in the bean by the same name --> 11 14 <jsp:setProperty name="inputDataBean" property="*" /> … … 21 24 <head> 22 25 23 <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/styles.css" /> 24 <link rel="stylesheet" type="text/css" href="/base/include/styles/main.css"> 25 <link rel="stylesheet" type="text/css" href="/base/include/styles/size_m.css"> 26 27 <script language="JavaScript" src="<%=request.getContextPath()%>/include/scripts/main.js" type="text/javascript"></script> 26 <link rel="stylesheet" type="text/css" 27 href="<%=request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/styles.css" /> 28 <link rel="stylesheet" type="text/css" 29 href="/base/include/styles/main.css"> 30 <link rel="stylesheet" type="text/css" 31 href="/base/include/styles/size_m.css"> 32 33 <script language="JavaScript" 34 src="<%=request.getContextPath()%>/include/scripts/main.js" 35 type="text/javascript"></script> 28 36 <script language="JavaScript" type="text/javascript"> 29 37 … … 78 86 dyeList += frm.elements[i].value + '\t'; 79 87 } 80 if(id.match(" combinationInput"))88 if(id.match("factorInput")) 81 89 { 82 90 combinationList += frm.elements[i].value + '\t'; … … 98 106 99 107 100 <form name="mappings" action="<%=request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/submit.jsp?ID=<%=ID%>" 108 <form name="mappings" 109 action="<%=request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/submit.jsp?ID=<%=ID%>" 101 110 method="post"> 102 111 … … 133 142 } 134 143 135 //here we get hold of the cartesian product of all the factor values136 //String[][] products = CartesianProduct.getCartesianProduct(factorValues);137 138 144 //now inspect the content of the zip file and list all the individual files therein 139 145 … … 172 178 String[] tissueNames = inputDataBean.getTissues().split("\n"); 173 179 174 //work out the number of hybridizations 175 String platform = inputDataBean.getPlatform(); 176 //work out whether this is a single or dual channel experiment 180 //work out the number of channels 177 181 boolean singleChannel = false; 178 if ( platform.equalsIgnoreCase("affymetrix"))182 if (inputDataBean.getPlatform().equalsIgnoreCase("affymetrix")) 179 183 { 180 184 singleChannel = true; 181 185 } 182 int numReplicates = Integer.parseInt(inputDataBean.getNumReplicates());183 int numTreatmentGroups = Integer.parseInt(inputDataBean.getNumTreatmentGroups());186 //int numReplicates = Integer.parseInt(inputDataBean.getNumReplicates()); 187 //int numTreatmentGroups = Integer.parseInt(inputDataBean.getNumTreatmentGroups()); 184 188 int numTissues = inputDataBean.getTissues().split("\n").length; 185 189 boolean dyeSwapBool = false; … … 195 199 196 200 //we need the number of hybs so we can work out how many rows we have to print in the table of select boxes 197 int numHybs = inputDataBean.getNumHybs();201 int numHybs = Integer.parseInt(inputDataBean.getNumHybs()); 198 202 //this hash map contains all factor values - each entry represents a factor, with the factor name as key and a list of factor levels as the value 199 203 //we iterate over this to get the factor value input boxes in the table 200 HashMap factorMap = Tab2MageUtils.getAllFactorValues(inputDataBean.getExpFactors());204 HashMap<String, List<String>> factorMap = Tab2MageUtils.getAllFactorValues(inputDataBean.getExpFactors()); 201 205 202 206 System.out.println("numHybs = " + numHybs); … … 208 212 <p> 209 213 210 The table below allows you to configure your hybridizations as combinations of a subject/sample, tissue and factor 211 values, and to then map them against a file name that corresponds to the hybridization.. Please select, for each 212 hybridization, the appropriate file, subject, tissue, factor value combination and -- where appropriate -- dye from 213 the drop down menus. 214 The table below allows you to configure your hybridizations as 215 combinations of a subject/sample, tissue and factor values, and to 216 then map them against a file name that corresponds to the 217 hybridization.. Please select, for each hybridization, the 218 appropriate file, subject, tissue, factor value combination and -- 219 where appropriate -- dye from the drop down menus. 214 220 </p> 215 221 <p> 216 222 217 223 <!-- this table holds the combination values--> 224 </p> 218 225 <table align="center" cellpadding="15"> 219 226 … … 225 232 <td class="header"> 226 233 <h3> 227 File234 file 228 235 </h3> 229 236 </td> 230 237 <td class="header"> 231 238 <h3> 232 Subject239 subject 233 240 </h3> 234 241 </td> 235 242 <td class="header"> 236 243 <h3> 237 Tissue244 tissue 238 245 </h3> 239 246 </td> … … 245 252 <td class="header"> 246 253 <h3> 247 Dye254 dye 248 255 </h3> 249 256 </td> … … 258 265 %> 259 266 <!-- have a cell with the name of this factor --> 260 <td ><%=factorName%></td>267 <td class="header"><h3><%=factorName%></h3></td> 261 268 <% 262 269 } … … 368 375 %> 369 376 <!-- have a cell with a select box with factor values for this factor --> 370 <td >377 <td class="input"> 371 378 <select id="factorInput<%=i%>"> 372 379 <% … … 396 403 397 404 <p> 398 <table align="center" class="noBorder" cellspacing="5" cellpadding="5"> 405 </p> 406 <table align="center" class="noBorder" cellspacing="5" 407 cellpadding="5"> 399 408 <tr class="noBorder"> 400 409 <td id="back" style="border-style: none;"> 401 <div class="buttons" onmouseover="this.className='buttons_hover';" onmouseout="this.className='buttons';"402 on click="back()">410 <div class="buttons" onmouseover="this.className='buttons_hover';" 411 onmouseout="this.className='buttons';" onclick="back()"> 403 412 <div class="buttons_inner"> 404 413 <table class="noBorder" cellspacing="0" cellpadding="0"> … … 416 425 </td> 417 426 <td id="next" style="border-style: none;"> 418 <div class="buttons" onmouseover="this.className='buttons_hover';" onmouseout="this.className='buttons';"419 on click="submit()">427 <div class="buttons" onmouseover="this.className='buttons_hover';" 428 onmouseout="this.className='buttons';" onclick="submit()"> 420 429 <div class="buttons_inner"> 421 430 <table class="noBorder" cellspacing="0" cellpadding="0"> … … 433 442 </td> 434 443 <td id="close" style="border-style: none;"> 435 <div class="buttons" onmouseover="this.className='buttons_hover';" onmouseout="this.className='buttons';"436 on click="window.close()">444 <div class="buttons" onmouseover="this.className='buttons_hover';" 445 onmouseout="this.className='buttons';" onclick="window.close()"> 437 446 <div class="buttons_inner"> 438 447 <table class="noBorder" cellspacing="0" cellpadding="0"> -
plugins/base2/uk.ac.ebi.tab2mage/branches/tab2mageimporter/jsp/uk/ac/ebi/nugo/plugins/submit.jsp
r639 r643 34 34 <p> 35 35 36 Please review the values you have entered and click 'Submit' if you are happy with them -- otherwise you canuse the Back button to37 navigate to earlier pages.36 Please review the values you have entered and click 'Submit' if you are happy with them -- otherwise use the Back button to 37 navigate to previous pages and edit your values there. 38 38 <p> 39 39 … … 69 69 "hybridizationProtocolParams","scanningProtocolParams","platform","organism", 70 70 "numDesigns","dyeSwap","refSample","numTreatmentGroups","expFactors","numReplicates", 71 "tissues","pooling","path","samplePairing","timeCourse","timePoints" };71 "tissues","pooling","path","samplePairing","timeCourse","timePoints", "numHybs"}; 72 72 73 73 String [] friendlyNames = new String []{"Domain","Accession","Quality Control","Experimental Design", … … 78 78 "Hybridization Protocol Parameters","Scanning Protocol Parameters","Platform","Organism", 79 79 "Number of Array Designs","Dye Swap","Reference Sample","Number of Treatment Groups","Experimental Factors","Number of Replicates per Group", 80 "Tissues","Pooling","Zip File","Sample Pairing Rationale","Time Course","Time Points" };80 "Tissues","Pooling","Zip File","Sample Pairing Rationale","Time Course","Time Points" ,"Number of Hybridizations"}; 81 81 82 82 //print out all relevant parameter values in the bean -
plugins/base2/uk.ac.ebi.tab2mage/branches/tab2mageimporter/src/uk/ac/ebi/nugo/plugins/HybridizationEntry.java
r558 r643 38 38 String row = ""; 39 39 40 String subjectName = subjectNames[count]; 41 String fileName = fileNames[count]; 42 String tissue = tissueNames[count]; 43 String dyeName; 44 if(singleChannel) 40 try 45 41 { 46 dyeName = "biotin"; 42 String subjectName = subjectNames[count]; 43 String fileName = fileNames[count]; 44 String tissue = tissueNames[count]; 45 String dyeName; 46 if(singleChannel) 47 { 48 dyeName = "biotin"; 49 } 50 else 51 { 52 dyeName = dyeNames[count]; 53 } 54 55 // file count first 56 row += fileName + "\t" + 57 58 // accession no. i.e the array design 59 accession + "\t" + 60 61 // bio source 62 subjectName + "\t" + 63 64 // BioMaterialCharacteristics[Organism] 65 organism + "\t" + 66 67 // BioMaterialCharacteristics[OrganismPart] 68 tissue + "\t" + 69 70 // sample 71 subjectName + ".sample-" + tissue + "\t" + 72 73 // Protocol[grow] 74 "P-DIET-1" + "\t" + 75 76 // Extract 77 subjectName + ".sample-" + tissue + "-extract" + "\t" + 78 79 // Protocol[extraction] 80 "P-EXTR-1" + "\t" + 81 82 // LabeledExtract 83 subjectName + ".sample-" + tissue + "-extract-le" + "\t" + 84 85 // Protocol[labeling] 86 "P-LABL-1" + "\t" + 87 88 // Dye 89 dyeName + "\t" + 90 91 // Hybridization 92 "hybridization-" + count + "\t" + 93 94 // Protocol[hybridization] 95 "P-HYBR-1" + "\t" + 96 97 // Scan 98 "scan-" + count + "\t" + 99 100 // Protocol[scanning] 101 "P-SCAN-1" + "\t"; 102 103 //now print all the factor values 104 for(int factorNumber=0; factorNumber< combinations[0].length; factorNumber++) 105 { 106 row +=combinations[count][factorNumber]+ "\t"; 107 } 108 109 // new line 110 row += "\n"; 47 111 } 48 else112 catch (Exception e) 49 113 { 50 dyeName = dyeNames[count];114 e.printStackTrace(); 51 115 } 52 53 // file count first54 row += fileName + "\t" +55 56 // accession no. i.e the array design57 accession + "\t" +58 59 // bio source60 subjectName + "\t" +61 62 // BioMaterialCharacteristics[Organism]63 organism + "\t" +64 65 // BioMaterialCharacteristics[OrganismPart]66 tissue + "\t" +67 68 // sample69 subjectName + ".sample-" + tissue + "\t" +70 71 // Protocol[grow]72 "P-DIET-1" + "\t" +73 74 // Extract75 subjectName + ".sample-" + tissue + "-extract" + "\t" +76 77 // Protocol[extraction]78 "P-EXTR-1" + "\t" +79 80 // LabeledExtract81 subjectName + ".sample-" + tissue + "-extract-le" + "\t" +82 83 // Protocol[labeling]84 "P-LABL-1" + "\t" +85 86 // Dye87 dyeName + "\t" +88 89 // Hybridization90 "hybridization-" + count + "\t" +91 92 // Protocol[hybridization]93 "P-HYBR-1" + "\t" +94 95 // Scan96 "scan-" + count + "\t" +97 98 // Protocol[scanning]99 "P-SCAN-1" + "\t";100 101 //System.out.println("combinations[0].length = "+ combinations[0].length);102 //System.out.println("combinations.length = " + combinations.length);103 //now print all the factor values104 // FactorValue[Treatment Type]105 for(int factorNumber=0; factorNumber< combinations[0].length; factorNumber++)106 {107 //System.out.println("count = " + count);108 //System.out.println("factorNumber = "+ factorNumber);109 row +=combinations[count][factorNumber]+ "\t";110 }111 112 // new line113 row += "\n";114 116 115 117 return row; -
plugins/base2/uk.ac.ebi.tab2mage/branches/tab2mageimporter/src/uk/ac/ebi/nugo/plugins/Tab2MageUtils.java
r639 r643 3 3 import java.util.Arrays; 4 4 import java.util.HashMap; 5 import java.util.LinkedHashMap; 5 6 import java.util.List; 6 7 … … 10 11 11 12 12 public static HashMap<String, List<String>> getAllFactorValues(String expFactors)13 public static LinkedHashMap<String, List<String>> getAllFactorValues(String expFactors) 13 14 { 14 HashMap<String, List<String>> hashMap = newHashMap<String, List<String>>();15 LinkedHashMap<String, List<String>> hashMap = new LinkedHashMap<String, List<String>>(); 15 16 16 17 String[] rawFactors = expFactors.split("\n"); … … 26 27 String[] values = allValues.split(","); 27 28 28 //make new Li nkedList with the values in it29 //make new List with the values in it 29 30 List<String> valueList = Arrays.asList(values); 30 31 -
plugins/base2/uk.ac.ebi.tab2mage/branches/tab2mageimporter/src/uk/ac/ebi/nugo/plugins/Tab2MageWriter.java
r558 r643 5 5 import java.io.Writer; 6 6 import java.lang.reflect.Field; 7 import java.util.LinkedHashMap; 8 import java.util.List; 9 import java.util.Set; 7 10 8 11 import net.sf.basedb.core.DbControl; … … 21 24 ParameterValues job; 22 25 boolean singleChannel = false; 23 int numHybs = 0; 24 int numFactors = 0; 25 26 String[] paramNames; 27 String[] factorNames; 26 27 String [] paramNames; 28 28 String [] fileNames; 29 29 String [] subjectNames; 30 30 String [] tissueNames; 31 31 String [] dyeNames; 32 //stores the factor value combinations 33 //outer array contains the combinations 34 //each inner array contains a factor value for each factor 32 35 String [][] combinations; 33 String[][] cartesianProduct;34 String[][] factorValues;35 36 36 37 public String experimentId; … … 89 90 public String timePoints; 90 91 public String proceed; 92 public String numHybs; 91 93 92 94 … … 111 113 112 114 // sets all the values of the local variables to those found in the job 113 // object 115 // object so we can access them easily here 114 116 public void initJobParamValues() 115 117 { … … 169 171 // ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 170 172 171 //work out how many hybridizations we have in this experiment172 private void calcNumHybs()173 {174 //first work out how many hybs we are supposed to have175 boolean dyeSwapBool = false;176 boolean poolingBool = false;177 if(dyeSwap.equals("yes"))178 {179 dyeSwapBool = true;180 }181 if(pooling.equals("yes"))182 {183 poolingBool = true;184 }185 numHybs = Tab2MageUtils.calcNumHybs(dyeSwapBool,poolingBool, Integer.parseInt(numDesigns), Integer.parseInt(numReplicates), Integer.parseInt(numTreatmentGroups), tissues.split("\n").length);186 }187 188 189 // -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------190 191 public String[][] makeFactorValueCombinations()192 {193 String[] rawFactors = expFactors.split("\n");194 195 factorValues = new String[rawFactors.length][];196 factorNames = new String[rawFactors.length];197 numFactors = factorNames.length;198 199 for (int i = 0; i < rawFactors.length; i++)200 {201 //extract the factor name202 String factorName = rawFactors[i].substring(0, rawFactors[i].indexOf("("));203 factorNames[i] = factorName;204 //extract the possible values from between the parentheses205 String allValues = rawFactors[i].substring(rawFactors[i].indexOf("(") + 1,206 rawFactors[i].indexOf(")"));207 String[] values = allValues.split(",");208 factorValues[i] = values;209 }210 211 //here we get hold of the cartesian product of all the factor values212 return CartesianProduct.getCartesianProduct(factorValues);213 }214 215 // -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------216 217 173 private void initArrays() 218 174 { 219 //if the mappings were manually selected by the user, do this 175 //work out the number of experimental factors first 176 int numFactors = expFactors.split("\n").length; 177 178 //if the mappings were manually selected by the user 220 179 if(mappingsMode.equals("manualSelect")) 221 180 { … … 230 189 dyeNames = dyeList.split("\t"); 231 190 232 //parse the list of factor value combinations and put it into a 2d array 233 String [] allCombis = combinationList.split("\t"); 234 combinations = new String [allCombis.length][]; 235 for (int i = 0; i < allCombis.length; i++) 236 { 237 String [] combi = allCombis[i].split(","); 191 //parse the list of factor values and put it into a 2d array 192 //these simply come as a long single String from the mappings page 193 //values separated by tabs but no distinction between factors i.e. 194 //factor1value1\tfactor2value1\tfactor1value2\tfactor2value2\t etc for two factors 195 //need to split this appropriately 196 String [] allValues = combinationList.split("\t"); 197 combinations = new String [Integer.parseInt(numHybs)][]; 198 int totalCount = 0; 199 for (int i = 0; i < combinations.length; i++) 200 { 201 String [] combi = new String [numFactors]; 202 for (int j = 0; j < numFactors; j++) 203 { 204 //get the factor value 205 combi[j] = allValues[totalCount]; 206 totalCount ++; 207 } 238 208 combinations[i] = combi; 239 209 } 240 210 } 241 211 242 //if the mappings were copied and pasted from a spreadsheet we need to parse them into arrays to match the ones above212 //if the mappings were copied and pasted from a spreadsheet 243 213 if(mappingsMode.equals("copyPaste")) 244 214 { 215 //the copied and pasted block of text contains entries consisting of columns and rows 216 //each row represents a hybridization 217 //split this up into rows first 245 218 String [] entriesWithHeader = spreadSheetMappings.split("\n"); 246 219 247 //need to remove the header row - this akward with arrays but we need to use arrays here220 //need to remove the header row 248 221 String [] entries = new String [entriesWithHeader.length -1]; 249 222 for (int i = 0; i < entries.length; i++) … … 267 240 tissueNames[i] = row[2]; 268 241 dyeNames[i] = row[3]; 242 243 //each individual combination contains a factor value for each factor and is stored as an array 269 244 String [] combi = new String [numFactors]; 270 245 for (int j = 0; j < combi.length; j++) 271 246 { 272 combi[j] = row[j+4]; 273 } 247 combi[j] = row[j+4].trim(); 248 } 249 //now store the new combination in the outer array 274 250 combinations[i] = combi; 275 251 } 276 252 } 277 253 278 //if the user chose new data rather than legacy data in the UI then we want to autogenerate the entire hybs section for them 279 if(legacyData.equals("no")) 280 { 281 initAutoGenerateSettings(); 282 } 283 } 284 285 // ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 286 287 288 private void initAutoGenerateSettings() 289 { 290 291 //get all possible factor value combinations 292 cartesianProduct = makeFactorValueCombinations(); 293 294 //init the arrays needed here 295 fileNames = new String [numHybs]; 296 subjectNames = new String [numHybs]; 297 tissueNames = new String [numHybs]; 298 dyeNames = new String [numHybs]; 299 combinations = new String [numHybs][]; 300 301 int numSubjects = Integer.parseInt(numReplicates); 302 String[] allTissues = tissues.split(","); 303 int numGroups = Integer.parseInt(numTreatmentGroups); 304 int numArrayDesigns = Integer.parseInt(numDesigns); 305 306 307 /* if no pooling, iterate through 308 Number of ArrayDesigns 309 Number of Study Groups 310 Number of Subject per Study group 311 Number of tissues per Subject 312 */ 313 if(pooling.equals("no")) 314 { 315 //the number of times we have to print the block of data below 316 //with dual channel platforms we have to print each block (row) twice 317 int numPrintRepeats = 0; 318 if (singleChannel) 319 { 320 numPrintRepeats = 1; 321 } 322 else 323 { 324 if(dyeSwap.equals("yes")) 325 { 326 numPrintRepeats = 2; 327 } 328 else 329 { 330 numPrintRepeats = 1; 331 } 332 333 } 334 335 int hybCount =0; 336 // for each treatment group i.e. factor value combination 337 for(int a = 0; a< numArrayDesigns; a++) 338 { 339 for (int i = 0; i < numGroups; i++) 340 { 341 // for each subject within each group i.e. biological replicate within each factor value combination 342 for (int j = 0; j < numSubjects; j++) 343 { 344 // for each target tissue for this subject 345 for (int k = 0; k < allTissues.length; k++) 346 { 347 for(int r = 0; r< numPrintRepeats; r++) 348 { 349 fileNames[hybCount] = "file" + hybCount; 350 subjectNames[hybCount] = "subject" + hybCount; 351 if(singleChannel) 352 { 353 dyeNames[hybCount] = "biotin"; 354 } 355 if(!singleChannel && r==0) 356 { 357 dyeNames[hybCount] = "Cy3"; 358 } 359 if(!singleChannel && r==1) 360 { 361 dyeNames[hybCount] = "Cy5"; 362 } 363 tissueNames[hybCount] = allTissues[k]; 364 //print all factor values 365 for(int n=0; n< numFactors; n++) 366 { 367 combinations[hybCount] = new String[numFactors]; 368 combinations[hybCount][n] =cartesianProduct[i][n]; 369 } 370 hybCount++; 371 } 372 } 373 } 374 } 375 } 376 // TODO: with pooling 377 /* if pooling, iterate through 378 Number of ArrayDesigns 379 Number of Study Groups 380 Number of tissues per Subject 381 */ 382 } 383 //dual channel platforms 384 else 385 { 386 /* 387 If (Ref=yes) then 388 389 for each treatment group TGk 390 for each subject in the group 391 create a sample(subject) Si(TGk) 392 create 2 hybridizations where Le1.Si(TGk) gets Dye1 and Le1.Ref gets Dye2 393 IF (Dye-swap = yes) 394 create dye swap hyb where where Le2. Si(TGk)gets Dye2 and Le2. Ref get Dye1 395 396 */ 397 398 /* 399 If (Ref=no) then 400 401 for each treatment group TGk 402 create a sample Si(TGk) 403 create a sample Sj(CG) in the control group 404 create first hybridization where Le1.Si(TGk) gets Dye1 and Le1. Sj(CG) get Dye2 405 if (Dye-swap = yes) 406 create dye swap hyb where where Le2. Si(TGk)gets Dye2 and Le2. Sj(CG) get Dye1 407 */ 408 409 410 411 412 413 } 414 415 } 254 } 255 416 256 417 257 // ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- … … 494 334 public String makeHybridizationsSection() 495 335 { 496 //work out the number of hybridizations 497 calcNumHybs(); 336 String hybSection = ""; 337 338 try 339 { 340 //work out whether this is a single or dual channel experiment 341 if (platform.equalsIgnoreCase("affymetrix")) 342 { 343 singleChannel = true; 344 } 345 346 //initialize the arrays we need 347 initArrays(); 348 349 // header for this section 350 hybSection += "Hybridization section\n"; 351 352 // print column headers for the section 353 String[] colHeaders = new String[] 354 { "File[raw]", "Array[accession]", "BioSource", "BioMaterialCharacteristics[Organism]", 355 "BioMaterialCharacteristics[OrganismPart]", 356 "Sample", "Protocol[grow]", 357 "Extract", "Protocol[extraction]", "LabeledExtract", 358 "Protocol[labeling]", "Dye", "Hybridization", 359 "Protocol[hybridization]", "Scan", "Protocol[scanning]" }; 360 for (int i = 0; i < colHeaders.length; i++) 361 { 362 hybSection += colHeaders[i] + "\t"; 363 } 364 365 //get the factor names 366 LinkedHashMap<String, List<String>> factorMap = Tab2MageUtils.getAllFactorValues(expFactors); 367 Set<String> keys = factorMap.keySet(); 368 for (String factorName : keys) 369 { 370 hybSection += "FactorValue["+factorName + "]\t"; 371 } 372 373 //next line will be data 374 hybSection += "\n"; 375 376 HybridizationEntry hyb = new HybridizationEntry( false, singleChannel, fileNames, subjectNames, tissueNames,dyeNames,combinations, accession, organism); 377 int numberHybs = Integer.parseInt(numHybs); 378 for (int i = 0; i < numberHybs; i++) 379 { 380 hybSection += hyb.makeRow(i); 381 } 382 383 //append the hybs section to the general content 384 t2mContent += hybSection; 385 } 386 catch (Exception e) 387 { 388 e.printStackTrace(); 389 } 498 390 499 //initialise the factors500 makeFactorValueCombinations();501 502 //work out whether this is a single or dual channel experiment503 if (platform.equalsIgnoreCase("affymetrix"))504 {505 singleChannel = true;506 }507 508 //initialize the arrays we need509 initArrays();510 511 String hybSection = "";512 513 // header for this section514 hybSection += "Hybridization section\n";515 516 // print column headers for the section517 String[] colHeaders = new String[]518 { "File[raw]", "Array[accession]", "BioSource", "BioMaterialCharacteristics[Organism]",519 "BioMaterialCharacteristics[OrganismPart]",520 "Sample", "Protocol[grow]",521 "Extract", "Protocol[extraction]", "LabeledExtract",522 "Protocol[labeling]", "Dye", "Hybridization",523 "Protocol[hybridization]", "Scan", "Protocol[scanning]" };524 for (int i = 0; i < colHeaders.length; i++)525 {526 hybSection += colHeaders[i] + "\t";527 }528 529 //now print the factorvalue headers530 for (int i = 0; i < factorNames.length; i++)531 {532 hybSection += "FactorValue["+factorNames[i] + "]\t";533 }534 535 //next line will be data536 hybSection += "\n";537 538 539 //also need to figure if we are to autogenerate labels or use those supplied by the user540 if(legacyData.equals("no"))541 {542 //autogenerate the contents of the hybs section543 HybridizationEntry hyb = new HybridizationEntry( true, singleChannel, fileNames, subjectNames, tissueNames,dyeNames,combinations, accession, organism);544 for (int i = 0; i < numHybs; i++)545 {546 hybSection += hyb.makeRow(i);547 }548 }549 //otherwise use the data from the mappings we have obtained550 else551 {552 HybridizationEntry hyb = new HybridizationEntry( false, singleChannel, fileNames, subjectNames, tissueNames,dyeNames,combinations, accession, organism);553 for (int i = 0; i < numHybs; i++)554 {555 hybSection += hyb.makeRow(i);556 }557 }558 559 //append the hybs section to the general content560 t2mContent += hybSection;561 391 return hybSection; 562 392 } … … 573 403 dc = sc.newDbControl(); 574 404 net.sf.basedb.core.File t2mFile = net.sf.basedb.core.File.getNew(dc, dir); 575 System.out.println("dir for writing new tab2mage file = " + dir.getName());576 405 t2mFile.setName("tab2mage.txt"); 577 406 dc.saveItem(t2mFile); … … 609 438 DbControl dc = sc.newDbControl(); 610 439 net.sf.basedb.core.File t2mFile = net.sf.basedb.core.File.getNew(dc, dir); 611 System.out.println("dir for writing new tab2mage file = " + dir.getName());612 440 t2mFile.setName("statusReport.txt"); 613 441 dc.saveItem(t2mFile); -
plugins/base2/uk.ac.ebi.tab2mage/branches/tab2mageimporter/src/uk/ac/ebi/nugo/plugins/Tab2MageWriterTest.java
r639 r643 7 7 import java.io.Writer; 8 8 9 import junit.framework.TestCase;9 //import junit.framework.TestCase; 10 10 11 11 public class Tab2MageWriterTest //extends TestCase … … 16 16 { 17 17 //org.junit.runner.JUnitCore.main("uk.ac.ebi.nugo.plugins.Tab2MageWriterTest"); 18 test 0();19 //test1();20 //test2();21 //test3();18 test1(); 19 test2(); 20 test3(); 21 test4(); 22 22 } 23 23 24 24 //---------------------------------------------------------------------------------------------------------------------- 25 25 26 public static void test0()27 {28 //here we simulate data coming from the web UI with mappings provided from a spreadsheet29 Tab2MageWriter writer = new Tab2MageWriter();30 31 System.out.println("======================START TEST0============================");32 33 writer.legacyData = "yes";34 writer.platform = "Affymetrix";35 writer.organism = "Solanum tuberosum";36 writer.numDesigns = "1";37 writer.dyeSwap = "no";38 writer.refSample = "yes";39 writer.numTreatmentGroups = "4";40 writer.expFactors = "Strain(mutant,wildtype)\nTreatment(treated,control)";41 writer.numReplicates = "2";42 writer.tissues = "whole_organism";43 writer.pooling = "no";44 writer.path = "/home/michab/gen2.zip";45 writer.fileList ="file1\tfile2\tfile3\tfile4\tfile5\tfile6\tfile7\tfile8";46 writer.subjectList = "subject1\tsubject2\tsubject3\tsubject4\tsubject5\tsubject6\tsubject7\tsubject8";47 writer.tissueList = "whole_organism\twhole_organism\twhole_organism\twhole_organism\twhole_organism\twhole_organism\twhole_organism\twhole_organism";48 writer.mappingsMode = "copyPaste";49 writer.spreadSheetMappings = "File\tSample\tTissue\tDye\tFactorValue[Strain]\tFactorValue(Treatment)\nfile1\tsubject1\twhole_plant\tbiotin\tmutant\ttreated\nfile2\tsubject2\twhole_plant\tbiotin\twildtype\ttreated\nfile3\tsubject3\twhole_plant\tbiotin\tmutant\tcontrol\nfile4\tsubject4\twhole_plant\tbiotin\twildtype\tcontrol\nfile5\tsubject5\twhole_plant\tbiotin\tmutant\ttreated\nfile6\tsubject6\twhole_plant\tbiotin\twildtype\ttreated\nfile7\tsubject7\twhole_plant\tbiotin\tmutant\tcontrol\nfile8\tsubject8\twhole_plant\tbiotin\twildtype\tcontrol";50 51 String hybSection = writer.makeHybridizationsSection();52 System.out.println("hybs section = \n\n" + hybSection);53 System.out.println("======================END TEST0======================");54 55 }56 57 // ----------------------------------------------------------------------------------------------------------------------58 59 26 public static void test1() 60 27 { … … 62 29 Tab2MageWriter writer = new Tab2MageWriter(); 63 30 64 System.out.println("======================START TEST 1============================");31 System.out.println("======================START TEST 1============================"); 65 32 66 writer.legacyData = "yes"; 67 writer.platform = "Affymetrix"; 33 writer.mappingsMode = "copyPaste"; 68 34 writer.organism = "Solanum tuberosum"; 69 writer.numDesigns = "1";70 writer.dyeSwap = "no";71 writer.refSample = "yes";72 writer.numTreatmentGroups = "4";73 35 writer.expFactors = "Strain(mutant,wildtype)\nTreatment(treated,control)"; 74 writer.numReplicates = "2";75 36 writer.tissues = "whole_organism"; 76 writer. pooling = "no";77 writer.path = "/home/michab/gen2.zip"; 37 writer.numHybs = "8"; 38 78 39 writer.fileList ="file1\tfile2\tfile3\tfile4\tfile5\tfile6\tfile7\tfile8"; 79 40 writer.subjectList = "subject1\tsubject2\tsubject3\tsubject4\tsubject5\tsubject6\tsubject7\tsubject8"; 80 writer.tissueList = "whole_organism\twhole_organism\twhole_organism\twhole_organism\twhole_organism\twhole_organism\twhole_organism\twhole_organism"; 81 writer.combinationList = "mutant treated\twildtype treated\tmutant control\twildtype control\tmutant treated\twildtype treated\tmutant control\twildtype control"; 82 writer.dyeList = "biotin\tbiotin\tbiotin\tbiotin\tbiotin\tbiotin\tbiotin\tbiotin\t"; 83 writer.mappingsMode = "manualSelect"; 41 writer.tissueList = "whole_organism\twhole_organism\twhole_organism\twhole_organism\twhole_organism\twhole_organism\twhole_organism\twhole_organism"; 42 writer.spreadSheetMappings = "File\tSample\tTissue\tDye\tFactorValue[Strain]\tFactorValue(Treatment)\nfile1\tsubject1\twhole_plant\tbiotin\tmutant\ttreated\nfile2\tsubject2\twhole_plant\tbiotin\twildtype\ttreated\nfile3\tsubject3\twhole_plant\tbiotin\tmutant\tcontrol\nfile4\tsubject4\twhole_plant\tbiotin\twildtype\tcontrol\nfile5\tsubject5\twhole_plant\tbiotin\tmutant\ttreated\nfile6\tsubject6\twhole_plant\tbiotin\twildtype\ttreated\nfile7\tsubject7\twhole_plant\tbiotin\tmutant\tcontrol\nfile8\tsubject8\twhole_plant\tbiotin\twildtype\tcontrol"; 84 43 85 44 String hybSection = writer.makeHybridizationsSection(); 86 45 System.out.println("hybs section = \n\n" + hybSection); 87 System.out.println("======================END TEST 1======================");46 System.out.println("======================END TEST 1======================\n\n"); 88 47 89 48 } 49 50 90 51 91 52 // ---------------------------------------------------------------------------------------------------------------------- 92 53 93 54 //affy simple design, 1 factor, 6 files only 55 //manual configuration by user 94 56 public static void test2() 95 57 { 96 58 97 /* 98 platform = Affymetrix 99 number of array designs = 1 100 dyeswap yes/no = not applicable 101 refSample yes/no = no 102 number of treatment groups = 2 103 experimental factors list = genotype (wild type;PGC-1 beta transgenic) 104 number of replicates within groups = 3 105 list of tissues used = skeletal muscle (1) 106 pooling yes/no = no 107 Total number of Hybs/datafiles = 6 108 */ 109 59 System.out.println("======================START TEST2============================"); 60 110 61 Tab2MageWriter writer = new Tab2MageWriter(); 111 112 System.out.println("======================START TEST2============================"); 113 writer.legacyData = "yes"; 114 writer.platform = "Affymetrix"; 62 63 writer.mappingsMode = "manualSelect"; 64 115 65 writer.organism = "Mus musculus"; 116 66 writer.accession = "E-MEXP-939"; 117 writer.numDesigns = "1"; 118 writer.dyeSwap = "no"; 119 writer.refSample = "no"; 120 writer.numTreatmentGroups = "2"; 67 writer.numHybs = "6"; 121 68 writer.expFactors = "Genotype(wild type,PGC-1 beta transgenic)\n"; 122 writer.numReplicates = "3";123 69 writer.tissueList = "skeletal_muscle\tskeletal_muscle\tskeletal_muscle\tskeletal_muscle\tskeletal_muscle\tskeletal_muscle"; 124 70 writer.fileList = "E-MEXP-939-raw-cel-1353140153.cel\tE-MEXP-939-raw-cel-1353140189.cel\tE-MEXP-939-raw-cel-1353140261.cel\tE-MEXP-939-raw-cel-1353140117.cel\tE-MEXP-939-raw-cel-1353140081.cel\tE-MEXP-939-raw-cel-1353140225.cel\t"; … … 126 72 writer.dyeList = "biotin\tbiotin\tbiotin\tbiotin\tbiotin\tbiotin"; 127 73 writer.subjectList = "wt3\ttg-1\ttg-3\twt2\twt1\ttg-2\t"; 128 writer.pooling = "no";129 writer.mappingsMode = "manualSelect";130 74 131 String hybSection = writer.makeHybridizationsSection();132 System.out.println("hybs section = \n\n" + hybSection);133 System.out.println("======================END TEST2======================");134 }135 136 // ----------------------------------------------------------------------------------------------------------------------137 138 //auto generate required139 public static void test3()140 {141 /*142 ArrayExpress Accession Number CacoVitE Inserm143 platform Agilent144 number of array designs 1145 dyeswap yes/no yes146 refSample yes/no no147 number of treatment groups 2148 experimental factors list Dose(90µM,physiological concentration); Compound(alpha-tocopherol,gamma-tocopheral)149 number of replicates within groups 2150 list of tissues used enterocyte cell culture151 pooling yes/no no152 Total number of Hybs/datafiles 8153 */154 155 Tab2MageWriter writer = new Tab2MageWriter();156 157 System.out.println("======================START TEST3============================");158 159 writer.platform = "Agilent";160 writer.organism = "Home sapiens";161 writer.accession = "CacoVitE Inserm";162 163 writer.legacyData = "yes";164 writer.mappingsMode = "manualSelect";165 166 writer.numDesigns = "1";167 writer.numReplicates = "2";168 writer.numTreatmentGroups = "4";169 170 writer.dyeSwap = "yes";171 writer.refSample = "no";172 writer.pooling = "no";173 174 175 writer.expFactors = "Compound(alpha-tocopherol,gamma-tocopheral)\nDose(90microM,physiological concentration)\n";176 177 writer.tissueList = "enterocyte\tenterocyte\tenterocyte\tenterocyte\tenterocyte\tenterocyte\tenterocyte\tenterocyte\tenterocyte\tenterocyte\tenterocyte\tenterocyte\tenterocyte\tenterocyte\tenterocyte\tenterocyte\t";178 writer.fileList = "US22502631_251485012409_S01_GE2-v5_91_0806_1_2.txt\tUS22502631_251485012409_S01_GE2-v5_91_0806_1_2.txt\tUS22502631_251485012409_S01_GE2-v5_91_0806_1_3.txt\tUS22502631_251485012409_S01_GE2-v5_91_0806_1_3.txt\tUS22502631_251485012409_S01_GE2-v5_91_0806_1_4.txt\tUS22502631_251485012409_S01_GE2-v5_91_0806_1_4.txt\tUS22502631_251485012407_S01_GE2-v5_91_0806_1_1.txt\tUS22502631_251485012407_S01_GE2-v5_91_0806_1_1.txt\tUS22502631_251485012408_S01_GE2-v5_91_0806_1_2.txt\tUS22502631_251485012408_S01_GE2-v5_91_0806_1_2.txt\tUS22502631_251485012408_S01_GE2-v5_91_0806_1_1.txt\tUS22502631_251485012408_S01_GE2-v5_91_0806_1_1.txt\tUS22502631_251485012408_S01_GE2-v5_91_0806_1_4.txt\tUS22502631_251485012408_S01_GE2-v5_91_0806_1_4.txt\tUS22502631_251485012408_S01_GE2-v5_91_0806_1_3.txt\tUS22502631_251485012408_S01_GE2-v5_91_0806_1_3.txt\t";179 writer.combinationList = "micelle control,physiological concentration\tmicelle alpha tocopherol,90µM\tmicelle control,physiological concentration\tmicelle alpha tocopherol,90µM\tmicelle control,physiological concentration\tmicelle gamma tocopherol,90µM\tmicelle control,physiological concentration\tmicelle gamma tocopherol,90µM\tmicelle control,physiological concentration\tmicelle alpha tocopherol,90µM\tmicelle control,physiological concentration\tmicelle alpha tocopherol,90µM\tmicelle control,physiological concentration\tmicelle gamma tocopherol,90µM\tmicelle control,physiological concentration\tmicelle gamma tocopherol,90µM\t";180 writer.dyeList ="Cy3\tCy5\tCy5\tCy3\tCy3\tCy5\tCy5\tCy3\tCy3\tCy5\tCy5\tCy3\tCy3\tCy5\tCy5\tCy3\t";181 writer.subjectList = "culture1\tculture2\tculture1\tculture2\tculture3\tculture4\tculture3\tculture4\tculture5\tculture6\tculture5\tculture6\tculture7\tculture8\tculture7\tculture8\t";182 75 183 76 184 77 String hybSection = writer.makeHybridizationsSection(); 185 78 System.out.println("hybs section = \n\n" + hybSection); 186 System.out.println("======================END TEST3======================"); 79 80 System.out.println("======================END TEST2======================\n\n"); 187 81 } 82 83 84 // ---------------------------------------------------------------------------------------------------------------------- 85 86 public static void test3() 87 { 88 System.out.println("======================START TEST 3============================"); 89 90 Tab2MageWriter writer = new Tab2MageWriter(); 91 92 writer.platform = "Agilent"; 93 writer.organism = "Mus musculus"; 94 writer.accession = "Agilent Mouse Oligo Microarray (V2) [G4121B]"; 95 writer.useWizard="yes"; 96 writer.legacyData = "yes"; 97 writer.mappingsMode = "manualSelect"; 98 writer.numHybs = "12"; 99 writer.expFactors = "disease state(normal,dilated cardiomyopathy)\ngenotype(TNNT2 +/deltaK210,wild_type,TNNT2 deltaK210/deltaK210)\n"; 100 writer.tissueList = "heart\theart\theart\theart\theart\theart\theart\theart\theart\theart\theart\theart\t"; 101 writer.fileList = "E-MEXP-1340-raw-data-1560505207.txt\tE-MEXP-1340-raw-data-1560505207.txt\tE-MEXP-1340-raw-data-1560505186.txt\tE-MEXP-1340-raw-data-1560505186.txt\tE-MEXP-1340-raw-data-1560505169.txt\tE-MEXP-1340-raw-data-1560505169.txt\tE-MEXP-1340-raw-data-1560505145.txt\tE-MEXP-1340-raw-data-1560505145.txt\tE-MEXP-1340-raw-data-1560505233.txt\tE-MEXP-1340-raw-data-1560505233.txt\tE-MEXP-1340-raw-data-1560505220.txt\tE-MEXP-1340-raw-data-1560505220.txt\t"; 102 writer.dyeList ="Cy5\tCy3\tCy5\tCy3\tCy5\tCy3\tCy5\tCy3\tCy5\tCy3\tCy5\tCy3\t"; 103 writer.subjectList = "Wt 2\tHeterozygous 2\tWt 2\tHomozygous 2\tWt 1\tHeterozygous 1\tWt 1\tHomozygous 1\tWt 3\tHeterozygous 3\tWt 3\tHomozygous 3\t"; 104 writer.combinationList = "normal\twild_type\tdilated cardiomyopathy\tTNNT2 +/deltaK210\tnormal\twild_type\tdilated cardiomyopathy\tTNNT2 deltaK210/deltaK210\tnormal\twild_type\tdilated cardiomyopathy\tTNNT2 +/deltaK210\tnormal\twild_type\tdilated cardiomyopathy\tTNNT2 deltaK210/deltaK210\tnormal\twild_type\tdilated cardiomyopathy\tTNNT2 +/deltaK210\tnormal\twild_type\tdilated cardiomyopathy\tTNNT2 deltaK210/deltaK210"; 105 writer.path = "/home/michab/E-MEXP-1340.raw.zip"; 106 107 String hybSection = writer.makeHybridizationsSection(); 108 System.out.println("hybs section = \n\n" + hybSection); 109 110 System.out.println("======================END TEST 3======================\n\n"); 111 } 112 188 113 189 114 // ---------------------------------------------------------------------------------------------------------------------- … … 191 116 public static void test4() 192 117 { 193 /* 194 experimentId = 2 195 domain = scri.ac.uk 196 accession = Agilent potato POCI 1x44k 197 qualityControl = biological replicate 198 experimentalDesign = strain_or_line_design, 199 experimentName = LD1 experiment 200 description = my test description 201 releaseDate = 2007-05-15 202 submissionDate = 2007-05-30 203 submitter = Micha Bayer 204 organization = SCRI 205 publicationTitle = My completely ropey paper 206 authors = Micha Bayer; Joe Bloggs 207 journal = The Journal of Irreproducible Results 208 volume = 1 209 issue = 1 210 pages = 112-122 211 year = 2007 212 pubmedId = 213 treatmentProtocol = treatment protocol text 214 poolingProtocol = pooling protocol text 215 extractionProtocol = extraction protocol text 216 labelingProtocol = labeling protocol text 217 hybridizationProtocol = hybs protocol text 218 scanningProtocol = scanning protocol text 219 treatmentProtocolParams = medium;CO2;antibiotics 220 hybridizationProtocolParams = temperature(degree_C) ; duration(hr) 221 scanningProtocolParams = 222 platform = GenePix 223 organism = Solanum tuberosum 224 numDesigns = 1 225 dyeSwap = yes 226 refSample = no 227 numTreatmentGroups = 4 228 expFactors = DevelopmentalStage(mature tubers (6 weeks post H3),golf ball size,2 weeks post H1,2 wee 229 ks post H2) 230 StrainOrLine(Maris Piper,Desiree,333-37,333-16) 231 numReplicates = 2 232 tissues = enterocyte 233 pooling = no 234 path = /home/michab/LD1_files.zip 235 subjectNames = Solanum phureja cv. 337-37.H1_1 236 Solanum phureja cv. 333-16.H1_1 237 Solanum phureja cv. 333-16.H3_2 238 Solanum tuberosum cv. Maris Piper.H3_1 239 Solanum tuberosum cv. Maris Piper.H3_2 240 Solanum tuberosum cv. Desiree.H3_1 241 Solanum phureja cv. 337-37.H3_2 242 Solanum tuberosum cv. Desiree.H3_2 243 Solanum phureja cv. 333-16.H4_1 244 Solanum phureja cv. 337-37.H4_1 245 Solanum phureja cv. 333-16.H4_2 246 Solanum tuberosum cv. Maris Piper.H4_1 247 Solanum tuberosum cv. Maris Piper.H4_2 248 Solanum tuberosum cv. Desiree.H4_1 249 Solanum phureja cv. 337-37.H4_2 250 Solanum tuberosum cv. Desiree.H4_2 251 Solanum phureja cv. 333-16.H1_2 252 Solanum tuberosum cv. Maris Piper.H1_1 253 Solanum tuberosum cv. Maris Piper.H1_2 254 Solanum tuberosum cv. Desiree.H1_1 255 Solanum phureja cv. 337-37.H1_2 256 Solanum tuberosum cv. Desiree.H1_2 257 Solanum phureja cv. 333-16.H2_1 258 Solanum phureja cv. 337-37.H2_1 259 Solanum phureja cv. 333-16.H2_2 260 Solanum tuberosum cv. Maris Piper.H2_1 261 Solanum tuberosum cv. Maris Piper.H2_2 262 Solanum tuberosum cv. Desiree.H2_1 263 Solanum phureja cv. 337-37.H2_2 264 Solanum tuberosum cv. Desiree.H2_2 265 Solanum phureja cv. 337-37.H3_1 266 Solanum phureja cv. 333-16.H3_1 118 System.out.println("======================START TEST 4============================"); 267 119 120 Tab2MageWriter writer = new Tab2MageWriter(); 268 121 269 useWizard = yes 270 legacyData = yes 271 mappingsMode = copyPaste 272 spreadSheetMappings = File Subject Tissue Dye FactorValue[DevelopmentalStage] FactorValue[ 273 StrainOrLine] 274 10d_7d_w685.gpr Solanum phureja cv. 337-37.H1_1 tuber cy3 golf ball size 333-37 275 10d_7d_w685.gpr Solanum phureja cv. 333-16.H1_1 tuber cy5 golf ball size 333-16 276 8b_13b_w685.gpr Solanum phureja cv. 333-16.H3_2 tuber cy3 2 weeks post H2 333-16 277 8b_13b_w685.gpr Solanum tuberosum cv. Maris Piper.H3_1 tuber cy5 2 weeks post H2 Maris Piper 278 14b_1b_w685.gpr Solanum tuberosum cv. Maris Piper.H3_2 tuber cy3 2 weeks post H2 Maris Piper 279 14b_1b_w685.gpr Solanum tuberosum cv. Desiree.H3_1 tuber cy5 2 weeks post H2 Desiree 280 2b_11b_w685.gpr Solanum phureja cv. 337-37.H3_2 tuber cy5 2 weeks post H2 333-37 281 2b_11b_w685.gpr Solanum tuberosum cv. Desiree.H3_2 tuber cy3 2 weeks post H2 Desiree 282 7a_10a_w685.gpr Solanum phureja cv. 333-16.H4_1 tuber cy3 mature tubers (6 weeks post H3) 333- 283 16 284 7a_10a_w685.gpr Solanum phureja cv. 337-37.H4_1 tuber cy5 mature tubers (6 weeks post H3) 333- 285 37 286 13a_8a_w685.gpr Solanum phureja cv. 333-16.H4_2 tuber cy5 mature tubers (6 weeks post H3) 333- 287 16 288 13a_8a_w685.gpr Solanum tuberosum cv. Maris Piper.H4_1 tuber cy3 mature tubers (6 weeks post 289 H3) Maris Piper 290 1a_14a_w685.gpr Solanum tuberosum cv. Maris Piper.H4_2 tuber cy5 mature tubers (6 weeks post 291 H3) Maris Piper 292 1a_14a_w685.gpr Solanum tuberosum cv. Desiree.H4_1 tuber cy3 mature tubers (6 weeks post 293 H3) Desiree 294 11a_2a_w685.gpr Solanum phureja cv. 337-37.H4_2 tuber cy5 mature tubers (6 weeks post H3) 333- 295 37 296 11a_2a_w685.gpr Solanum tuberosum cv. Desiree.H4_2 tuber cy3 mature tubers (6 weeks post 297 H3) Desiree 298 8d_13d_w685.gpr Solanum phureja cv. 333-16.H1_2 tuber cy3 golf ball size 333-16 299 8d_13d_w685.gpr Solanum tuberosum cv. Maris Piper.H1_1 tuber cy5 golf ball size Maris Piper 300 14d_1d_w685.gpr Solanum tuberosum cv. Maris Piper.H1_2 tuber cy3 golf ball size Maris Piper 301 14d_1d_w685.gpr Solanum tuberosum cv. Desiree.H1_1 tuber cy5 golf ball size Desiree 302 2d_11d_w685.gpr Solanum phureja cv. 337-37.H1_2 tuber cy5 golf ball size 333-37 303 2d_11d_w685.gpr Solanum tuberosum cv. Desiree.H1_2 tuber cy3 golf ball size Desiree 304 7c_10c_w685.gpr Solanum phureja cv. 333-16.H2_1 tuber cy3 2 weeks post H1 333-16 305 7c_10c_w685.gpr Solanum phureja cv. 337-37.H2_1 tuber cy5 2 weeks post H1 333-37 306 13c_8c_w685.gpr Solanum phureja cv. 333-16.H2_2 tuber cy5 2 weeks post H1 333-16 307 13c_8c_w685.gpr Solanum tuberosum cv. Maris Piper.H2_1 tuber cy3 2 weeks post H1 Maris Piper 308 1c_14c_w685.gpr Solanum tuberosum cv. Maris Piper.H2_2 tuber cy5 2 weeks post H1 Maris Piper 309 1c_14c_w685.gpr Solanum tuberosum cv. Desiree.H2_1 tuber cy3 2 weeks post H1 Desiree 310 11c_2c_w685.gpr Solanum phureja cv. 337-37.H2_2 tuber cy5 2 weeks post H1 333-37 311 11c_2c_w685.gpr Solanum tuberosum cv. Desiree.H2_2 tuber cy3 2 weeks post H1 Desiree 312 10b_7b_w685.gpr Solanum phureja cv. 337-37.H3_1 tuber cy3 2 weeks post H2 333-37 313 10b_7b_w685.gpr Solanum phureja cv. 333-16.H3_1 tuber cy5 2 weeks post H2 333-16 314 */ 122 writer.organism = "Mus musculus"; 123 writer.accession = "Agilent Mouse Oligo Microarray (V2) [G4121B]"; 124 writer.mappingsMode = "copyPaste"; 125 writer.numHybs = "12"; 126 writer.expFactors = "disease state(normal,dilated cardiomyopathy)\ngenotype(TNNT2 +/deltaK210,wild_type,TNNT2 deltaK210/deltaK210)\n"; 127 writer.spreadSheetMappings = "File\tSubject\tTissue\tDye\tFactorValue [disease state]\tFactorValue [genotype]\nE-MEXP-1340-raw-data-1560505207.txt\tWt 2\theart\tCy5\tnormal\twild_type\nE-MEXP-1340-raw-data-1560505207.txt\tHeterozygous 2\theart\tCy3\tdilated cardiomyopathy\tTNNT2 +/deltaK210\nE-MEXP-1340-raw-data-1560505186.txt\tWt 2\theart\tCy5\tnormal\twild_type\nE-MEXP-1340-raw-data-1560505186.txt\tHomozygous 2\theart\tCy3\tdilated cardiomyopathy\tTNNT2 deltaK210/deltaK210\nE-MEXP-1340-raw-data-1560505169.txt\tWt 1\theart\tCy5\tnormal\twild_type\nE-MEXP-1340-raw-data-1560505169.txt\tHeterozygous 1\theart\tCy3\tdilated cardiomyopathy\tTNNT2 +/deltaK210\nE-MEXP-1340-raw-data-1560505145.txt\tWt 1\theart\tCy5\tnormal\twild_type\nE-MEXP-1340-raw-data-1560505145.txt\tHomozygous 1\theart\tCy3\tdilated cardiomyopathy\tTNNT2 deltaK210/deltaK210\nE-MEXP-1340-raw-data-1560505233.txt\tWt 3\theart\tCy5\tnormal\twild_type\nE-MEXP-1340-raw-data-1560505233.txt\tHeterozygous 3\theart\tCy3\tdilated cardiomyopathy\tTNNT2 +/deltaK210\nE-MEXP-1340-raw-data-1560505220.txt\tWt 3\theart\tCy5\tnormal\twild_type\nE-MEXP-1340-raw-data-1560505220.txt\tHomozygous 3\theart\tCy3\tdilated cardiomyopathy\tTNNT2 deltaK210/deltaK210\t\n"; 128 129 String hybSection = writer.makeHybridizationsSection(); 130 System.out.println("hybs section = \n\n" + hybSection); 131 132 System.out.println("======================END TEST 4======================\n\n"); 315 133 } 316 134 135 // ---------------------------------------------------------------------------------------------------------------------- 136 317 137 318 138 }//end class
Note: See TracChangeset
for help on using the changeset viewer.