Class GeneSetController
java.lang.Object
ubic.gemma.web.controller.genome.gene.GeneSetController
Exposes GeneSetServices methods over ajax. Some methods take and return collections to be compatible with Store
interfaces (which, as of May 2014, we do not use)
- Author:
- kelsey
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddSessionGroup
(SessionBoundGeneSetValueObject gsvo, Boolean modificationBased) * AJAX adds the gene group to the session, used by SessionGeneGroupStore and SessionDatasetGroupStore sets the groups taxon value and reference.addSessionGroups
(Collection<SessionBoundGeneSetValueObject> geneSetVos, Boolean modificationBased) Deprecated.addUserAndSessionGroups
(Collection<GeneSetValueObject> geneSetVos) AJAX adds the gene group to the sessionAJAX returns a JSON string encoding whether the current user owns the group and whether the group is db-backedcreate
(Collection<GeneSetValueObject> geneSetVos) AJAX create an entities in the database based on the value objects passed infindGeneSetsByGene
(Long geneId) Given a Gemma Gene Id will find all gene groups that the current user is allowed to usefindGeneSetsByName
(String query, Long taxonId) getGeneIdsInGroup
(Long groupId) AJAXgetGenesInGroup
(Long groupId, Integer limit) AJAX If the current user has access to given gene group, will return the gene value objects in the gene groupgetUserAndSessionGeneGroups
(boolean privateOnly, Long taxonId) AJAX Returns the current users gene sets as well as their session gene setsgetUserSessionGeneGroups
(boolean privateOnly, Long taxonId) AJAX Returns just the current users gene setsgetUsersGeneGroups
(boolean privateOnly, Long taxonId) AJAX Returns just the current users gene setsAJAX - load with the IDs filled inAJAX Given a valid gene group will remove it from db (if the user has permissons to do so).Deprecated.AJAX Given valid gene groups will remove them from the session or the database appropriately.org.springframework.web.servlet.ModelAndView
showGeneSet
(Long id) If the current user has access to given gene group will return the gene ids in the gene group;update
(Collection<DatabaseBackedGeneSetValueObject> geneSetVos) AJAX Updates the given gene group (permission permitting) with the given list of geneIds Will not allow the same gene to be added to the gene set twice.void
updateMembers
(Long groupId, Collection<Long> geneIds) AJAX Updates the given gene group (permission permitting) with the given list of geneIds Will not allow the same gene to be added to the gene set twice.updateNameDesc
(DatabaseBackedGeneSetValueObject geneSetVO) AJAX Updates the given gene group (permission permitting) with the given list of geneIds Will not allow the same gene to be added to the gene set twice.AJAX updates a session groupDeprecated.AJAX Updates the session group and user database groups.
-
Constructor Details
-
GeneSetController
public GeneSetController()
-
-
Method Details
-
addSessionGroups
@Deprecated public Collection<SessionBoundGeneSetValueObject> addSessionGroups(Collection<SessionBoundGeneSetValueObject> geneSetVos, Boolean modificationBased) Deprecated.AJAX adds the gene group to the session, used by SessionGeneGroupStore and SessionDatasetGroupStore sets the groups taxon value and reference.- Parameters:
geneSetVos
- value object constructed on the client.modificationBased
- whether the set was modified by the user- Returns:
- collection of added session groups (with updated reference.id etc)
-
addSessionGroup
public SessionBoundGeneSetValueObject addSessionGroup(SessionBoundGeneSetValueObject gsvo, Boolean modificationBased) * AJAX adds the gene group to the session, used by SessionGeneGroupStore and SessionDatasetGroupStore sets the groups taxon value and reference.- Parameters:
gsvo
- gsvomodificationBased
- whether the set was modified by the user- Returns:
- gene set vo
-
addUserAndSessionGroups
public Collection<GeneSetValueObject> addUserAndSessionGroups(Collection<GeneSetValueObject> geneSetVos) AJAX adds the gene group to the session- Parameters:
geneSetVos
- value object constructed on the client.- Returns:
- id of the new gene group
-
canCurrentUserEditGroup
AJAX returns a JSON string encoding whether the current user owns the group and whether the group is db-backed- Parameters:
gsvo
- gsvo- Returns:
- string
-
create
AJAX create an entities in the database based on the value objects passed in- Parameters:
geneSetVos
- value objects constructed on the client.- Returns:
- value objects converted from the newly created entities
-
findGeneSetsByGene
Given a Gemma Gene Id will find all gene groups that the current user is allowed to use- Parameters:
geneId
- gene id- Returns:
- collection of geneSetValueObject
-
findGeneSetsByName
- Parameters:
query
- string to match to a gene set.taxonId
- taxon id- Returns:
- collection of GeneSetValueObject
-
getGenesInGroup
AJAX If the current user has access to given gene group, will return the gene value objects in the gene group- Parameters:
groupId
- group idlimit
- if greater than zero, limit to how many genes are returned (for previews)- Returns:
- gene vos
-
getGeneIdsInGroup
AJAX- Parameters:
groupId
- group id- Returns:
- ids of genes in the gene set.
-
getUserAndSessionGeneGroups
public Collection<GeneSetValueObject> getUserAndSessionGeneGroups(boolean privateOnly, Long taxonId) AJAX Returns the current users gene sets as well as their session gene sets- Parameters:
privateOnly
- private onlytaxonId
- if non-null, restrict the groups by ones which have genes in the given taxon.- Returns:
- gene set vos
-
getUserSessionGeneGroups
public Collection<SessionBoundGeneSetValueObject> getUserSessionGeneGroups(boolean privateOnly, Long taxonId) AJAX Returns just the current users gene sets- Parameters:
privateOnly
- private onlytaxonId
- if non-null, restrict the groups by ones which have genes in the given taxon.- Returns:
- gene set vos
-
getUsersGeneGroups
public Collection<DatabaseBackedGeneSetValueObject> getUsersGeneGroups(boolean privateOnly, Long taxonId) AJAX Returns just the current users gene sets- Parameters:
privateOnly
- private onlytaxonId
- if non-null, restrict the groups by ones which have genes in the given taxon.- Returns:
- gene set vos
-
load
AJAX - load with the IDs filled in- Parameters:
id
- id- Returns:
- gene set vos
-
remove
public Collection<DatabaseBackedGeneSetValueObject> remove(Collection<DatabaseBackedGeneSetValueObject> vos) AJAX Given a valid gene group will remove it from db (if the user has permissons to do so).- Parameters:
vos
- vos- Returns:
- gene set vos
-
removeSessionGroups
@Deprecated public Collection<SessionBoundGeneSetValueObject> removeSessionGroups(Collection<SessionBoundGeneSetValueObject> vos) Deprecated.AJAX Given a valid gene group will remove it from the session.- Parameters:
vos
- vos- Returns:
- gene set vos
-
removeUserAndSessionGroups
public Collection<GeneSetValueObject> removeUserAndSessionGroups(Collection<GeneSetValueObject> vos) AJAX Given valid gene groups will remove them from the session or the database appropriately.- Parameters:
vos
- vos- Returns:
- gene set vos
-
showGeneSet
@RequestMapping(value="/showGeneSet.html", method={GET,HEAD}) public org.springframework.web.servlet.ModelAndView showGeneSet(@RequestParam("id") Long id) If the current user has access to given gene group will return the gene ids in the gene group; -
update
public Collection<DatabaseBackedGeneSetValueObject> update(Collection<DatabaseBackedGeneSetValueObject> geneSetVos) AJAX Updates the given gene group (permission permitting) with the given list of geneIds Will not allow the same gene to be added to the gene set twice.- Parameters:
geneSetVos
- vos- Returns:
- gene set vos
-
updateMembers
AJAX Updates the given gene group (permission permitting) with the given list of geneIds Will not allow the same gene to be added to the gene set twice. Cannot update name or description, just members- Parameters:
groupId
- id of the gene set being updatedgeneIds
- gene ids
-
updateNameDesc
AJAX Updates the given gene group (permission permitting) with the given list of geneIds Will not allow the same gene to be added to the gene set twice.- Parameters:
geneSetVO
- gene set vos- Returns:
- gene set vo
-
updateSessionGroups
@Deprecated public Collection<SessionBoundGeneSetValueObject> updateSessionGroups(Collection<SessionBoundGeneSetValueObject> vos) Deprecated.AJAX Updates the session group.- Parameters:
vos
- vos- Returns:
- gene set vos
-
updateSessionGroup
AJAX updates a session group- Parameters:
vos
- vos- Returns:
- gene set vo
-
updateUserAndSessionGroups
public Collection<GeneSetValueObject> updateUserAndSessionGroups(Collection<GeneSetValueObject> vos) AJAX Updates the session group and user database groups.- Parameters:
vos
- vos- Returns:
- gene set vos
-