Changeset 5928
- Timestamp:
- Apr 29, 2020, 1:44:13 PM (9 months ago)
- Location:
- extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/plugins/release/StringTieWriter.java
r5875 r5928 1 1 package net.sf.basedb.reggie.plugins.release; 2 2 3 import java.util.ArrayList; 3 4 import java.util.Arrays; 4 5 import java.util.HashSet; … … 8 9 import org.json.simple.JSONObject; 9 10 11 import net.sf.basedb.core.AnnotationType; 10 12 import net.sf.basedb.core.DbControl; 11 13 import net.sf.basedb.core.DerivedBioAssay; … … 13 15 import net.sf.basedb.core.File; 14 16 import net.sf.basedb.core.Item; 17 import net.sf.basedb.core.ItemQuery; 15 18 import net.sf.basedb.core.Location; 16 19 import net.sf.basedb.core.Quantity; … … 18 21 import net.sf.basedb.core.RawDataType; 19 22 import net.sf.basedb.core.Type; 23 import net.sf.basedb.core.query.Expressions; 24 import net.sf.basedb.core.query.Hql; 25 import net.sf.basedb.core.query.Orders; 26 import net.sf.basedb.core.query.Restrictions; 27 import net.sf.basedb.reggie.Reggie; 20 28 import net.sf.basedb.reggie.dao.Annotationtype; 21 29 import net.sf.basedb.reggie.dao.Datafiletype; … … 37 45 private final ScriptWriter scriptWriter; 38 46 private final Filter<File> fileFilterStringTie; 47 private final List<Annotationtype> releaseTypes; 39 48 40 49 public StringTieWriter(DbControl dc, ReleaseWriterOptions options, ScriptWriter scriptWriter) … … 46 55 "t_data.ctab", "transcript_covered.gtf" 47 56 )), true, new FileLocationFilter(Location.EXTERNAL, true)); 57 58 // Load all "STRINGTIE_Release" annotation types 59 ItemQuery<AnnotationType> query = AnnotationType.getQuery(Item.RAWBIOASSAY); 60 query.setIncludes(Reggie.INCLUDE_IN_CURRENT_PROJECT); 61 query.join(Hql.innerJoin("categories", "cat")); 62 query.restrict(Restrictions.eq(Hql.property("cat", "name"), Expressions.string("STRINGTIE_Release"))); 63 query.order(Orders.asc(Hql.property("name"))); 64 List<AnnotationType> tmp = query.list(dc); 65 66 releaseTypes = new ArrayList<>(tmp.size()); 67 for (AnnotationType at : tmp) 68 { 69 releaseTypes.add(Annotationtype.get(at)); 70 } 48 71 } 49 72 … … 80 103 // From the rawbioassay item 81 104 addCommonRawBioAssayAnnotations(item, rba, jsonAnnotations); 105 for (Annotationtype at : releaseTypes) 106 { 107 jsonAnnotations.add(item.getAnnotationJSON(at, rba, null)); 108 } 82 109 83 110 // From the AlignedSequences item … … 136 163 rawFactory.createAnnotationType(Annotationtype.DATA_FILES_FOLDER).setProjectSpecificValues(true); 137 164 rawFactory.createFileType(Datafiletype.GENERIC_RAWDATA, Rawdatatype.STRINGTIE.getPlatformId(), Rawdatatype.STRINGTIE.getVariantId()); 138 165 166 for (Annotationtype at : releaseTypes) 167 { 168 CohortAnnotationType cat = rawFactory.createAnnotationType(at); 169 } 170 139 171 return rawFactory.allCreated(); 140 172 } -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java
r5922 r5928 1079 1079 jsonChecks.add(checkAnnotationTypeCategory(dc, "GEX_Release", "This category is for Cufflinks annotations that should be included in data releases.", createIfMissing)); 1080 1080 jsonChecks.add(checkAnnotationTypeCategory(dc, "VCALL_Release", "This category is for VariantCall annotations that should be included in data releases.", createIfMissing)); 1081 jsonChecks.add(checkAnnotationTypeCategory(dc, "STRINGTIE_Release", "This category is for StringTie annotations that should be included in data releases.", createIfMissing)); 1081 1082 1082 1083 // File servers
Note: See TracChangeset
for help on using the changeset viewer.