edu.mayo.bsi.ngsportal.shared
Interface NGSPortalService

All Superinterfaces:
com.google.gwt.user.client.rpc.RemoteService
All Known Implementing Classes:
NGSPortalServiceImpl

@RemoteServiceRelativePath(value="NGSPortal")
public interface NGSPortalService
extends com.google.gwt.user.client.rpc.RemoteService

The client side stub for the RPC service.


Field Summary
static int kAttachToGroup
          Specifies that the key : value pair is about a Group
static int kAttachToProject
          Specifies that the key : value pair is about a Project
static int kAttachToRun
          Specifies that the key : value pair is about a run
static int kAttachToSample
          Specifies that the key : value pair is about a sample
static int kAttachToSequencedSample
          Specifies that the key : value pair is about a sequenced sample
static int kAttachToUser
          Specifies that the key : value pair is about a user
static int kFirstLabUserRole
          The smallest role number that specifies a lab related user
static int kIndexSeqLength
          Allowed length for a non-empty Index Sequence
static int kLastLabUserRole
          The largest role number that specifies a lab related user
static int kRoleAdmin
           
static int kRoleCoPI
           
static int kRoleInformaticsLead
           
static int kRoleInformaticsPhdLead
           
static int kRoleInformaticsSpecialist
           
static int kRoleIt
           
static int kRoleLabManager
           
static int kRoleLabTech
           
static int kRolePI
           
static int kRoleProjCreator
           
static int kRoleProjLead
           
static int kRoleProjPI
           
static int kRoleProjSpec
           
static int kRoleResearcher
           
static int kRoleSpa
           
