Changeset 64
- Timestamp:
- Dec 15, 2009, 4:37:11 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/LoadController.groovy
r63 r64 24 24 File file = new File("/home/ademcan/Desktop/magetab/examples/E-GEOD-2354.idf.txt"); 25 25 26 def investigationDesign = new magetab.idf.InvestigationDesign(); 26 27 def person = new magetab.idf.Person(); 27 28 def protocol = new magetab.idf.Protocol(); 28 29 def publication = new magetab.idf.Publication(); 30 def normalization = new magetab.sdrf.Normalization(); 31 //def termSource = new magetab.adf.Termsource(); 32 def comment = new magetab.idf.Comment(); 33 def experimentalInfo = new magetab.idf.ExperimentalInfo(); 29 34 30 35 ArrayList rows = new ArrayList(); … … 41 46 if (tmp_list.size() > 1){ 42 47 if (tmp_list[0]=="Investigation Title"){ 43 magetab.idf.InvestigationDesign investigationDesign = new magetab.idf.InvestigationDesign(); 44 investigationDesign.title=tmp_list[1]; 48 investigationDesign.title = tmp_list[1]; 49 } 50 else if (tmp_list[0]=="Comment[AEMIAMESCORE]") { 51 comment.aemiameScore = tmp_list[1]; 52 } 53 else if (tmp_list[0]=="Comment[SecondaryAccession]") { 54 comment.secondaryAccession = tmp_list[1]; 55 } 56 else if (tmp_list[0]=="Comment[ArrayExpressReleaseDate]") { 57 comment.arrayExpressReleaseDate = tmp_list[1]; 58 } 59 else if (tmp_list[0]=="Comment[ArrayExpressAccession]") { 60 comment.arrayExpressAccession = tmp_list[1]; 61 } 62 else if (tmp_list[0]=="Comment[MAGETAB TimeStamp_Version]") { 63 comment.timestamp_version = tmp_list[1]; 45 64 } 46 65 else if (tmp_list[0]=="Experimental Design") { 47 48 } 49 else if (tmp_list[0]=="Experimental Term Source REF") { 50 66 String design = tmp_list[1]; 67 for (a in 2..tmp_list.size()-1){ 68 design = design + " , " +tmp_list[a]; 69 } 70 experimentalInfo.design = design; 71 } 72 else if (tmp_list[0]=="Experimental Design Term Source REF") { 73 String term_ref = tmp_list[1]; 74 for (a in 2..tmp_list.size()-1){ 75 term_ref = term_ref + " , " +tmp_list[a]; 76 } 77 experimentalInfo.design_term_source_ref = term_ref; 51 78 } 52 79 else if (tmp_list[0]=="Experimental Factor Name") { 53 80 String factor_name = tmp_list[1]; 81 for (a in 2..tmp_list.size()-1){ 82 factor_name = factor_name + " , " +tmp_list[a]; 83 } 84 experimentalInfo.factor_name = factor_name; 54 85 } 55 86 else if (tmp_list[0]=="Experimental Factor Type") { 56 87 String factor_type = tmp_list[1]; 88 for (a in 2..tmp_list.size()-1){ 89 factor_type = factor_type + " , " +tmp_list[a]; 90 } 91 experimentalInfo.factor_type = factor_type; 57 92 } 58 93 else if (tmp_list[0]=="Experimental Factor Term Source REF") { 59 94 experimentalInfo.factor_term_source_ref = tmp_list[1]; 60 95 } 61 96 else if (tmp_list[0]=="Person Last Name") { … … 102 137 } 103 138 else if (tmp_list[0]=="Normalization Type") { 104 139 normalization.type = tmp_list[1]; 105 140 } 106 141 else if (tmp_list[0]=="Normalization Term Source REF") { 107 142 normalization.term_source_ref = tmp_list[1]; 108 143 } 109 144 else if (tmp_list[0]=="Date Of Experiment") { 110 145 investigationDesign.dateOfExperiment = tmp_list[1]; 111 146 } 112 147 else if (tmp_list[0]=="Public Release Date") { 113 148 investigationDesign.publicReleaseDate = tmp_list[1]; 114 149 } 115 150 else if (tmp_list[0]=="PubMed ID") { … … 120 155 } 121 156 else if (tmp_list[0]=="Publication Author List") { 122 157 publication.authors_list = tmp_list[1]; 123 158 } 124 159 else if (tmp_list[0]=="Publication Title") { … … 126 161 } 127 162 else if (tmp_list[0]=="Publication Status") { 128 163 def status = new magetab.idf.OntologyTerm(); 164 status.text = tmp_list[1]; 165 status.save(); 166 publication.status = status; 129 167 } 130 168 else if (tmp_list[0]=="Publication Status Term Source REF") { 131 169 publication.status_term_source_ref = tmp_list[1]; 132 170 } 133 171 else if (tmp_list[0]=="Experiment Description") { 134 172 investigationDesign.experimentDescription = tmp_list[1]; 135 173 } 136 174 else if (tmp_list[0]=="Protocol Name") { … … 138 176 } 139 177 else if (tmp_list[0]=="Protocol Type") { 140 178 def type = new magetab.idf.OntologyTerm(); 179 for (j in 1..tmp_list.size()){ 180 type.text = tmp_list[j]; 181 type.save(); 182 } 183 protocol.type = type; 141 184 } 142 185 else if (tmp_list[0]=="Protocol Description") { … … 156 199 } 157 200 else if (tmp_list[0]=="Protocol Term Source REF") { 158 201 protocol.term_source_ref = tmp_list[1]; 159 202 } 160 203 else if (tmp_list[0]=="SDRF File") { … … 162 205 } 163 206 else if (tmp_list[0]=="Term Source Name") { 164 207 //termSource.name = tmp_list[1]; 165 208 } 166 209 else if (tmp_list[0]=="Term Source File") { 167 210 //termSource.file = tmp_list[1]; 168 211 } 169 212 else if (tmp_list[0]=="Term Source Version") { 170 171 } 172 213 //termSource.version = tmp_list[1]; 214 } 173 215 } 174 216 … … 176 218 protocol.save(); 177 219 publication.save(); 220 normalization.save(); 221 investigationDesign.save(); 222 comment.save(); 223 experimentalInfo.save(); 224 //termSource.save(); 178 225 179 226 } -
trunk/grails-app/domain/magetab/idf/InvestigationDesign.groovy
r59 r64 5 5 String title 6 6 String experimentDescription 7 DatedateOfExperiment8 DatepublicReleaseDate7 String dateOfExperiment 8 String publicReleaseDate 9 9 10 10 static hasMany = [ … … 23 23 24 24 static constraints = { 25 title(nullable:true,blank:true) 26 experimentDescription(nullable:true,blank:true) 27 dateOfExperiment(nullable:true,blank:true) 28 publicReleaseDate(nullable:true,blank:true) 25 29 } 26 30 } -
trunk/grails-app/domain/magetab/idf/OntologyTerm.groovy
r59 r64 11 11 static constraints = { 12 12 // termSource(nullable: true) 13 text(nullable:true,blank:true) 14 category(nullable:true,blank:true) 15 accessionNumber(nullable:true,blank:true) 13 16 } 14 17 } -
trunk/grails-app/domain/magetab/idf/Protocol.groovy
r63 r64 10 10 String parameters 11 11 String contact 12 String term_source_ref 12 13 13 14 static hasMany = [ … … 23 24 parameters(nullable:true,blank:true) 24 25 contact(nullable:true,blank:true) 26 term_source_ref(nullable:true,blank:true) 25 27 } 26 28 } -
trunk/grails-app/domain/magetab/idf/Publication.groovy
r63 r64 7 7 String DOI 8 8 OntologyTerm status 9 String status_term_source_ref 10 String authors_list 9 11 10 12 static hasMany = [ … … 17 19 pubMedID(nullable:true,blank:true) 18 20 DOI(nullable:true,blank:true) 21 authors_list(nullable:true,blank:true) 19 22 } 20 23 } -
trunk/grails-app/domain/magetab/sdrf/Normalization.groovy
r58 r64 3 3 class Normalization { 4 4 5 String type; 6 String term_source_ref; 7 5 8 static constraints = { 9 type(nullable:true,blank:true) 10 term_source_ref(nullable:true,blank:true) 6 11 } 7 12 }
Note: See TracChangeset
for help on using the changeset viewer.