| 104 | | q.addView(featureType + ".primaryIdentifier"); |
|---|
| 105 | | q.addView(featureType + ".score"); |
|---|
| 106 | | q.addView(featureType + ".chromosome.primaryIdentifier"); |
|---|
| 107 | | q.addView(featureType + ".chromosomeLocation.start"); |
|---|
| 108 | | q.addView(featureType + ".chromosomeLocation.end"); |
|---|
| 109 | | q.addView(featureType + ".chromosomeLocation.strand"); |
|---|
| 110 | | q.addView(featureType + ".submissions:experimentalFactors.type"); |
|---|
| 111 | | q.addView(featureType + ".submissions:experimentalFactors.name"); |
|---|
| 112 | | q.addConstraint(featureType + ".submissions.DCCid", Constraints.eq(new Integer(dccId))); |
|---|
| 113 | | q.addOrderBy(featureType + ".chromosome.primaryIdentifier"); |
|---|
| 114 | | q.addOrderBy(featureType + ".chromosomeLocation.start"); |
|---|
| 115 | | |
|---|
| 116 | | String experimentType = ""; |
|---|
| 117 | | if (sub.getExperimentType() != null) { |
|---|
| 118 | | experimentType = StringUtil.indefiniteArticle(sub.getExperimentType()) |
|---|
| 119 | | + " " + sub.getExperimentType() + " experiment in"; |
|---|
| | 114 | // Map <Integer, String> QQ = MetadataCache.getLocatedFeatureTypes(os); |
|---|
| | 115 | // String locFeature = MetadataCache.getLocatedFeatureTypes(os).get(dccId); |
|---|
| | 116 | // int dccNr = new Integer(dccId).intValue(); |
|---|
| | 117 | // String qq = QQ.get(dccNr); |
|---|
| | 118 | |
|---|
| | 119 | List<String> locFeatures = MetadataCache.getLocatedFeatureTypes(os).get(dccId); |
|---|
| | 120 | |
|---|
| | 121 | |
|---|
| | 122 | |
|---|
| | 123 | |
|---|
| | 124 | // LOG.info("HERE THEY ARE: " +QQ + "|" +qq + "<-"); |
|---|
| | 125 | |
|---|
| | 126 | LOG.info("HERE THEY ARE: " + dccId + "|" +locFeatures + "<-"); |
|---|
| | 127 | |
|---|
| | 128 | if (locFeatures.contains(featureType)){ |
|---|
| | 129 | q.addView(featureType + ".primaryIdentifier"); |
|---|
| | 130 | q.addView(featureType + ".score"); |
|---|
| | 131 | q.addView(featureType + ".chromosome.primaryIdentifier"); |
|---|
| | 132 | q.addView(featureType + ".chromosomeLocation.start"); |
|---|
| | 133 | q.addView(featureType + ".chromosomeLocation.end"); |
|---|
| | 134 | q.addView(featureType + ".chromosomeLocation.strand"); |
|---|
| | 135 | q.addView(featureType + ".submissions:experimentalFactors.type"); |
|---|
| | 136 | q.addView(featureType + ".submissions:experimentalFactors.name"); |
|---|
| | 137 | q.addConstraint(featureType + ".submissions.DCCid", Constraints.eq(new Integer(dccId))); |
|---|
| | 138 | q.addOrderBy(featureType + ".chromosome.primaryIdentifier"); |
|---|
| | 139 | q.addOrderBy(featureType + ".chromosomeLocation.start"); |
|---|
| | 140 | |
|---|
| | 141 | String experimentType = ""; |
|---|
| | 142 | if (sub.getExperimentType() != null) { |
|---|
| | 143 | experimentType = StringUtil.indefiniteArticle(sub.getExperimentType()) |
|---|
| | 144 | + " " + sub.getExperimentType() + " experiment in"; |
|---|
| | 145 | } |
|---|
| | 146 | |
|---|
| | 147 | String efSub = ""; |
|---|
| | 148 | if (SubmissionHelper.getExperimentalFactorString(sub).length() > 1){ |
|---|
| | 149 | efSub = " using " + SubmissionHelper.getExperimentalFactorString(sub); |
|---|
| | 150 | } |
|---|
| | 151 | |
|---|
| | 152 | String description = "All " + featureType + " features generated by submission " + dccId |
|---|
| | 153 | + ", " + experimentType + " " |
|---|
| | 154 | + sub.getOrganism().getShortName() + efSub |
|---|
| | 155 | + " (" + sub.getProject().getSurnamePI() + ")."; |
|---|
| | 156 | q.setDescription(description); |
|---|
| | 157 | |
|---|
| | 158 | // q.addView(featureType + ".primaryIdentifier"); |
|---|
| | 159 | // q.addView(featureType + ".score"); |
|---|
| | 160 | // q.addView(featureType + ".submissions:experimentalFactors.type"); |
|---|
| | 161 | // q.addView(featureType + ".submissions:experimentalFactors.name"); |
|---|
| | 162 | // q.addConstraint(featureType + ".submissions.DCCid", Constraints.eq(new Integer(dccId))); |
|---|
| | 163 | // |
|---|
| | 164 | // String experimentType = ""; |
|---|
| | 165 | // if (sub.getExperimentType() != null) { |
|---|
| | 166 | // experimentType = StringUtil.indefiniteArticle(sub.getExperimentType()) |
|---|
| | 167 | // + " " + sub.getExperimentType() + " experiment in"; |
|---|
| | 168 | // } |
|---|
| | 169 | // |
|---|
| | 170 | // String efSub = ""; |
|---|
| | 171 | // if (SubmissionHelper.getExperimentalFactorString(sub).length() > 1){ |
|---|
| | 172 | // efSub = " using " + SubmissionHelper.getExperimentalFactorString(sub); |
|---|
| | 173 | // } |
|---|
| | 174 | // |
|---|
| | 175 | // String description = "All " + featureType + " features generated by submission " + dccId |
|---|
| | 176 | // + ", " + experimentType + " " |
|---|
| | 177 | // + sub.getOrganism().getShortName() + efSub |
|---|
| | 178 | // + " (" + sub.getProject().getSurnamePI() + ")."; |
|---|
| | 179 | // q.setDescription(description); |
|---|
| | 180 | |
|---|
| | 181 | } else { |
|---|
| | 182 | |
|---|
| | 183 | |
|---|
| | 184 | q.addView(featureType + ".primaryIdentifier"); |
|---|
| | 185 | q.addView(featureType + ".score"); |
|---|
| | 186 | q.addView(featureType + ".submissions:experimentalFactors.type"); |
|---|
| | 187 | q.addView(featureType + ".submissions:experimentalFactors.name"); |
|---|
| | 188 | q.addConstraint(featureType + ".submissions.DCCid", Constraints.eq(new Integer(dccId))); |
|---|
| | 189 | |
|---|
| | 190 | String experimentType = ""; |
|---|
| | 191 | if (sub.getExperimentType() != null) { |
|---|
| | 192 | experimentType = StringUtil.indefiniteArticle(sub.getExperimentType()) |
|---|
| | 193 | + " " + sub.getExperimentType() + " experiment in"; |
|---|
| | 194 | } |
|---|
| | 195 | |
|---|
| | 196 | String efSub = ""; |
|---|
| | 197 | if (SubmissionHelper.getExperimentalFactorString(sub).length() > 1){ |
|---|
| | 198 | efSub = " using " + SubmissionHelper.getExperimentalFactorString(sub); |
|---|
| | 199 | } |
|---|
| | 200 | |
|---|
| | 201 | String description = "All " + featureType + " features generated by submission " + dccId |
|---|
| | 202 | + ", " + experimentType + " " |
|---|
| | 203 | + sub.getOrganism().getShortName() + efSub |
|---|
| | 204 | + " (" + sub.getProject().getSurnamePI() + ")."; |
|---|
| | 205 | q.setDescription(description); |
|---|
| | 206 | |
|---|
| | 207 | // |
|---|
| | 208 | // |
|---|
| | 209 | // |
|---|
| | 210 | // q.addView(featureType + ".primaryIdentifier"); |
|---|
| | 211 | // q.addView(featureType + ".score"); |
|---|
| | 212 | // q.addView(featureType + ".chromosome.primaryIdentifier"); |
|---|
| | 213 | // q.addView(featureType + ".chromosomeLocation.start"); |
|---|
| | 214 | // q.addView(featureType + ".chromosomeLocation.end"); |
|---|
| | 215 | // q.addView(featureType + ".chromosomeLocation.strand"); |
|---|
| | 216 | // q.addView(featureType + ".submissions:experimentalFactors.type"); |
|---|
| | 217 | // q.addView(featureType + ".submissions:experimentalFactors.name"); |
|---|
| | 218 | // q.addConstraint(featureType + ".submissions.DCCid", Constraints.eq(new Integer(dccId))); |
|---|
| | 219 | // q.addOrderBy(featureType + ".chromosome.primaryIdentifier"); |
|---|
| | 220 | // q.addOrderBy(featureType + ".chromosomeLocation.start"); |
|---|
| | 221 | // |
|---|
| | 222 | // String experimentType = ""; |
|---|
| | 223 | // if (sub.getExperimentType() != null) { |
|---|
| | 224 | // experimentType = StringUtil.indefiniteArticle(sub.getExperimentType()) |
|---|
| | 225 | // + " " + sub.getExperimentType() + " experiment in"; |
|---|
| | 226 | // } |
|---|
| | 227 | // |
|---|
| | 228 | // String efSub = ""; |
|---|
| | 229 | // if (SubmissionHelper.getExperimentalFactorString(sub).length() > 1){ |
|---|
| | 230 | // efSub = " using " + SubmissionHelper.getExperimentalFactorString(sub); |
|---|
| | 231 | // } |
|---|
| | 232 | // |
|---|
| | 233 | // String description = "All " + featureType + " features generated by submission " + dccId |
|---|
| | 234 | // + ", " + experimentType + " " |
|---|
| | 235 | // + sub.getOrganism().getShortName() + efSub |
|---|
| | 236 | // + " (" + sub.getProject().getSurnamePI() + ")."; |
|---|
| | 237 | // q.setDescription(description); |
|---|
| | 238 | |
|---|