static int kRoleStatistician
           
 
Method Summary
 boolean addExternalUser(String firstName, String lastName, String id)
          Add an external user to the database
 int addGroup(int connectionID, String name, String description)
          Adds a new group
 boolean addKeyValuePair(int connectionID, int table, String name, String more, String key, String value)
          Add a Key : Value pair about a specified item to the DB
 String addNewRerun(int connectionID, int projectID, String projectName)
           
 boolean addNote(int connectionID, String note, String tableName, int rowID)
          Adds a note to the database
 String addProject(int connectionID, String notes, boolean isReanalysis, int[] seqSampleIDs, Integer leadID, Integer specID, Integer piID)
          Adds a new project.
 boolean addToFamily(int connectionID, String family, String parentID, String rlimsID, String sampleParentID, String name, Boolean isMale)
          Add a sample to a family, creating the family if necessary.
 boolean addUsersToGroup(int connectionID, int groupID, Map<String,Integer> users)
          Add users to an existing group
 boolean addUsersToProject(int connectionID, Map<String,Boolean> users, int role, String project)
          Give one or more users' access to a project
 boolean checkAccessPrivilages(String string)
           
 boolean deleteGroup(int connectionID, int groupID)
          Delete an existing group
 boolean deleteNote(int connectionID, String tableName, int rowID, Date noteDate)
          Deletes a note from the database.
 Map<String,Integer> getAllSecondaryStatuses()
           
 List<String> getAnalysisStatuses()
          Get the names for each of the analysis statuses the database recognizes
 List<String> getAnalysisTypes()
          Get the names for each of the analysis types the database recognizes
 List<AnalysisInfo> getAnalyzedSamples(int connectionID, String theRun)
          Finds all the samples for a run that have had an analysis done
 List<String> getApplicationTypes()
          Get the Descriptions for each of the application types the database recognizes
 List<String> getApplicationTypes(String runID, String pi)
          Get the Descriptions for each of the application types the database recognizes, that occur with the specified PI and / or runID
 int getApplicationTypesForSamples(int[] sampleIDs)
          Gets the ID of the Application Type for more of the passed in samples than anyone else
 List<SGEScriptSummary> getAvgCPUSecondsPerScript(SGEFilter filter, int connectionID)
          Queries the portal database and returns a list of SGEScriptSummary containing the average of cpuseconds consumed by the scripts defined by the provided SGEFilter
 List<SGEScriptSummary> getAvgRun(SGEFilter filter, int connectionID)
          Queries the portal database and returns a list of SGEScriptSummary containing the sum of cpuseconds consumed by the scripts defined by the provided SGEFilter
 List<RunData> getCompletedRuns(int connectionID, String piName, String runID)
          Get all the completed runs
 ConnectionResponse getConnection()
          Ask the server for the information the client needs in order to send data to the server
 List<ContactInfo> getContacts(int connectionID, int[] contactIDs)
          Gets one or more contacts.
 Map<String,PrimaryAnalysisBean> getCurrentPrimaryStatus(int connectionID)
          Get the latest primary analysis statuses, from all the primary analysis results that have been updated in the last week
 String getDefaultProjectName(String runName, String appType, String pi, boolean isReanalysis)
          Get a default Secondary Project Reanalysis name from the server given the run, PI, and appType, then ask the user for the reanalysis name, given the default name
 Map<String,Integer> getErrorsPerRun(SGEFilter filter, int connectionID)
          Returns a set of pairs of RunIDs - ScriptNames and error counts defined by the passed filter object.
 List<FileLocation> getFileLocations()
          Get a List of the available FileLocations that files might be saved in
 Map<String,Integer> getFlowcellsPerMonth(SGEFilter filter, int connectionID)
           
 List<GroupInfo> getGroups(int connectionID)
          Get the list of all the groups in the DB
 List<InstrumentInfo> getInstrumentHistory(int connectionID, String instrument)
          Get all the actions recorded for the given instrument
 Map<String,String> getInstrumentStatus(int connectionID)
          Query the Primary Analysis DB for the runs that have completed the given task, and when they did it
 Map<String,String> getISdetails()
          Get a map from LAN IDs to names for all the Informatics Specialists
 List<ResultInfo> getMatchingRuns(int connectionID, String piName, String runID, String sample, String application, String rlimsProject, String rlimsID, Date startDate, Date endDate, boolean onlyAnalyzed, String projName)
          Search the database for all the runs matching the criteria given, and return them
 List<Note> getNote(int connectionID, String tableName, int rowID)
          Get one or more notes from the database
 int getPIForSamples(int[] sampleIDs)
          Gets the ContactLinker ID of the Contact who is the PI for more of the passed in samples than anyone else
 List<String> getPINames()
          Get the names of all the PIs in the database
 List<String> getPrimaryAnalysisStatuses()
          Get the names for each of the Primary Analysis Statuses the database recognizes
 List<String> getProjectNames(int connectionID)
          Get the names of all the secondary analysis projects in the database that this user can see
 List<ProjectInfo> getProjects(int connectionID, int[] projIDs)
          Gets one or more projects.
 List<SecondaryProjectInfo> getProjects(int connectionID, String projectName)
          Get all the Secondary Projects created by this individual, or the single project projectName
 ProjectSummaryBuilder getProjectsSummary(int connectionID, String userName, Date fromDate, Date toDate)
           
 List<QCResult> getQCResults(int connectionID, String sampleName, String runID)
          Get all the information about the QCResults for a sample from a given run
 List<String> getReadTypes()
          Get the Descriptions for each of the read types the database recognizes
 List<ResultInfo> getRetainedSamples(int connectionID, String piName, String runID, String sample, boolean isPrimary)
          Get all the runs and samples that have data files that are currently marked for non-deletion
 List<String> getRLIMSIDs(int connectionID)
          Get all the RLIMS Sample "Sample IDs" in the database that this user can see
 List<String> getRLIMSProjectNames(int connectionID)
          Get all the RLIMS project names in the database that this user can see
 List<String> getRoles()
          Get all the Contact Roles in the database
 RunData getRunData(int connectionID, String piName, String runID)
          Get all the metadata from a given run, owned by a given PI
 List<String> getRunIDs(int connectionID)
          Get all the run IDs in the database this user can see
 List<String> getRunIDs(int connectionID, String pi, String appType)
          Get all the run IDs in the database this user can see, that have at least one sample that has the specified PI and / or application type
 boolean getRunSecondaryAnalysisStatus(List<Integer> sampleIDs)
          Runs a SQL query to find if any of the Sequenced Samples in sampleIDs have a Secondary Analysis result of Delivered
 List<String> getSampleNames(int connectionID)
          Get the names of all the samples in the DB
 List<SampleInfo> getSampleNames(int connectionID, String piName, String runID)
          Get the name, RLIMS ID, and DB ID of all the samples in the DB, or only those samples associated with a given Run, PI, or both
 List<SampleInfo> getSamples(int connectionID, String piName, String runID, String appType, String projectName)
          Get all the information about all the samples from a given run, owned by a given PI
 Map<String,Integer> getSamplesPerMonth(SGEFilter filter, int connectionID)
          Returns a set of pairs of months and unique samples defined by the passed filter object.
 List<SGEScriptSummary> getScriptInvocations(SGEFilter filter, int connectionID)
          Queries the portal database and returns a list of SGEScriptSummary containing the total script invocations in the runs defined by the provided SGEFilter
 List<SecondaryDetails> getSecondaryAnalysisHistory(int connectionID, int secondaryProjectID)
           
 List<Analysis2> getSecondaryAnalysisResults(int connectionID, Date finishedCutoff)
          Get all the information about the Secondary Analysis results for a sample from a given run
 Map<String,List<SecondaryAnalysisBean>> getSecondaryStatus(int connectionID)
           
 Map<String,Integer> getSGEFlowcellsPerMonth(SGEFilter filter, int connectionID)
           
 List<SGEScriptSummary> getSumCPUSecondsPerScript(SGEFilter filter, int connectionID)
          Queries the portal database and returns a list of SGEScriptSummary containing the sum of cpuseconds consumed by the scripts defined by the provided SGEFilter
 List<String> getValidRLIMS(SGEFilter filter, int connectionID)
          Queries the portal database and returns a list of possible RunIDs falling within the provided SGEFilter
 List<String> getValidRunTypes(int connectionID)
          Returns a list of possible Run Types (eg., exome, whole_genome,...) available
 Map<String,Double> getWallClockPerRun(SGEFilter filter, int connectionID)
          Returns a set of pairs of WallClock times and RunIDs defined by the passed filter object.
 Map<String,Double> getWallClockPerSample(SGEFilter filter, int connectionID)
          Returns a set of pairs of WallClock times and SampleIDs defined by the passed filter object.
 boolean grantProjectAccess(int connectionID, String project, String run, List<String> samples)
          Routine to add samples to a project
 boolean grantUserAccess(int connectionID, Map<String,Boolean> users, int role, String run, List<String> samples)
          Routine to give users access to samples that the caller has access to
 ConnectionResponse logIn(String userName, String password, int connectionID)
          Tell the server the lanID and Password (encrypted) of the person doing the querying, and get told by the server if the lan ID and password are valid
 void logOut(String userName, String password, int connectionID)
          Tell the server to forget about this user, and the user's current search
 boolean parseRunFile(String filePath, String user, String password)
          Parses the passed in file.
 boolean removeFromFamily(int connectionID, String family, String rlimsID, String parentID)
          Remove a sample from a family
 void removeProject(int connectionID, String projectName)
          Removes an existing project.
 boolean removeUsersFromGroup(int connectionID, int groupID, List<String> users)
          Remove users from a group
 boolean removeUsersFromProject(int connectionID, List<String> users, String project)
          Routine to remove one or more users' access to a project
 boolean retainSample(int connectionID, Date deleteDate, String piName, List<String> runIDs, String sample, String requestor, boolean isPrimary)
          Mark a sample or set of samples as needing their data files to be retained
 boolean revokeProjectAccess(int connectionID, String project, String run, List<String> samples)
          Routine to remove samples from a project
 boolean revokeUserAccess(int connectionID, List<String> users, String run, List<String> samples)
          Routine to remove users' access to samples that the caller has PI access to, or where the caller has all sample access.
 void saveBatched(int connectionID, int projectID, String newnotes)
           
 void saveNotes(int connectionID, int projectID, String runName, String pI, String application, String personnel, String newNotes)
          Save Notes to the Database.
 void savePersonneltoDB(int connectionID, int projectID, String newISAssignee, String oldISAssignee)
           
 void saveSecondaryAnalysisNotes(int connectionID, int analysisID, String notes)
           
 void saveSecondaryAssignedDate(int connectionID, int projectID, Date newValue)
           
 void saveSecondaryCompleteDate(int connectionID, int projectID, Date date)
           
 void saveSecondaryDeliveryDate(int connectionID, int projectID, Date newValue)
           
 void saveSecondaryStartDate(int connectionID, int projectID, Date newValue)
           
 void sendEmailNotification(int connectionID, String runName, String application, String pI, String assignerLanID, String notes, String newAssignee, String oldAssignee, int projectID)
          Send an email to the new person assigned to a project, and the old person no longer assigned to a project
 boolean sendWeeklyReport(String lanID, int connectionID)
           
 boolean setIsBIC(int connectionID, boolean isBIC, int projectID)
          Sets all the samples for a project to have their isBIC field either be true or false
 boolean setRunData(int connectionID, String piName, String runID, RunData theRun, List<SampleInfo> samples, int[] deletedIDs)
          Update all the metadata for a given run, owned by a given PI, and for its samples
 boolean updateAnalysis(String analysisPath, String uID, String password)
          Update the database with all the new analyses that have been added
 boolean updateGroup(int connectionID, int groupID, String name, String description)
          Updates information about an existing group
 void updateProject(int connectionID, String projectName, String notes, boolean isReanalysis, int[] seqSampleIDs, Integer leadID, Integer specID, Integer piID)
          Updates an existing project.
 void writedatatofile(int connectionID, String exportdata)
           
 

