Class GeneSetController

java.lang.Object
ubic.gemma.web.controller.genome.gene.GeneSetController

@Controller @RequestMapping("/geneSet") public class GeneSetController extends Object
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 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 - gsvo
      modificationBased - 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

      public String canCurrentUserEditGroup(GeneSetValueObject gsvo)
      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

      public Collection<GeneSetValueObject> findGeneSetsByGene(Long geneId)
      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

      public Collection<GeneSetValueObject> findGeneSetsByName(String query, Long taxonId)
      Parameters:
      query - string to match to a gene set.
      taxonId - taxon id
      Returns:
      collection of GeneSetValueObject
    • getGenesInGroup

      public Collection<GeneValueObject> getGenesInGroup(Long groupId, Integer limit)
      AJAX If the current user has access to given gene group, will return the gene value objects in the gene group
      Parameters:
      groupId - group id
      limit - if greater than zero, limit to how many genes are returned (for previews)
      Returns:
      gene vos
    • getGeneIdsInGroup

      public Collection<Long> getGeneIdsInGroup(Long groupId)
      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 only
      taxonId - 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 only
      taxonId - 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 only
      taxonId - 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

      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.
      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

      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

      public 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. Cannot update name or description, just members
      Parameters:
      groupId - id of the gene set being updated
      geneIds - 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.
      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