Package org.intermine.bio.web.logic
Class GenomicRegionSearchQueryRunner
- java.lang.Object
-
- org.intermine.bio.web.logic.GenomicRegionSearchQueryRunner
-
- All Implemented Interfaces:
java.lang.Runnable
public class GenomicRegionSearchQueryRunner extends java.lang.Object implements java.lang.RunnableThis class has all database query logics for genomic region search. private static final Logger LOG = Logger.getLogger(GenomicRegionSearchService.class);
-
-
Constructor Summary
Constructors Constructor Description GenomicRegionSearchQueryRunner(javax.servlet.http.HttpServletRequest request, java.lang.String spanUUIDString, GenomicRegionSearchConstraint grsc, java.util.Map<GenomicRegion,org.intermine.objectstore.query.Query> queryMap)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,java.util.Map<java.lang.String,ChromosomeInfo>>getChromosomeInfo(org.intermine.api.InterMineAPI im)Query the information of all the organisms and their chromosomes' names and length.static java.util.Map<java.lang.String,java.util.Map<java.lang.String,ChromosomeInfo>>getChromosomeInfo(org.intermine.api.InterMineAPI im, int batchSize)Query the information of all the organisms and their chromosomes' names and length.static java.util.Map<java.lang.String,java.util.List<java.lang.String>>getFeatureAndSOInfo(org.intermine.api.InterMineAPI im, java.util.Map<java.lang.String,java.lang.String> classDescrs, int batchSize)Query the information of all feature types and their according so terms.static voidgetRegionStringFromPathQuery(org.intermine.pathquery.PathQuery query, org.intermine.api.InterMineAPI im, org.intermine.api.profile.Profile profile)query chromosome locations by a ready-to-use pathquery, return region string as chr:start..endstatic voidgetRegionStringFromSequenceFeatureList(java.util.Collection<org.intermine.model.bio.SequenceFeature> features, org.intermine.api.InterMineAPI im, org.intermine.api.profile.Profile profile)query chromosome locations by a list of sequence features, return region string as chr:start..endstatic java.util.Map<java.lang.String,java.lang.String>getTaxonInfo(org.intermine.api.InterMineAPI im, int batchSize)Query the information of all organisms and their taxon ids.voidrun()voidsearch()Main body of db search
-
-
-
Constructor Detail
-
GenomicRegionSearchQueryRunner
public GenomicRegionSearchQueryRunner(javax.servlet.http.HttpServletRequest request, java.lang.String spanUUIDString, GenomicRegionSearchConstraint grsc, java.util.Map<GenomicRegion,org.intermine.objectstore.query.Query> queryMap)Constructor- Parameters:
request- HttpServletRequestspanUUIDString- UUIDgrsc- GenomicRegionSearchConstraintqueryMap- map of span and its query
-
-
Method Detail
-
search
public void search()
Main body of db search
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable
-
getChromosomeInfo
public static java.util.Map<java.lang.String,java.util.Map<java.lang.String,ChromosomeInfo>> getChromosomeInfo(org.intermine.api.InterMineAPI im)
Query the information of all the organisms and their chromosomes' names and length. The results is stored in a Map. The result data will be used to validate users' span data. For each span, its chromosome must match the chrPID and range must not go beyond the length.- Parameters:
im- - the InterMineAPI- Returns:
- chrInfoMap - a HashMap with orgName as key and its chrInfo accordingly as value
-
getChromosomeInfo
public static java.util.Map<java.lang.String,java.util.Map<java.lang.String,ChromosomeInfo>> getChromosomeInfo(org.intermine.api.InterMineAPI im, int batchSize)
Query the information of all the organisms and their chromosomes' names and length. The results is stored in a Map. The result data will be used to validate users' span data. For each span, its chromosome must match the chrPID and range must not go beyond the length.- Parameters:
im- - the InterMineAPIbatchSize- - the query batch size to use- Returns:
- chrInfoMap - a HashMap with orgName as key and its chrInfo accordingly as value
-
getFeatureAndSOInfo
public static java.util.Map<java.lang.String,java.util.List<java.lang.String>> getFeatureAndSOInfo(org.intermine.api.InterMineAPI im, java.util.Map<java.lang.String,java.lang.String> classDescrs, int batchSize)Query the information of all feature types and their according so terms.- Parameters:
im- - the InterMineAPIclassDescrs- map of feature class/type to descriptionbatchSize- the query batch size to use- Returns:
- featureTypeToSOTermMap - a HashMap with featureType as key and its SO info accordingly as value
-
getTaxonInfo
public static java.util.Map<java.lang.String,java.lang.String> getTaxonInfo(org.intermine.api.InterMineAPI im, int batchSize)Query the information of all organisms and their taxon ids.- Parameters:
im- - the InterMineAPIbatchSize- the query batch size- Returns:
- orgTaxonIdMap - a HashMap with organism as key and its taxonId as value
-
getRegionStringFromSequenceFeatureList
public static void getRegionStringFromSequenceFeatureList(java.util.Collection<org.intermine.model.bio.SequenceFeature> features, org.intermine.api.InterMineAPI im, org.intermine.api.profile.Profile profile)query chromosome locations by a list of sequence features, return region string as chr:start..end- Parameters:
features- list of SequenceFeatureim- the InterMineAPIprofile- Profile
-
getRegionStringFromPathQuery
public static void getRegionStringFromPathQuery(org.intermine.pathquery.PathQuery query, org.intermine.api.InterMineAPI im, org.intermine.api.profile.Profile profile)query chromosome locations by a ready-to-use pathquery, return region string as chr:start..end- Parameters:
query- pathqueryim- the InterMineAPIprofile- Profile
-
-