Field Detail

kIndexSeqLength

static final int kIndexSeqLength
Allowed length for a non-empty Index Sequence

See Also:
Constant Field Values

kAttachToSample

static final int kAttachToSample
Specifies that the key : value pair is about a sample

See Also:
Constant Field Values

kAttachToSequencedSample

static final int kAttachToSequencedSample
Specifies that the key : value pair is about a sequenced sample

See Also:
Constant Field Values

kAttachToRun

static final int kAttachToRun
Specifies that the key : value pair is about a run

See Also:
Constant Field Values

kAttachToUser

static final int kAttachToUser
Specifies that the key : value pair is about a user

See Also:
Constant Field Values

kAttachToGroup

static final int kAttachToGroup
Specifies that the key : value pair is about a Group

See Also:
Constant Field Values

kAttachToProject

static final int kAttachToProject
Specifies that the key : value pair is about a Project

See Also:
Constant Field Values

kRolePI

static final int kRolePI
See Also:
Constant Field Values

kRoleCoPI

static final int kRoleCoPI
See Also:
Constant Field Values

kRoleResearcher

static final int kRoleResearcher
See Also:
Constant Field Values

kRoleInformaticsPhdLead

static final int kRoleInformaticsPhdLead
See Also:
Constant Field Values

kRoleInformaticsLead

static final int kRoleInformaticsLead
See Also:
Constant Field Values

kRoleInformaticsSpecialist

static final int kRoleInformaticsSpecialist
See Also:
Constant Field Values

kRoleStatistician

static final int kRoleStatistician
See Also:
Constant Field Values

kRoleIt

static final int kRoleIt
See Also:
Constant Field Values

kRoleSpa

static final int kRoleSpa
See Also:
Constant Field Values

kRoleLabManager

static final int kRoleLabManager
See Also:
Constant Field Values

kRoleLabTech

static final int kRoleLabTech
See Also:
Constant Field Values

kRoleAdmin

static final int kRoleAdmin
See Also:
Constant Field Values

kRoleProjCreator

static final int kRoleProjCreator
See Also:
Constant Field Values

kRoleProjLead

static final int kRoleProjLead
See Also:
Constant Field Values

kRoleProjSpec

static final int kRoleProjSpec
See Also:
Constant Field Values

kRoleProjPI

static final int kRoleProjPI
See Also:
Constant Field Values

kFirstLabUserRole

static final int kFirstLabUserRole
The smallest role number that specifies a lab related user

See Also:
Constant Field Values

kLastLabUserRole

static final int kLastLabUserRole
The largest role number that specifies a lab related user

See Also:
Constant Field Values
Method Detail

getConnection

ConnectionResponse getConnection()
Ask the server for the information the client needs in order to send data to the server

Returns:
A ConnectionResponse object with the relevant information

logIn

ConnectionResponse logIn(String userName,
                         String password,
                         int connectionID)
Tell the server the lanID and Password (encrypted) of the person doing the querying, and get told by the server if the lan ID and password are valid

Parameters:
userName - User's lanID
password - User's password, encrypted to the server's specifications
connectionID - The unique ID of the connection, so server can track multiple connection at the same time.
Returns:
Updated ConnectionResponse if user logged in successfully, else null

logOut

void logOut(String userName,
            String password,
            int connectionID)
Tell the server to forget about this user, and the user's current search

Parameters:
userName - User's lanID
password - User's password, encrypted to the server's specifications
connectionID - The unique ID of the connection, so server can track multiple connection at the same time.

getApplicationTypes

List<String> getApplicationTypes()
Get the Descriptions for each of the application types the database recognizes

Returns:
List of Strings, one description per string

getApplicationTypes

List<String> getApplicationTypes(String runID,
                                 String pi)
Get the Descriptions for each of the application types the database recognizes, that occur with the specified PI and / or runID

Parameters:
runID - Name of the run of interest, or null if don't care
pi - LanID of the PI of interest, or null if don't care
Returns:
List of Strings, possibly empty (if PI doesn't have any samples in runID), never null

getApplicationTypesForSamples

int getApplicationTypesForSamples(int[] sampleIDs)
Gets the ID of the Application Type for more of the passed in samples than anyone else

Parameters:
sampleIDs - Array of SequencedSample IDs, must not be empty or null
Returns:
DB ID of the Application Type, or -1 if there was a problem

getReadTypes

List<String> getReadTypes()
Get the Descriptions for each of the read types the database recognizes

Returns:
List of Strings, one description per string

getAnalysisTypes

List<String> getAnalysisTypes()
Get the names for each of the analysis types the database recognizes

Returns:
List of Strings, one name per string

getAnalysisStatuses

List<String> getAnalysisStatuses()
Get the names for each of the analysis statuses the database recognizes

Returns:
List of Strings, one status per string

getFileLocations

List<FileLocation> getFileLocations()
Get a List of the available FileLocations that files might be saved in

Returns:
List of FileLocation objects, or null if there was a problem

getPrimaryAnalysisStatuses

List<String> getPrimaryAnalysisStatuses()
Get the names for each of the Primary Analysis Statuses the database recognizes

Returns:
List of Strings, one name per string

getCurrentPrimaryStatus

Map<String,PrimaryAnalysisBean> getCurrentPrimaryStatus(int connectionID)
                                                        throws ConnectionException
Get the latest primary analysis statuses, from all the primary analysis results that have been updated in the last week

Parameters:
connectionID - The id of the connection, so know what user has access to
Returns:
Map from run names to the latest primary analysis status information about that run
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

getRoles

List<String> getRoles()
Get all the Contact Roles in the database

Returns:
List of Strings, one role ID per string

getPINames

List<String> getPINames()
Get the names of all the PIs in the database

Returns:
List of names, in the form Last Name, First Name

getPIForSamples

int getPIForSamples(int[] sampleIDs)
Gets the ContactLinker ID of the Contact who is the PI for more of the passed in samples than anyone else

Parameters:
sampleIDs - Array of SequencedSample IDs, must not be empty or null
Returns:
DB ID of the Contact, or -1 if there was a problem

getRunIDs

List<String> getRunIDs(int connectionID)
                       throws ConnectionException
Get all the run IDs in the database this user can see

Parameters:
connectionID - The id of the connection, so know what user has access to
Returns:
List of Strings, one run ID per string
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

getRunIDs

List<String> getRunIDs(int connectionID,
                       String pi,
                       String appType)
                       throws ConnectionException
Get all the run IDs in the database this user can see, that have at least one sample that has the specified PI and / or application type

Parameters:
connectionID - The id of the connection, so know what user has access to
pi - LanID of the PI of interest, or null if don't care
appType - Description of the application type of interest, or null if don't care
Returns:
List of Strings, possibly empty (if PI doesn't have any samples in runID), never null
Throws:
ConnectionException

getMatchingRuns

List<ResultInfo> getMatchingRuns(int connectionID,
                                 String piName,
                                 String runID,
                                 String sample,
                                 String application,
                                 String rlimsProject,
                                 String rlimsID,
                                 Date startDate,
                                 Date endDate,
                                 boolean onlyAnalyzed,
                                 String projName)
                                 throws Exception
Search the database for all the runs matching the criteria given, and return them

Parameters:
connectionID - The id of the connection, so know what user has access to
piName - If not empty or null, the Last Name, First Name of the PI to look for
runID - If not empty or null, the single run ID to return
sample - If not empty or null, the name of the samples to return
application - If not empty or null, the type of application to search for
rlimsProject - If not empty or null, the RLIMS Project Name to search for
rlimsID - If not empty or null, the Run RLIMS BatchID to search for
startDate - If not null, lower bound on date range or allowed results
endDate - If not null, upper bound on date range or allowed results If startDate == endDate, will only return runs from that date.
onlyAnalyzed - If true, only find results where there's at least one secondary analysis available
projName - If not empty or null, the secondary project name to look for
Returns:
List of runs and samples that match the criteria, or an empty list if no matches
Throws:
Exception

getRunData

RunData getRunData(int connectionID,
                   String piName,
                   String runID)
                   throws ConnectionException
Get all the metadata from a given run, owned by a given PI

Parameters:
connectionID - The id of the connection, so know what user has access to
piName - The Last Name, First Name of the PI to look for, empty or null if don't care
runID - The run ID we're interested in
Returns:
RunData object with the metadata, or null if no run was found
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

getRetainedSamples

List<ResultInfo> getRetainedSamples(int connectionID,
                                    String piName,
                                    String runID,
                                    String sample,
                                    boolean isPrimary)
                                    throws ConnectionException
Get all the runs and samples that have data files that are currently marked for non-deletion

Parameters:
connectionID - The id of the connection, so know what user has access to
piName - The Last Name, First Name of the PI to look for, or null if not restricting on that
runID - The run ID we're interested in, null or empty if not restricting on that
sample - Name of the sample we're searching for
isPrimary - True if want to know about primary analysis files, false if want to know about secondary analysis files
Returns:
List of runs and samples that match the criteria, or an empty list if no matches
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

retainSample

boolean retainSample(int connectionID,
                     Date deleteDate,
                     String piName,
                     List<String> runIDs,
                     String sample,
                     String requestor,
                     boolean isPrimary)
                     throws ConnectionException
Mark a sample or set of samples as needing their data files to be retained

Parameters:
connectionID - The id of the connection, so know that user has write access
deleteDate - New deletion date for the sample(s)
piName - The Last Name, First Name of the PI who owns the samples, or null if not restricting on that
runIDs - The run IDs we're interested in, list must not be null or empty
sample - Name of the sample we're updating, null for all samples on that run
requestor - Person making the update request. If user is not an "all access" user, this is ignored, and the user's name is used
isPrimary - True if want to retain primary analysis files, false if want to retain secondary analysis files
Returns:
True if added successfully, else false if there was a problem
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

setRunData

boolean setRunData(int connectionID,
                   String piName,
                   String runID,
                   RunData theRun,
                   List<SampleInfo> samples,
                   int[] deletedIDs)
                   throws ConnectionException
Update all the metadata for a given run, owned by a given PI, and for its samples

Parameters:
connectionID - The id of the connection, so know what user has access to
piName - The Last Name, First Name of the PI to look for
runID - The run ID we're interested in
theRun - The updated run metadata, or null if no change to that data
samples - The changed samples for the this run - PI pair
deletedIDs - Array of the ids of Samples that were deleted, null if none were deleted
Returns:
True if changed things successfully, else false
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

getSamples

List<SampleInfo> getSamples(int connectionID,
                            String piName,
                            String runID,
                            String appType,
                            String projectName)
                            throws ConnectionException
Get all the information about all the samples from a given run, owned by a given PI

Parameters:
connectionID - The id of the connection, so know what user has access to
piName - The Last Name, First Name of the PI to look for
runID - The run ID we're interested in. One of this and projID can NOT be blank
appType - If not empty or null, The type of application to return
projectName - The name of the project we're interested in. One of this and runID can NOT be blank
Returns:
List of SampleInfo, possibly empty but never null
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

addExternalUser

boolean addExternalUser(String firstName,
                        String lastName,
                        String id)
Add an external user to the database

Parameters:
firstName - The new user's first name
lastName - The new user's last name
id - The new user's unique ID. Cannot match any id in the DB, or any Mayo LAN ID
Returns:
True if the id was unique, and were able to add the user to the DB, else false

grantUserAccess

boolean grantUserAccess(int connectionID,
                        Map<String,Boolean> users,
                        int role,
                        String run,
                        List<String> samples)
                        throws ConnectionException
Routine to give users access to samples that the caller has access to

Parameters:
connectionID - The id of the connection, so know what user has access to
users - Map of the users being granted access to whether they're internal or not. For internal users, the String should be the user's lanID. For external, it needs to be a unique last name, first name
role - The role the Users are being given for these samples
run - The name of the run they're being granted access to
samples - List of samples from the run that the users are being granted access to, null or empty to grant access to all the samples of that run
Returns:
True if changed things successfully, else false
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

revokeUserAccess

boolean revokeUserAccess(int connectionID,
                         List<String> users,
                         String run,
                         List<String> samples)
                         throws ConnectionException
Routine to remove users' access to samples that the caller has PI access to, or where the caller has all sample access.

Parameters:
connectionID - The id of the connection, so know what user has access to
users - List of the users losing access
run - The name of the run they're losing access to
samples - List of samples from the run that the users are losing access to, null or empty to revoke access to all the samples of that run
Returns:
True if changed things successfully, else false
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

addUsersToProject

boolean addUsersToProject(int connectionID,
                          Map<String,Boolean> users,
                          int role,
                          String project)
                          throws ConnectionException
Give one or more users' access to a project

Parameters:
connectionID - The id of the person doing the add, must be part of Bioinformatics Staff
users - Map of the users being granted access to whether they're internal or not. For internal users, the String should be the user's lanID. For external, it needs to be a unique last name, first name
role - The role the Users are being given for this project
project - Name of the project the users are being added to
Returns:
True if changed things successfully, else false
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

removeUsersFromProject

boolean removeUsersFromProject(int connectionID,
                               List<String> users,
                               String project)
                               throws ConnectionException
Routine to remove one or more users' access to a project

Parameters:
connectionID - The id of the person doing the add, must be part of Bioinformatics Staff
users - List of the users losing access
project - The name of the project they're losing access to
Returns:
True if changed things successfully, else false
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

grantProjectAccess

boolean grantProjectAccess(int connectionID,
                           String project,
                           String run,
                           List<String> samples)
                           throws ConnectionException
Routine to add samples to a project

Parameters:
connectionID - The id of the person doing the add, must be part of Bioinformatics Staff
project - Name of the project getting access to the samples
run - The name of the run they're being granted access to
samples - List of samples from the run that are being added to the project, null or empty to grant access to all the samples of that run
Returns:
True if changed things successfully, else false
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

revokeProjectAccess

boolean revokeProjectAccess(int connectionID,
                            String project,
                            String run,
                            List<String> samples)
                            throws ConnectionException
Routine to remove samples from a project

Parameters:
connectionID - The id of the person doing the remove, must be part of Bioinformatics Staff
project - Name of the project losing access to the samples
run - The name of the run the project is losing access to
samples - List of samples from the run that the project is losing access to, null or empty to revoke access to all the samples of that run
Returns:
True if changed things successfully, else false
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

getSampleNames

List<SampleInfo> getSampleNames(int connectionID,
                                String piName,
                                String runID)
                                throws ConnectionException
Get the name, RLIMS ID, and DB ID of all the samples in the DB, or only those samples associated with a given Run, PI, or both

Parameters:
connectionID - The id of the connection, so know what user has access to
piName - The Last Name, First Name of the PI to look for, empty or null if don't care
runID - The run ID we're interested in, empty or null if don't care
Returns:
List of SampleInfo, possibly empty but never null, with only the sample name, sample id, sampleRLIMSID, and species filled in
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

getSampleNames

List<String> getSampleNames(int connectionID)
                            throws ConnectionException
Get the names of all the samples in the DB

Parameters:
connectionID - The id of the connection, so know what user has access to
Returns:
List of String, possibly empty but never null, holding the sample name
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

getCompletedRuns

List<RunData> getCompletedRuns(int connectionID,
                               String piName,
                               String runID)
                               throws ConnectionException
Get all the completed runs

Parameters:
connectionID - ID of the connection, used to retrieve the PortalConnection. Must match the session connection ID, if the session connection ID exists
piName - The Last Name, First Name of the PI to look for, empty or null if don't care
runID - The run ID we're interested in, empty or null if want all completed runs
Returns:
List of the runs, could be empty. Null if there was a problem
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

getQCResults

List<QCResult> getQCResults(int connectionID,
                            String sampleName,
                            String runID)
                            throws ConnectionException
Get all the information about the QCResults for a sample from a given run

Parameters:
connectionID - The id of the connection, so know what user has access to
sampleName - The name of the Sample to look for
runID - The run ID we're interested in
Returns:
List of QCResult, possibly empty but never null
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

getSecondaryAnalysisResults

List<Analysis2> getSecondaryAnalysisResults(int connectionID,
                                            Date finishedCutoff)
                                            throws ConnectionException
Get all the information about the Secondary Analysis results for a sample from a given run

Parameters:
connectionID - The id of the connection, so know what user has access to
finishedCutoff - The cutoff date for finished runs (i.e. only report on finished runs that finished at or after this date). Defaults to one week ago if is null
Returns:
List of Analysis2, possibly empty but never null
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

parseRunFile

boolean parseRunFile(String filePath,
                     String user,
                     String password)
Parses the passed in file. If it's a directory, parses all the .xml files in that directory, or in any of its sub-directories. Ignores any runs already in the DB.

Parameters:
filePath - XML file or directory to use
user - user ID to give to the DB, in order to get write permission
password - password to give to the DB, in order to get write permission
Returns:
True if everything was successful, else false

getAnalyzedSamples

List<AnalysisInfo> getAnalyzedSamples(int connectionID,
                                      String theRun)
                                      throws ConnectionException
Finds all the samples for a run that have had an analysis done

Parameters:
connectionID - ID of the connection, used to retrieve the PortalConnection. Must match the session connection ID, if the session connection ID exists
theRun - The run whose samples we're looking at
Returns:
List of the samples. As this can only be called when one or more of the run's samples has been analyzed, the list should never be empty
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

addNote

boolean addNote(int connectionID,
                String note,
                String tableName,
                int rowID)
                throws ConnectionException
Adds a note to the database

Parameters:
connectionID - ID of the connection, used to retrieve the PortalConnection. Must match the session connection ID, if the session connection ID exists
note - The Note
tableName - Name of the table the note's about
rowID - The id of the item in the table the note is about
Returns:
True if added the note, else false
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

getNote

List<Note> getNote(int connectionID,
                   String tableName,
                   int rowID)
                   throws ConnectionException
Get one or more notes from the database

Parameters:
connectionID - ID of the connection, used to retrieve the PortalConnection. Must match the session connection ID, if the session connection ID exists
tableName - Name of the table we're looking for notes for, null or empty string to get notes for all tables
rowID - The row id of the item in the table that we're looking for notes for, or kInvalidID to get the notes for all the items for table tableName
Returns:
List of notes that match the criteria (which might be empty) or null if there was a non-connection problem
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

deleteNote

boolean deleteNote(int connectionID,
                   String tableName,
                   int rowID,
                   Date noteDate)
                   throws ConnectionException
Deletes a note from the database.

Parameters:
connectionID - ID of the connection, used to retrieve the PortalConnection. Must match the session connection ID, if the session connection ID exists
tableName - Name of the table we're looking for notes for, null or empty string to get notes for all tables
rowID - The row id of the item in the table that we're looking for notes for, or kInvalidID to get the notes for all the items for table tableName
noteDate - The date of the note
Returns:
True if deleted the note, else false
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

updateAnalysis

boolean updateAnalysis(String analysisPath,
                       String uID,
                       String password)
Update the database with all the new analyses that have been added

Parameters:
analysisPath - The path to where the analysis results are located
uID - The user ID to use when modifying the database
password - The password to use when modifying the database
Returns:
True if added successfully, else false

getInstrumentStatus

Map<String,String> getInstrumentStatus(int connectionID)
                                       throws ConnectionException
Query the Primary Analysis DB for the runs that have completed the given task, and when they did it

Parameters:
connectionID - The user's connection ID
Returns:
Map of runs and their dates, or null if there was a problem
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

getInstrumentHistory

List<InstrumentInfo> getInstrumentHistory(int connectionID,
                                          String instrument)
                                          throws ConnectionException
Get all the actions recorded for the given instrument

Parameters:
connectionID - The user's connection ID
instrument - The name of the instrument to look up
Returns:
List of the Instrument's history, in sorted order, or null if there was a problem
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

addGroup

int addGroup(int connectionID,
             String name,
             String description)
             throws ConnectionException
Adds a new group

Parameters:
connectionID - The user's connection ID
name - Name of the new group. Must be unique
description - The group description
Returns:
ID of the new group, or -1 if there was a problem
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

updateGroup

boolean updateGroup(int connectionID,
                    int groupID,
                    String name,
                    String description)
                    throws ConnectionException
Updates information about an existing group

Parameters:
connectionID - The user's connection ID
groupID - The DB ID for the group
name - The group name
description - The group description
Returns:
True if successfully updated the group, else false
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

deleteGroup

boolean deleteGroup(int connectionID,
                    int groupID)
                    throws ConnectionException
Delete an existing group

Parameters:
connectionID - The user's connection ID
groupID - The DB ID for the group
Returns:
True if successfully deleted the group, else false
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

addUsersToGroup

boolean addUsersToGroup(int connectionID,
                        int groupID,
                        Map<String,Integer> users)
                        throws ConnectionException
Add users to an existing group

Parameters:
connectionID - The user's connection ID
groupID - The DB ID for the group
users - Map holding the users' lanIDs and roles
Returns:
True if successfully updated the group, else false
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

removeUsersFromGroup

boolean removeUsersFromGroup(int connectionID,
                             int groupID,
                             List<String> users)
                             throws ConnectionException
Remove users from a group

Parameters:
connectionID - The user's connection ID
groupID - The DB ID for the group
users - List holding the lanIDs of the users being removed from the group
Returns:
True if successfully updated the group, else false
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

getGroups

List<GroupInfo> getGroups(int connectionID)
                          throws ConnectionException
Get the list of all the groups in the DB

Parameters:
connectionID - The user's connection ID
Returns:
List of all the Groups in the DB
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

addKeyValuePair

boolean addKeyValuePair(int connectionID,
                        int table,
                        String name,
                        String more,
                        String key,
                        String value)
                        throws ConnectionException
Add a Key : Value pair about a specified item to the DB

Parameters:
connectionID - The user's connection ID. Must be part of Informatics staff
table - Specifier for which table to attach the data to
name - Unique specifier for the table of interest
more - Additional data to create a unique specifier for the table of interest, or null if don't need it
key - Key of the key : Value pair to add
value - Value of the key : Value pair to add
Returns:
True if added the Key: Value pair to the DB, false if there was a problem
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

addToFamily

boolean addToFamily(int connectionID,
                    String family,
                    String parentID,
                    String rlimsID,
                    String sampleParentID,
                    String name,
                    Boolean isMale)
                    throws ConnectionException
Add a sample to a family, creating the family if necessary.

Parameters:
connectionID - The user's connection ID. Must be part of Informatics staff
family - The name of the family, each family has a unique name
parentID - The RLIMS ID of a sample belonging to a parent who is part of this family. The method will fail if the sample ID is not null and the sample doesn't exist, or if the sample is not part of the family
rlimsID - The RLIMS Family ID of the sample being added to the family
sampleParentID - The RLIMS Parent ID of the sample being added to the family
name - Name of the sample being added to the family, can be null or empty
isMale - True if male, false if female, null if not known
Returns:
True if added the sample to the family, false if there was a problem
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

removeFromFamily

boolean removeFromFamily(int connectionID,
                         String family,
                         String rlimsID,
                         String parentID)
                         throws ConnectionException
Remove a sample from a family

Parameters:
connectionID - The user's connection ID. Must be part of Informatics staff
family - The name of the family, each family has a unique name
rlimsID - The RLIMS family ID of the sample being removed from the family
parentID - The RLIMS parent ID of the sample being removed from the family
Returns:
True sample was part of the family, and isn't any more, false if there was a problem, or if the sample was not part of the family to begin with
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID

addProject

String addProject(int connectionID,
                  String notes,
                  boolean isReanalysis,
                  int[] seqSampleIDs,
                  Integer leadID,
                  Integer specID,
                  Integer piID)
                  throws ConnectionException
Adds a new project.

Parameters:
connectionID - The user's connection ID
notes - The project notes.
isReanalysis - Is this a reanalysis project.
seqSampleIDs - One or more sequenced sample IDs assigned to the project.
leadID - Contact user ID for the informatics lead, or null if none
specID - Contact user ID for the informatics specialist, or null if none
piID - Contact user ID for the PI, or null if none
Returns:
Name of the new project.
Throws:
ConnectionException

updateProject

void updateProject(int connectionID,
                   String projectName,
                   String notes,
                   boolean isReanalysis,
                   int[] seqSampleIDs,
                   Integer leadID,
                   Integer specID,
                   Integer piID)
                   throws ConnectionException
Updates an existing project.

Parameters:
connectionID - The user's connection ID
projectName - Name of project to update.
notes - The project notes.
isReanalysis - Is this a reanalysis project.
seqSampleIDs - One or more sequenced sample IDs assigned to the project.
leadID - Contact user ID for the informatics lead
specID - Contact user ID for the informatics specialist
piID - Contact user ID for the PI
Throws:
ConnectionException

getProjects

List<SecondaryProjectInfo> getProjects(int connectionID,
                                       String projectName)
                                       throws ConnectionException
Get all the Secondary Projects created by this individual, or the single project projectName

Parameters:
connectionID - The user's connection ID
projectName - If not null, the name of the single project to get. Only will get if the user created the project, or has canEditAll authorization
Returns:
List of Secondary projects, or null if there was a problem
Throws:
ConnectionException

removeProject

void removeProject(int connectionID,
                   String projectName)
                   throws ConnectionException
Removes an existing project.

Parameters:
connectionID - The user's connection ID
projectName - Name of project to remove.
Throws:
ConnectionException

getProjects

List<ProjectInfo> getProjects(int connectionID,
                              int[] projIDs)
                              throws ConnectionException
Gets one or more projects.

Parameters:
connectionID - The user's connection ID
projIDs - ID(s) of the projects to fetch. If empty or null, all projects are returned.
Returns:
List of projects, or null if there was a problem
Throws:
ConnectionException

getProjectNames

List<String> getProjectNames(int connectionID)
                             throws ConnectionException
Get the names of all the secondary analysis projects in the database that this user can see

Parameters:
connectionID - The user's connection ID
Returns:
List of names
Throws:
ConnectionException

getRLIMSProjectNames

List<String> getRLIMSProjectNames(int connectionID)
                                  throws ConnectionException
Get all the RLIMS project names in the database that this user can see

Parameters:
connectionID - The user's connection ID
Returns:
List of names
Throws:
ConnectionException

getRLIMSIDs

List<String> getRLIMSIDs(int connectionID)
                         throws ConnectionException
Get all the RLIMS Sample "Sample IDs" in the database that this user can see

Parameters:
connectionID - The user's connection ID
Returns:
List of names
Throws:
ConnectionException

getContacts

List<ContactInfo> getContacts(int connectionID,
                              int[] contactIDs)
                              throws ConnectionException
Gets one or more contacts.

Parameters:
connectionID - The user's connection ID
contactIDs - ID(s) of the contacts to fetch. If empty or null, all contacts are returned.
Returns:
List of contacts, or null if there was a problem
Throws:
ConnectionException

getProjectsSummary

ProjectSummaryBuilder getProjectsSummary(int connectionID,
                                         String userName,
                                         Date fromDate,
                                         Date toDate)
                                         throws ConnectionException
Throws:
ConnectionException

getDefaultProjectName

String getDefaultProjectName(String runName,
                             String appType,
                             String pi,
                             boolean isReanalysis)
Get a default Secondary Project Reanalysis name from the server given the run, PI, and appType, then ask the user for the reanalysis name, given the default name

Parameters:
runName - Name of the run of interest
appType - Application type
pi - Name of the PI
isReanalysis - True if it's a reanalysis, false otherwise
Returns:
A unique Project name that matches the specified characteristics

getSumCPUSecondsPerScript

List<SGEScriptSummary> getSumCPUSecondsPerScript(SGEFilter filter,
                                                 int connectionID)
                                                 throws ConnectionException
Queries the portal database and returns a list of SGEScriptSummary containing the sum of cpuseconds consumed by the scripts defined by the provided SGEFilter

Parameters:
filter - An SGEFilter (null gives no filtering)
connectionID - The user's connection ID.
Returns:
List List of scripts and their total cpu seconds or null if not authorized or no data
Throws:
ConnectionException

getAvgCPUSecondsPerScript

List<SGEScriptSummary> getAvgCPUSecondsPerScript(SGEFilter filter,
                                                 int connectionID)
                                                 throws ConnectionException
Queries the portal database and returns a list of SGEScriptSummary containing the average of cpuseconds consumed by the scripts defined by the provided SGEFilter

Parameters:
filter - An SGEFilter (null gives no filtering)
connectionID - The user's connection ID.
Returns:
List List of scripts and their average cpu seconds or null if not authorized or no data
Throws:
ConnectionException

getScriptInvocations

List<SGEScriptSummary> getScriptInvocations(SGEFilter filter,
                                            int connectionID)
                                            throws ConnectionException
Queries the portal database and returns a list of SGEScriptSummary containing the total script invocations in the runs defined by the provided SGEFilter

Parameters:
filter - An SGEFilter (null gives no filtering)
connectionID - The user's connection ID.
Returns:
List List of scripts and the number of executions or null if not authorized or no data
Throws:
ConnectionException

getAvgRun

List<SGEScriptSummary> getAvgRun(SGEFilter filter,
                                 int connectionID)
                                 throws ConnectionException
Queries the portal database and returns a list of SGEScriptSummary containing the sum of cpuseconds consumed by the scripts defined by the provided SGEFilter

Parameters:
filter - An SGEFilter (null gives no filtering)
connectionID - The user's connection ID.
Returns:
List List of scripts and their total cpu seconds or null if not authorized or no data
Throws:
ConnectionException

getValidRLIMS

List<String> getValidRLIMS(SGEFilter filter,
                           int connectionID)
                           throws ConnectionException
Queries the portal database and returns a list of possible RunIDs falling within the provided SGEFilter

Parameters:
filter - An SGEFilter (null gives no filtering)
connectionID - The user's connection ID.
Returns:
List List of RunIDs or null if none available
Throws:
ConnectionException

getValidRunTypes

List<String> getValidRunTypes(int connectionID)
                              throws ConnectionException
Returns a list of possible Run Types (eg., exome, whole_genome,...) available

Parameters:
connectionID - The user's connection ID.
Returns:
List of run types
Throws:
ConnectionException

getWallClockPerRun

Map<String,Double> getWallClockPerRun(SGEFilter filter,
                                      int connectionID)
                                      throws ConnectionException
Returns a set of pairs of WallClock times and RunIDs defined by the passed filter object.

Parameters:
filter - An SGEFilter (null gives no filtering)
connectionID - The user's connection ID.
Returns:
Map or null if no data available
Throws:
ConnectionException

getWallClockPerSample

Map<String,Double> getWallClockPerSample(SGEFilter filter,
                                         int connectionID)
                                         throws ConnectionException
Returns a set of pairs of WallClock times and SampleIDs defined by the passed filter object.

Parameters:
filter - An SGEFilter (null gives no filtering)
connectionID - The user's connection ID.
Returns:
Map or null if no data available
Throws:
ConnectionException

getSamplesPerMonth

Map<String,Integer> getSamplesPerMonth(SGEFilter filter,
                                       int connectionID)
                                       throws ConnectionException
Returns a set of pairs of months and unique samples defined by the passed filter object.

Parameters:
filter - An SGEFilter(null gives no filtering)
connectionID - The user's connection ID.
Returns:
Map or null if no data available
Throws:
ConnectionException

getErrorsPerRun

Map<String,Integer> getErrorsPerRun(SGEFilter filter,
                                    int connectionID)
                                    throws ConnectionException
Returns a set of pairs of RunIDs - ScriptNames and error counts defined by the passed filter object.

Parameters:
filter - An SGEFilter(null gives no filtering)
connectionID - The user's connection ID.
Returns:
Map or null if no data available
Throws:
ConnectionException

getSecondaryStatus

Map<String,List<SecondaryAnalysisBean>> getSecondaryStatus(int connectionID)
                                                           throws ConnectionException
Throws:
ConnectionException

sendEmailNotification

void sendEmailNotification(int connectionID,
                           String runName,
                           String application,
                           String pI,
                           String assignerLanID,
                           String notes,
                           String newAssignee,
                           String oldAssignee,
                           int projectID)
                           throws ConnectionException
Send an email to the new person assigned to a project, and the old person no longer assigned to a project

Parameters:
connectionID - The user's connection ID
runName - The name of the run
application - The type of analysis to be run
pI - The PI the work is being done for
assignerLanID - The LAN ID of the person assigning the work
notes - Any notes for the analysis
newAssignee - The person being assigned to run the analysis
oldAssignee - The previous person assigned to do the analysis, or null if no one
projectID - ID of the project, so can send along its name
Throws:
ConnectionException

checkAccessPrivilages

boolean checkAccessPrivilages(String string)

saveSecondaryStartDate

void saveSecondaryStartDate(int connectionID,
                            int projectID,
                            Date newValue)
                            throws ConnectionException
Throws:
ConnectionException

saveSecondaryDeliveryDate

void saveSecondaryDeliveryDate(int connectionID,
                               int projectID,
                               Date newValue)
                               throws ConnectionException
Throws:
ConnectionException

saveSecondaryCompleteDate

void saveSecondaryCompleteDate(int connectionID,
                               int projectID,
                               Date date)
                               throws ConnectionException
Throws:
ConnectionException

saveNotes

void saveNotes(int connectionID,
               int projectID,
               String runName,
               String pI,
               String application,
               String personnel,
               String newNotes)
               throws ConnectionException
Save Notes to the Database. Fails if user is neither an administrator or a member of the PI Support staff

Parameters:
connectionID - The id of the connection, so know what user has access to
projectID - ID of the project we're adding notes about
runName - Name of the run we're adding notes about
pI - The PI the work is being done for
application - The type of analysis being run
personnel - LanID of the person doing the analysis
newNotes - New value of the notes field
Throws:
ConnectionException

saveSecondaryAssignedDate

void saveSecondaryAssignedDate(int connectionID,
                               int projectID,
                               Date newValue)
                               throws ConnectionException
Throws:
ConnectionException

addNewRerun

String addNewRerun(int connectionID,
                   int projectID,
                   String projectName)
                   throws ConnectionException
Throws:
ConnectionException

writedatatofile

void writedatatofile(int connectionID,
                     String exportdata)
                     throws IOException
Throws:
IOException

getSecondaryAnalysisHistory

List<SecondaryDetails> getSecondaryAnalysisHistory(int connectionID,
                                                   int secondaryProjectID)

getFlowcellsPerMonth

Map<String,Integer> getFlowcellsPerMonth(SGEFilter filter,
                                         int connectionID)

savePersonneltoDB

void savePersonneltoDB(int connectionID,
                       int projectID,
                       String newISAssignee,
                       String oldISAssignee)
                       throws ConnectionException
Throws:
ConnectionException

saveSecondaryAnalysisNotes

void saveSecondaryAnalysisNotes(int connectionID,
                                int analysisID,
                                String notes)
                                throws ConnectionException
Throws:
ConnectionException

getAllSecondaryStatuses

Map<String,Integer> getAllSecondaryStatuses()

getSGEFlowcellsPerMonth

Map<String,Integer> getSGEFlowcellsPerMonth(SGEFilter filter,
                                            int connectionID)
                                            throws ConnectionException
Throws:
ConnectionException

getISdetails

Map<String,String> getISdetails()
Get a map from LAN IDs to names for all the Informatics Specialists

Returns:
Map from Lan IDs to Names in the form "[last name], [first name]", or empty map if couldn't load it

getRunSecondaryAnalysisStatus

boolean getRunSecondaryAnalysisStatus(List<Integer> sampleIDs)
Runs a SQL query to find if any of the Sequenced Samples in sampleIDs have a Secondary Analysis result of Delivered

Parameters:
sampleIDs - List of IDs to look for, must not be empty or null
Returns:
True if any have been delivered, false otherwise

saveBatched

void saveBatched(int connectionID,
                 int projectID,
                 String newnotes)
                 throws ConnectionException
Throws:
ConnectionException

sendWeeklyReport

boolean sendWeeklyReport(String lanID,
                         int connectionID)
                         throws ConnectionException
Throws:
ConnectionException

setIsBIC

boolean setIsBIC(int connectionID,
                 boolean isBIC,
                 int projectID)
                 throws ConnectionException
Sets all the samples for a project to have their isBIC field either be true or false

Parameters:
connectionID - ID of the connection, used to retrieve the PortalConnection. Must match the session connection ID, if the session connection ID exists
isBIC - Value to set all the samples to
projectID - DB Row ID of the project holding the samples
Returns:
True if assigned the value, else false
Throws:
ConnectionException - If the connectionID is not valid, or if it doesn't match the session connection ID