|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
com.google.gwt.user.server.rpc.RemoteServiceServlet
edu.mayo.bsi.ngsportal.server.NGSPortalServiceImpl
public class NGSPortalServiceImpl
The server side implementation of the RPC service.
| Field Summary | |
|---|---|
static String |
JVM_SYS_PROP_H2
JVM system property that indicates whether the H2 database connection should be used instead of the MS SQL Server connection. |
static String |
kAddSecondaryAnalysis
Parameter that says we're doing Add the Secondary Analysis |
static int |
kAlreadyExists
Tried to add an item that is already in the DB |
static String |
kAnalysisDate
Date Analysis was done |
static String |
kAnalysisName
Name of the Analysis Project the AnalysisGroup belongs to |
static String |
kAppNameQuery
Application that did the Secondary Analysis |
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 String |
kCompleteQuery
Parameter to include if analysis is complete |
static String |
kConnection
URL Parameter for the connectionID to decode the password of the user |
static String |
kFailedQuery
Parameter to include if analysis failed |
static int |
kFastQCellInfoCol
The part of the FastQ or Flagstat file name that holds the flowcell information |
static String |
kFastQSplitter
String that divides the components of a FastQ File's name |
static String |
kFlowCell
Flow cell the run was run on |
static String |
kFlowSplitter
String that divides the flow cell information of a FastQ File's name |
static String |
kGetUserRuns
Query Parameter to tell the servlet to retrieve the runs accessible by a given user |
static String |
kIndexQuery
Index sequence for the sample, if any |
static int |
kInvalidID
An invalid DB ID |
static String |
kJVMIsDev
JVM system property that indicates whether using Dev DB, or Prod DB |
static String |
kJVMIsTunneled
JVM system property that indicates whether using a tunneled connection to the primary DB, or else connecting directly |
static String |
kLanesQuery
Lanes the analysis was run on, none for all lanes |
static int |
kNumNegReturnCodes
Count of failure codes |
static String |
kPassword
URL Parameter for the password of the user who will own this run |
static String |
kPasswordParam
On encoded byte of the password per parameter |
static String |
kQCDataFile
The file that contains the QC information |
static String |
kQCRunInformation
Information about the QC Run |
static String |
kReAnalysisType
Project Type for a ReAnalysis Project |
static String |
kRunName
The RLIMS name for the run |
static String |
kRunQuery
Name of the run the analysis was done on |
static String |
kSampleName
The Sample Name |
static int |
kServletVersion
Version given to callers of the servlet Web Page, as opposed to the GWT web page |
static String |
kStatusQuery
Status of the analysis |
static String |
kUploadData
Query Parameter to tell the servlet to load one or more data files |
static String |
kUserName
URL Parameter for the lan id of the user who will own this run |
static String |
kUserParam
Database user name |
static String[] |
kValidCopyRoles
Roles that can be granted to a user via copyUserPermissions () |
static String |
kVersion
Version of the analysis |
static String |
kWriteDir
Where the upload servlets save data files |
| Fields inherited from interface edu.mayo.bsi.ngsportal.shared.NGSPortalService |
|---|
kFirstLabUserRole, kLastLabUserRole, kRoleAdmin, kRoleCoPI, kRoleInformaticsLead, kRoleInformaticsPhdLead, kRoleInformaticsSpecialist, kRoleIt, kRoleLabManager, kRoleLabTech, kRolePI, kRoleProjCreator, kRoleProjLead, kRoleProjPI, kRoleProjSpec, kRoleResearcher, kRoleSpa, kRoleStatistician |
| Constructor Summary | |
|---|---|
NGSPortalServiceImpl()
Default constructor. |
|
NGSPortalServiceImpl(Authenticator authenticator,
edu.mayo.commons.dir.PersonFinder personFinder)
Constructor |
|
| 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 |
boolean |
addLocationInformation(String[] pis,
String[] runs,
String[] flowCells,
int[] lanes,
String[] indexes,
String[] locations,
String[] sizes,
String user,
String password)
Add location information to the Sequenced Sample table |
boolean |
addMetadata(String[] pis,
String[] runs,
String[] flowCells,
String[] sampleNames,
String[] familyIDs,
String[] parentIDs,
String[] rlimsIDs,
int[] lanes,
String[] indexes,
String[] readTypes,
String[] apps,
int[] cycles,
String user,
String password)
Add metadata to the DB. |
String |
addNewRerun(int connectID,
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 |
addRLIMSBatchIDs(String user,
String password)
Gets the runs that don't have RLIMS Batch IDs, and looks for the IDs, adding them if they exist |
boolean |
addSampleAnalysis(int connectionID,
int groupID,
String appName,
double version,
String status,
Date analysisDate,
boolean complete,
boolean failed)
Add a Secondary analysis to the DB, setting up all the relevant information |
boolean |
addSampleAnalysis(String projectName,
String appName,
double version,
String status,
Date analysisDate,
String user,
String password,
boolean complete,
boolean failed)
Add a Secondary analysis to the DB, setting up all the relevant information |
boolean |
addSecAnLinks(int[][] mappings)
Add these sequenced samples and Secondary Analysis to the Secondary Analysis linker table |
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 |
int |
assignAnalysisGroups(String user,
String password)
Iterate over the AnalysisGroup table, looking for AnalysisGroups that are not assigned to a Secondary Project, but have the same sequenced samples as an existing Secondary Project, and assign the AnalysisGroup to the SecondaryProject |
boolean |
checkAccessPrivilages(String userID)
Checks the user access |
String |
checkIfProjectNameIsUnique(String projectName,
Connection theConnection)
Checks if the Project Name entered by Admin already exists |
boolean |
compareToRLIMS(String user,
String password)
Parses the entire RLIMS system, checking to find those runs where we don't have as many samples for a run as RLIMS does |
String |
copyUserPermissions(String sourceUser,
String sourceUserRole,
String[] targetUsers,
String targetUserRole,
String sourceRun,
String sourceFlowcell,
int sourceLane,
String sourceIndex,
String targetRun,
String targetFlowcell,
int targetLane,
String targetIndex,
String user,
String password)
Copies user permissions (i.e. |
int |
createAnalysisGroup(int connectionID,
String analysisName,
String runName,
String flowCell,
String index,
int[] lanes)
Add an Analysis Group to the DB, setting up all the relevant information |
int |
createAnalysisGroup(String analysisName,
String runName,
String flowCell,
String index,
int[] lanes,
String user,
String password)
Add an Analysis Group to the DB, setting up all the relevant information |
boolean |
deleteGroup(int connectionID,
int groupID)
Delete an existing group, and all related information |
boolean |
deleteNote(int connectionID,
String tableName,
int rowID,
Date noteDate)
Deletes a note from the database. |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Routine to produce the text displayed by this servlet when it is directly accessed by a web browser. |
int |
findOverlappingSecondaryProjects(String user,
String password)
Iterate over the SecondaryProjectInformation table, looking for SecondaryProjects that do not have an Analysis group with a Beginning and Delivered Status. |
Set<String> |
findUnmatchedRuns(String[] testPaths)
Find any runs in the DB that have samples with Flagstat data, where there isn't a run folder with Flagstat files in any of the testPaths |
static String |
formatDate(Date theDate)
Format a date in the format that the servlet wishes to receive dates |
Map<String,Integer> |
getAllSecondaryStatuses()
Get the Secondary Analysis Statuses and their DB row IDs |
List<String> |
getAnalysisDates(Date startDate,
Date endDate,
String application,
String[] runNames,
String pi,
boolean tabDelim,
String user,
String password)
Get a List of Strings, each one holding Run Name Application Investigator CIM BIC Primary Delivered Secondary Complete Secondary Delivered delimited with either a tab or a comma |
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()
Give the client the information it 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 |
static String |
getFlowCell(String[] split)
Get the flowCell from the split up components of the FastQ File name |
Map<String,Integer> |
getFlowcellsPerMonth(SGEFilter filter,
int connectID)
|
List<GroupInfo> |
getGroups(int connectionID)
Get the list of all the groups in the DB |
static String |
getIndex(String[] split)
Get the index from the split up components of the FastQ File name |
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 |
static int |
getLane(String[] split)
Get the lane from the split up components of the FastQ File name |
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> |
getPrimaryProjectNames(int connectionID)
Get the names of all the projects in the database |
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 userLanID,
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 |
static int |
getRead(String[] split)
A1-Input_hMeDIP.FCC3PBEACXX_L7_IACAGTG.flagstat fastqc/A1-Input_hMeDIP.FCC3PBEACXX_L7_R1_IACAGTG_fastqc/fastqc_data.txt* Get the read from the split up components of the FastQ File name |
List<String> |
getReadTypes()
Get the Descriptions for each of the read types the database recognizes |
int |
getReanalysisProjects(String user,
String password)
Get all the secondary projects that don't have an analysis group pointing to them, and that share a set of samples with secondary projects that also don't have an analysis group pointing to them |
List<ReportData> |
getReport(int connectionID,
String piName,
String instrument,
int appType,
Date minStartDate,
Date maxStartDate,
Date minEndDate,
Date maxEndDate)
Get a report on the runs specified by the following criteria |
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<SampleData> |
getRunsSamples(String[] runIDs,
String appType,
String pi,
String[] sampleNames,
String[] sampleRLIMSIds,
String[] sampleFamilyIds,
String[] sampleParentIds,
String[] rlimsProjectNames,
Date startDate,
Date endDate,
int minNumReads,
String user,
String password)
Get all the information about all the samples from a given run, owned by a given PI |
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 all the information about all the samples from a given run, owned by a given PI |
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 connectid,
int projectid)
|
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 connectID)
SQL query and result set to Return current Secondary Analysis status |
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 |
void |
init()
Initialize settings from the properties file, then setup the connections pool for the default user id. |
static boolean |
isEmpty(String tested)
Utility routine for the common String test |
static boolean |
isTesting()
|
int |
joinAnalysisGroups(String user,
String password)
Iterate over the AnalysisGroup table, consolidating AnalysisGroups that are from the same run and PI, and have the same appType, so long as their start and end are within a couple of days of each other |
ConnectionResponse |
logIn(String lanID,
String password,
int connectID)
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 connectID)
Tell the server to forget about this user, and the user's current connection |
static String |
makeSQLSafe(String tested)
Utility routine for the common String test |
int |
moveSecAnToAnalysisGroups(String user,
String password)
Iterate over the SecondaryAnalysisLinker table, adding all the secondary analyses there to the AnalysisGroup table |
int |
nameSecondaryProjects(String user,
String password)
Iterate over the SecondaryProjectInformation table, looking for SecondaryProjects that do not have a name and do have samples, and give them one based upon the run, appType, and PI associated with their samples |
boolean |
parseQCFolder(String folderPath,
String[] runNames,
String user,
String password)
Parses the passed in file. |
boolean |
parseQCFolder(String folderPath,
String user,
String password)
Parses the passed in directory, parses all the fastqc_data.txt files in that directory, or in any of its sub-directories. |
boolean |
parseRLIMS(String user,
String password)
Parses the entire RLIMS system. |
boolean |
parseRLIMSRun(String[] runNames,
String user,
String password)
Gets the data about a list of runs from RLIMS, and adds any new runs or samples to the DB |
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,
int projID)
Code to delete a Patrick style Project |
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 connectID,
int projectID,
String value)
Saves the batched value |
void |
saveNotes(int connectID,
int projectID,
String runName,
String pI,
String application,
String personnel,
String newNotes)
Save Notes to the Database. |
void |
savePersonneltoDB(int connectID,
int projectID,
String newISAssignee,
String oldISAssignee)
|
void |
saveSecondaryAnalysisNotes(int connectID,
int analysisID,
String notes)
Replace the notes for a secondary analysis. |
void |
saveSecondaryAssignedDate(int connectID,
int projectID,
Date newValue)
|
void |
saveSecondaryCompleteDate(int connectID,
int projectID,
Date date)
Saves the secondary Complete Date. |
void |
saveSecondaryDeliveryDate(int connectID,
int projectID,
Date date)
Saves the Secondary Delivery Date |
void |
saveSecondaryStartDate(int connectID,
int projectID,
Date date)
Saves the Secondary Start Date |
void |
sendEmailNotification(int connectID,
String runName,
String application,
String pi,
String assignerLanID,
String notes,
String newAssignee,
String oldAssignee,
int projectID)
Saves the Assigned Date and Personnel to the DB |
boolean |
sendWeeklyReport(String userlanID,
int connectionID)
Generate an EMail Weekly Report |
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 |
Map<String,List<SecondaryAnalysisBean>> |
sqlresultToSecondaryAnalysis(ResultSet rs)
Converts Secondary Analysis Result set to SecondaryAnalysisBean |
String |
testSecondaryProjectMembership(String projectName,
String runName,
String flowCell,
String index,
int[] lanes,
String user,
String password)
Verify that the specified samples are all in the specified project |
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. |
boolean |
updateRunDates(String user,
String password)
Query the Primary Analysis database for information about run primary analysis dates |
boolean |
updateSampleIDInfo(String user,
String password)
Query the Dev DB for Sample ID and Ultimate Parent ID information for existing production Sequenced Samples, and update the production Sequenced Samples and their samples |
boolean |
updateSampleInfo(String user,
String password)
Query RLIMS for updated CaptureKit and RLIMSProjectID information for existing Sequenced Samples, and update them |
int |
updateSecondaryProjects(String user,
String password)
Iterate over the SecondaryProjectInformation table, looking for SecondaryProjects that do not have an Analysis group with a Beginning and Delivered Status. |
static int |
verifyIndividual(String firstName,
String lastName,
Connection theConnection)
If a person can be found in LDAP, add them to the DB and return true |
void |
writedatatofile(int connectid,
String exportdata)
|
| Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet |
|---|
getSerializationPolicy, processCall, processPost |
| Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet |
|---|
doPost |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
service |
| Methods inherited from class javax.servlet.GenericServlet |
|---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int kAttachToSample
public static final int kAttachToSequencedSample
public static final int kAttachToRun
public static final int kAttachToUser
public static final int kAttachToGroup
public static final int kAttachToProject
public static final int kServletVersion
public static final String JVM_SYS_PROP_H2
public static final String kJVMIsTunneled
public static final String kJVMIsDev
public static final String kFastQSplitter
public static final String kFlowSplitter
public static final int kFastQCellInfoCol
public static final String kWriteDir
public static final int kInvalidID
public static final int kAlreadyExists
public static final int kNumNegReturnCodes
public static final String kAddSecondaryAnalysis
public static final String kAppNameQuery
public static final String kVersion
public static final String kStatusQuery
public static final String kAnalysisDate
public static final String kFlowCell
public static final String kIndexQuery
public static final String kLanesQuery
public static final String kCompleteQuery
public static final String kFailedQuery
public static final String kRunQuery
public static final String kAnalysisName
public static final String kUserParam
public static final String kPasswordParam
public static final String kGetUserRuns
public static final String kUploadData
public static final String kUserName
public static final String kPassword
public static final String kConnection
public static final String kRunName
public static final String kSampleName
public static final String kQCRunInformation
public static final String kQCDataFile
public static final String kReAnalysisType
public static final String[] kValidCopyRoles
| Constructor Detail |
|---|
public NGSPortalServiceImpl()
public NGSPortalServiceImpl(Authenticator authenticator,
edu.mayo.commons.dir.PersonFinder personFinder)
authenticator - personFinder - | Method Detail |
|---|
public void init()
init in class javax.servlet.GenericServletpublic static final boolean isTesting()
public ConnectionResponse getConnection()
getConnection in interface NGSPortalService
public ConnectionResponse logIn(String lanID,
String password,
int connectID)
logIn in interface NGSPortalServicelanID - User's lanIDpassword - User's password, encrypted to the server's specificationsconnectID - The unique ID of the connection, so server can track multiple connection at
the same time.
public void logOut(String userName,
String password,
int connectID)
logOut in interface NGSPortalServiceuserName - User's lanIDpassword - User's password, encrypted to the server's specificationsconnectID - The unique ID of the connection, so server can track multiple connection at
the same time.public static final String makeSQLSafe(String tested)
tested - String to test
public static final boolean isEmpty(String tested)
tested - String to test
public List<String> getApplicationTypes()
NGSPortalService
getApplicationTypes in interface NGSPortalService
public List<String> getApplicationTypes(String runID,
String pi)
NGSPortalService
getApplicationTypes in interface NGSPortalServicerunID - Name of the run of interest, or null if don't carepi - LanID of the PI of interest, or null if don't care
public int getApplicationTypesForSamples(int[] sampleIDs)
NGSPortalService
getApplicationTypesForSamples in interface NGSPortalServicesampleIDs - Array of SequencedSample IDs, must not be empty or null
public List<String> getReadTypes()
NGSPortalService
getReadTypes in interface NGSPortalServicepublic List<FileLocation> getFileLocations()
getFileLocations in interface NGSPortalServicepublic List<String> getAnalysisTypes()
NGSPortalService
getAnalysisTypes in interface NGSPortalServicepublic List<String> getAnalysisStatuses()
NGSPortalService
getAnalysisStatuses in interface NGSPortalServicepublic List<String> getPrimaryAnalysisStatuses()
NGSPortalService
getPrimaryAnalysisStatuses in interface NGSPortalServicepublic List<String> getRoles()
NGSPortalService
getRoles in interface NGSPortalServicepublic List<String> getPINames()
NGSPortalService
getPINames in interface NGSPortalServicepublic int getPIForSamples(int[] sampleIDs)
NGSPortalService
getPIForSamples in interface NGSPortalServicesampleIDs - Array of SequencedSample IDs, must not be empty or null
public List<String> getRunIDs(int connectionID)
throws ConnectionException
NGSPortalService
getRunIDs in interface NGSPortalServiceconnectionID - The id of the connection, so know what user has access to
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public List<String> getRunIDs(int connectionID,
String pi,
String appType)
throws ConnectionException
NGSPortalService
getRunIDs in interface NGSPortalServiceconnectionID - The id of the connection, so know what user has access topi - LanID of the PI of interest, or null if don't careappType - Description of the application type of interest, or null if don't care
ConnectionException
public 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 ConnectionException
NGSPortalService
getMatchingRuns in interface NGSPortalServiceconnectionID - The id of the connection, so know what user has access topiName - If not empty or null, the Last Name, First Name of the PI to look forrunID - If not empty or null, the single run ID to returnsample - If not empty or null, the name of the samples to returnapplication - If not empty or null, the type of application to search forrlimsProject - If not empty or null, the RLIMS Project Name to search forrlimsID - If not empty or null, the Run RLIMS BatchID to search forstartDate - If not null, lower bound on date range or allowed resultsendDate - 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
availableprojName - If not empty or null, the secondary project name to look for
ConnectionException
public List<ReportData> getReport(int connectionID,
String piName,
String instrument,
int appType,
Date minStartDate,
Date maxStartDate,
Date minEndDate,
Date maxEndDate)
throws ConnectionException
connectionID - ID of the connection, used to retrieve the PortalConnection. Must match
the session connection ID, if the session connection ID existspiName - Name of PI to restrict on, empty or null if don't careinstrument - Name of the instrument to restrict on, empty or null if don't careappType - Application type to restrict on, < 0 if don't careminStartDate - Earliest the run could have started, null if don't caremaxStartDate - Latest the run could have started, null if don't careminEndDate - Earliest the run could have ended, null if don't caremaxEndDate - Latest the run could have ended, null if don't care
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public List<ResultInfo> getRetainedSamples(int connectionID,
String piName,
String runID,
String sample,
boolean isPrimary)
throws ConnectionException
getRetainedSamples in interface NGSPortalServiceconnectionID - The id of the connection, so know what user has access topiName - The Last Name, First Name of the PI to look for, or null if not restricting on thatrunID - The run ID we're interested in, null or empty if not restricting on thatsample - Name of the sample we're searching forisPrimary - True if want to know about primary analysis files, false if want to know
about secondary analysis files
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public boolean retainSample(int connectionID,
Date deleteDate,
String piName,
List<String> runIDs,
String sample,
String requestor,
boolean isPrimary)
throws ConnectionException
retainSample in interface NGSPortalServiceconnectionID - The id of the connection, so know that user has write accessdeleteDate - 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 thatrunIDs - The run IDs we're interested in, list must not be null or emptysample - Name of the sample we're updating, null for all samples on that runrequestor - Person making the update request. If user is not an "all access" user, this
is ignored, and the user's name is usedisPrimary - True if want to retain primary analysis files, false if want to retain
secondary analysis files
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public RunData getRunData(int connectionID,
String piName,
String runID)
throws ConnectionException
getRunData in interface NGSPortalServiceconnectionID - The id of the connection, so know what user has access topiName - The Last Name, First Name of the PI to look for, empty or null if don't carerunID - The run ID we're interested in
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public List<SampleInfo> getSamples(int connectionID,
String piName,
String runID,
String appType,
String projectName)
throws ConnectionException
getSamples in interface NGSPortalServiceconnectionID - The id of the connection, so know what user has access topiName - The Last Name, First Name of the PI to look forrunID - The run ID we're interested in. One of this and projID can NOT be blankappType - If not empty or null, The type of application to returnprojectName - The name of the project we're interested in. One of this and runID can NOT be blank
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public boolean addExternalUser(String firstName,
String lastName,
String id)
addExternalUser in interface NGSPortalServicefirstName - The new user's first namelastName - The new user's last nameid - The new user's unique ID. Cannot match any id in the DB, or any Mayo LAN ID
public boolean grantUserAccess(int connectionID,
Map<String,Boolean> users,
int role,
String run,
List<String> samples)
throws ConnectionException
grantUserAccess in interface NGSPortalServiceconnectionID - The id of the connection, so know what user has access tousers - 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 namerole - The role the Users are being given for these samplesrun - The name of the run they're being granted access tosamples - 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
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public boolean revokeUserAccess(int connectionID,
List<String> users,
String run,
List<String> samples)
throws ConnectionException
revokeUserAccess in interface NGSPortalServiceconnectionID - The id of the connection, so know what user has access tousers - List of the users losing accessrun - The name of the run they're losing access tosamples - 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
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public boolean addUsersToProject(int connectionID,
Map<String,Boolean> users,
int role,
String project)
throws ConnectionException
addUsersToProject in interface NGSPortalServiceconnectionID - The id of the person doing the add, must be part of Bioinformatics Staffusers - 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 namerole - The role the Users are being given for this projectproject - Name of the project the users are being added to
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public boolean removeUsersFromProject(int connectionID,
List<String> users,
String project)
throws ConnectionException
removeUsersFromProject in interface NGSPortalServiceconnectionID - The id of the person doing the add, must be part of Bioinformatics Staffusers - List of the users losing accessproject - The name of the project they're losing access to
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public boolean grantProjectAccess(int connectionID,
String project,
String run,
List<String> samples)
throws ConnectionException
grantProjectAccess in interface NGSPortalServiceconnectionID - The id of the person doing the add, must be part of Bioinformatics Staffproject - Name of the project getting access to the samplesrun - The name of the run they're being granted access tosamples - 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
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public boolean revokeProjectAccess(int connectionID,
String project,
String run,
List<String> samples)
throws ConnectionException
revokeProjectAccess in interface NGSPortalServiceconnectionID - The id of the person doing the remove, must be part of Bioinformatics Staffproject - Name of the project losing access to the samplesrun - The name of the run the project is losing access tosamples - 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
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public int addGroup(int connectionID,
String name,
String description)
throws ConnectionException
addGroup in interface NGSPortalServiceconnectionID - The user's connection IDname - Name of the new group. Must be uniquedescription - The group description
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public boolean updateGroup(int connectionID,
int groupID,
String name,
String description)
throws ConnectionException
updateGroup in interface NGSPortalServiceconnectionID - The user's connection IDgroupID - The DB ID for the groupname - The group namedescription - The group description
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public boolean deleteGroup(int connectionID,
int groupID)
throws ConnectionException
deleteGroup in interface NGSPortalServiceconnectionID - The user's connection IDgroupID - The DB ID for the group
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public boolean addUsersToGroup(int connectionID,
int groupID,
Map<String,Integer> users)
throws ConnectionException
addUsersToGroup in interface NGSPortalServiceconnectionID - The user's connection IDgroupID - The DB ID for the groupusers - Map holding the users' lanIDs and roles
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public boolean removeUsersFromGroup(int connectionID,
int groupID,
List<String> users)
throws ConnectionException
removeUsersFromGroup in interface NGSPortalServiceconnectionID - The user's connection IDgroupID - The DB ID for the groupusers - List holding the lanIDs of the users being removed from the group
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public List<GroupInfo> getGroups(int connectionID)
throws ConnectionException
getGroups in interface NGSPortalServiceconnectionID - The user's connection ID
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public boolean addKeyValuePair(int connectionID,
int table,
String name,
String more,
String key,
String value)
throws ConnectionException
addKeyValuePair in interface NGSPortalServiceconnectionID - The user's connection ID. Must be part of Informatics stafftable - Specifier for which table to attach the data toname - Unique specifier for the table of interestmore - Additional data to create a unique specifier for the table of interest, or null if don't need itkey - Key of the key : Value pair to addvalue - Value of the key : Value pair to add
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public boolean addToFamily(int connectionID,
String family,
String parentID,
String rlimsID,
String sampleParentID,
String name,
Boolean isMale)
throws ConnectionException
addToFamily in interface NGSPortalServiceconnectionID - The user's connection ID. Must be part of Informatics stafffamily - The name of the family, each family has a unique nameparentID - 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 familyrlimsID - The RLIMS Family ID of the sample being added to the familysampleParentID - The RLIMS Parent ID of the sample being added to the familyname - Name of the sample being added to the family, can be null or emptyisMale - True if male, false if female, null if not known
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public boolean removeFromFamily(int connectionID,
String family,
String rlimsID,
String parentID)
throws ConnectionException
removeFromFamily in interface NGSPortalServiceconnectionID - The user's connection ID. Must be part of Informatics stafffamily - The name of the family, each family has a unique namerlimsID - The RLIMS family ID of the sample being removed from the familyparentID - The RLIMS parent ID of the sample being removed from the family
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public List<SampleInfo> getSampleNames(int connectionID,
String piName,
String runID)
throws ConnectionException
getSampleNames in interface NGSPortalServiceconnectionID - The id of the connection, so know what user has access topiName - The Last Name, First Name of the PI to look forrunID - The run ID we're interested in
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public List<String> getSampleNames(int connectionID)
throws ConnectionException
getSampleNames in interface NGSPortalServiceconnectionID - The id of the connection, so know what user has access to
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public List<String> getRLIMSProjectNames(int connectionID)
throws ConnectionException
getRLIMSProjectNames in interface NGSPortalServiceconnectionID - The user's connection ID
ConnectionException
public List<String> getRLIMSIDs(int connectionID)
throws ConnectionException
getRLIMSIDs in interface NGSPortalServiceconnectionID - The user's connection ID
ConnectionException
public List<RunData> getCompletedRuns(int connectionID,
String piName,
String runID)
throws ConnectionException
getCompletedRuns in interface NGSPortalServiceconnectionID - ID of the connection, used to retrieve the PortalConnection. Must match
the session connection ID, if the session connection ID existspiName - The Last Name, First Name of the PI to look for, empty or null if don't carerunID - The run ID we're interested in, empty or null if want all completed runs
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public boolean setRunData(int connectionID,
String piName,
String runID,
RunData theRun,
List<SampleInfo> samples,
int[] deletedIDs)
throws ConnectionException
setRunData in interface NGSPortalServiceconnectionID - The id of the connection, so know what user has access topiName - The Last Name, First Name of the PI to look forrunID - The run ID we're interested intheRun - The updated run metadata, or null if no change to that datasamples - The changed samples for the this run - PI pairdeletedIDs - Array of the ids of Samples that were deleted, null if none were deleted
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public List<QCResult> getQCResults(int connectionID,
String sampleName,
String runID)
throws ConnectionException
getQCResults in interface NGSPortalServiceconnectionID - The id of the connection, so know what user has access tosampleName - The name of the Sample to look forrunID - The run ID we're interested in
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public List<InstrumentInfo> getInstrumentHistory(int connectionID,
String instrument)
throws ConnectionException
getInstrumentHistory in interface NGSPortalServiceconnectionID - The user's connection IDinstrument - The name of the instrument to look up
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public Map<String,String> getInstrumentStatus(int connectionID)
throws ConnectionException
getInstrumentStatus in interface NGSPortalServiceconnectionID - The user's connection ID
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public List<Analysis2> getSecondaryAnalysisResults(int connectionID,
Date finishedCutoff)
throws ConnectionException
getSecondaryAnalysisResults in interface NGSPortalServiceconnectionID - The id of the connection, so know what user has access tofinishedCutoff - 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
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public List<AnalysisInfo> getAnalyzedSamples(int connectionID,
String theRun)
throws ConnectionException
NGSPortalService
getAnalyzedSamples in interface NGSPortalServiceconnectionID - ID of the connection, used to retrieve the PortalConnection. Must match
the session connection ID, if the session connection ID existstheRun - The run whose samples we're looking at
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public boolean parseRunFile(String filePath,
String user,
String password)
parseRunFile in interface NGSPortalServicefilePath - XML file or directory to useuser - user ID to give to the DB, in order to get write permissionpassword - password to give to the DB, in order to get write permission
public boolean parseQCFolder(String folderPath,
String user,
String password)
folderPath - Directory holding the run's QC Files, or directory holding run directoriesuser - user ID to give to the DB, in order to get write permissionpassword - password to give to the DB, in order to get write permission
public boolean parseQCFolder(String folderPath,
String[] runNames,
String user,
String password)
folderPath - Directory holding the run's QC Files, or directory holding run directoriesrunNames - Names of runs to restrict the parsing to, else null if should parse alluser - user ID to give to the DB, in order to get write permissionpassword - password to give to the DB, in order to get write permission
public Set<String> findUnmatchedRuns(String[] testPaths)
testPaths - Paths to directories that should hold a lot of runs with Flagstat files
public boolean parseRLIMS(String user,
String password)
user - User ID to give to the DB, in order to get write permissionpassword - Password to give to the DB, in order to get write permission
public boolean parseRLIMSRun(String[] runNames,
String user,
String password)
runNames - Names of the runs to get all samples fromuser - User ID to give to the DB, in order to get write permissionpassword - Password to give to the DB, in order to get write permission
public boolean addRLIMSBatchIDs(String user,
String password)
user - User ID to give to the DB, in order to get write permissionpassword - Password to give to the DB, in order to get write permission
public boolean compareToRLIMS(String user,
String password)
user - User ID to give to the DB, in order to get write permissionpassword - Password to give to the DB, in order to get write permission
public boolean addLocationInformation(String[] pis,
String[] runs,
String[] flowCells,
int[] lanes,
String[] indexes,
String[] locations,
String[] sizes,
String user,
String password)
pis - Array holding the pi names, must be same length as other six arraysruns - Array holding the run names, must be same length as other six arraysflowCells - Array holding the flowCell names, must be same length as other six arrayslanes - Array holding the lanes, must be same length as other six arraysindexes - Array holding the indexes, must be same length as other six arrayslocations - Array holding the locations for the given run and sample names, must be same
length as other six arrayssizes - Array holding the file sizes as strings, or null if not given for any givenuser - user ID to give to the DB, in order to get write permissionpassword - password to give to the DB, in order to get write permission
public boolean addMetadata(String[] pis,
String[] runs,
String[] flowCells,
String[] sampleNames,
String[] familyIDs,
String[] parentIDs,
String[] rlimsIDs,
int[] lanes,
String[] indexes,
String[] readTypes,
String[] apps,
int[] cycles,
String user,
String password)
pis - Array holding the pi namesruns - Array holding the run namesflowCells - Array holding the flowCell namessampleNames - Array holding the sample namesfamilyIDs - Array holding the Sample Family IDsparentIDs - Array holding the Sample Parent IDsrlimsIDs - Array holding the RLIMS IDslanes - Array holding the lane numbersindexes - Array holding the indexesreadTypes - Array holding the read typesapps - Array holding the application namescycles - Array holding the number of cycles the sample were run throughuser - user ID to give to the DB, in order to get write permissionpassword - password to give to the DB, in order to get write permission
public boolean updateRunDates(String user,
String password)
user - user ID to give to the DB, in order to get write permissionpassword - password to give to the DB, in order to get write permission
public boolean updateSampleInfo(String user,
String password)
user - user ID to give to the DB, in order to get write permissionpassword - password to give to the DB, in order to get write permission
public boolean updateSampleIDInfo(String user,
String password)
user - user ID to give to the DB, in order to get write permissionpassword - password to give to the DB, in order to get write permission
public boolean updateAnalysis(String analysisPath,
String uID,
String password)
NGSPortalService
updateAnalysis in interface NGSPortalServiceanalysisPath - The path to where the analysis results are locateduID - The user ID to use when modifying the databasepassword - The password to use when modifying the database
public boolean addNote(int connectionID,
String note,
String tableName,
int rowID)
throws ConnectionException
addNote in interface NGSPortalServiceconnectionID - ID of the connection, used to retrieve the PortalConnection. Must match
the session connection ID, if the session connection ID existsnote - The NotetableName - Name of the table the note's aboutrowID - The id of the item in the table the note is about
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public List<Note> getNote(int connectionID,
String tableName,
int rowID)
throws ConnectionException
getNote in interface NGSPortalServiceconnectionID - ID of the connection, used to retrieve the PortalConnection. Must match
the session connection ID, if the session connection ID existstableName - Name of the table we're looking for notes for, null or empty string to get
notes for all tablesrowID - 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
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public boolean deleteNote(int connectionID,
String tableName,
int rowID,
Date noteDate)
throws ConnectionException
NGSPortalService
deleteNote in interface NGSPortalServiceconnectionID - ID of the connection, used to retrieve the PortalConnection. Must match
the session connection ID, if the session connection ID existstableName - Name of the table we're looking for notes for, null or empty string to get
notes for all tablesrowID - 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 tableNamenoteDate - The date of the note
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public int createAnalysisGroup(String analysisName,
String runName,
String flowCell,
String index,
int[] lanes,
String user,
String password)
analysisName - The name of the analysis project to be added to. May be null, may not be emptyrunName - The RunID of the run the analysis was done forflowCell - Name of the flowCell the samples were run in, null for don't careindex - Index of the sequence, empty to specify no index, null if don't care what the index islanes - Lane(s) the analyzed samples were run, null or empty to get all samples in the Runuser - User ID to give to the DB, in order to get write permissionpassword - Password to give to the DB, in order to get write permission
public String testSecondaryProjectMembership(String projectName,
String runName,
String flowCell,
String index,
int[] lanes,
String user,
String password)
projectName - The name of the Secondary Project we're testing the samples againstrunName - The RunID of the run the analysis was done forflowCell - Name of the flowCell the samples were run in, null for don't careindex - Index of the sequence, empty to specify no index, null if don't care what the index islanes - Lane(s) the analyzed samples were run, null or empty to get all samples in the Runuser - User ID to give to the DB, in order to get write permissionpassword - Password to give to the DB, in order to get write permission
public int createAnalysisGroup(int connectionID,
String analysisName,
String runName,
String flowCell,
String index,
int[] lanes)
throws ConnectionException
connectionID - The user's connection IDanalysisName - The name of the analysis project to be added to. May be null, may not be emptyrunName - The RunID of the run the analysis was done forflowCell - Name of the flowCell the samples were run in, null for don't careindex - Index of the sequence, empty to specify no index, null if don't care what the index islanes - Lane(s) the analyzed samples were run, null or empty to get all samples in the Run
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public boolean addSampleAnalysis(String projectName,
String appName,
double version,
String status,
Date analysisDate,
String user,
String password,
boolean complete,
boolean failed)
projectName - The name of the Secondary Project this analysis belongs toappName - The tool name of the analysis to be addedversion - The version of the tool that was usedstatus - The status of this analysisanalysisDate - The date the analysis was finisheduser - User ID to give to the DB, in order to get write permissionpassword - Password to give to the DB, in order to get write permissioncomplete - True if all analysis is done for this sample and run, else falsefailed - True if the analysis failed, else false
public String copyUserPermissions(String sourceUser,
String sourceUserRole,
String[] targetUsers,
String targetUserRole,
String sourceRun,
String sourceFlowcell,
int sourceLane,
String sourceIndex,
String targetRun,
String targetFlowcell,
int targetLane,
String targetIndex,
String user,
String password)
sourceUser - User to copy permissions from, or null if not doing thatsourceUserRole - Role of the user when getting target samples, or null if not doing thattargetUsers - Array of users to give permissions to, or null if not doing thattargetUserRole - Role to give the users on the specified samples, or null if not doing that.
Can not be "PI" or one of the privileged roles (like Informatics Specialist)sourceRun - Run to get the source sample from. May be null or emptysourceFlowcell - Flowcell of the source sample. May be null or emptysourceLane - Lane of the source sample. May be 0 to be ignoredsourceIndex - Index of the source sample. May be null or emptytargetRun - Run to get the target sample(s) from. May be null or emptytargetFlowcell - Flowcell of the target sample(s). May be null or emptytargetLane - Lane of the target sample(s). May be 0 to be ignoredtargetIndex - Index of the target sample(s). May be null or emptyuser - User ID to give to the DB, in order to get write permissionpassword - Password to give to the DB, in order to get write permission
public List<SampleData> getRunsSamples(String[] runIDs,
String appType,
String pi,
String[] sampleNames,
String[] sampleRLIMSIds,
String[] sampleFamilyIds,
String[] sampleParentIds,
String[] rlimsProjectNames,
Date startDate,
Date endDate,
int minNumReads,
String user,
String password)
runIDs - The run IDs we're interested in, or null if not filtering on runappType - Application type to filter on, null to not filterpi - LanID of PI to filter on, null to not filtersampleNames - Names of the sample(s) that we're interested in, null if not restricting on thatsampleRLIMSIds - RLIMS IDs of the sample(s) that we're interested in, null if not restricting on thatsampleFamilyIds - RLIMS Family ID of the sample(s) that we're interested in, null if not restricting on thatsampleParentIds - Root RLIMS IDs of the sample(s) that we're interested in, null if not restricting on thatrlimsProjectNames - RLIMS Project ID(s) of the sample(s) that we're interested in, null if not restricting on thatstartDate - Start date, inclusive, for results, null if not restricting on thatendDate - End date, inclusive, for results, null if not restricting on thatminNumReads - Minimum number of reads for a sample restrict on, 0 if not restricting on thatuser - User ID to give to the DB, in order to get read permissionpassword - Password to give to the DB, in order to get read permission
public List<String> getAnalysisDates(Date startDate,
Date endDate,
String application,
String[] runNames,
String pi,
boolean tabDelim,
String user,
String password)
startDate - If not null, lower bound on date range for allowed resultsendDate - If not null, upper bound on date range for allowed resultsapplication - Application type to filter on, null to not filterrunNames - Array of run names to restrict on, null not to filter on thempi - LanID of PI to filter on, null to not filtertabDelim - True if results are tab delimited, false to get comma delimited resultsuser - User ID to give to the DB, in order to get read permissionpassword - Password to give to the DB, in order to get read permission
public boolean addSampleAnalysis(int connectionID,
int groupID,
String appName,
double version,
String status,
Date analysisDate,
boolean complete,
boolean failed)
throws ConnectionException
connectionID - The user's connection IDgroupID - appName - The tool name of the analysis to be addedversion - The version of the tool that was usedstatus - The status of this analysisanalysisDate - The date the analysis was finishedcomplete - True if all analysis is done for this sample and run, else falsefailed - True if the analysis failed, else false
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection IDpublic static final String getFlowCell(String[] split)
split - The components of the second part of the name, split on '_'
public static final int getLane(String[] split)
split - The components of the second part of the name, split on '_'
public static final int getRead(String[] split)
split - The components of the second part of the name, split on '_'
public static final String getIndex(String[] split)
split - The components of the second part of the name, split on '_'
public static int verifyIndividual(String firstName,
String lastName,
Connection theConnection)
firstName - First name of the person of interestlastName - Last name of the person of interesttheConnection - Connection to the database to use when adding information
public static String formatDate(Date theDate)
theDate - Date to format. Will be set to today if null
public int moveSecAnToAnalysisGroups(String user,
String password)
user - User ID to give to the DB, in order to get write permissionpassword - Password to give to the DB, in order to get write permission
public int joinAnalysisGroups(String user,
String password)
user - User ID to give to the DB, in order to get write permissionpassword - Password to give to the DB, in order to get write permission
public int assignAnalysisGroups(String user,
String password)
user - User ID to give to the DB, in order to get write permissionpassword - Password to give to the DB, in order to get write permission
public int nameSecondaryProjects(String user,
String password)
user - User ID to give to the DB, in order to get write permissionpassword - Password to give to the DB, in order to get write permission
public int updateSecondaryProjects(String user,
String password)
user - User ID to give to the DB, in order to get write permissionpassword - Password to give to the DB, in order to get write permission
public int findOverlappingSecondaryProjects(String user,
String password)
user - User ID to give to the DB, in order to get write permissionpassword - Password to give to the DB, in order to get write permission
public int getReanalysisProjects(String user,
String password)
user - User ID to give to the DB, in order to get write permissionpassword - Password to give to the DB, in order to get write permission
public boolean addSecAnLinks(int[][] mappings)
mappings - Array of entries: seqID secAnID
public String addProject(int connectionID,
String notes,
boolean isReanalysis,
int[] seqSampleIDs,
Integer leadID,
Integer specID,
Integer piID)
throws ConnectionException
NGSPortalService
addProject in interface NGSPortalServiceconnectionID - The user's connection IDnotes - 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 nonespecID - Contact user ID for the informatics specialist, or null if nonepiID - Contact user ID for the PI, or null if none
ConnectionException
public void updateProject(int connectionID,
String projectName,
String notes,
boolean isReanalysis,
int[] seqSampleIDs,
Integer leadID,
Integer specID,
Integer piID)
throws ConnectionException
NGSPortalService
updateProject in interface NGSPortalServiceconnectionID - The user's connection IDprojectName - 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 leadspecID - Contact user ID for the informatics specialistpiID - Contact user ID for the PI
ConnectionException
public void removeProject(int connectionID,
String projectName)
throws ConnectionException
NGSPortalService
removeProject in interface NGSPortalServiceconnectionID - The user's connection IDprojectName - Name of project to remove.
ConnectionException
public List<SecondaryProjectInfo> getProjects(int connectionID,
String projectName)
throws ConnectionException
NGSPortalService
getProjects in interface NGSPortalServiceconnectionID - The user's connection IDprojectName - If not null, the name of the single project to get. Only will get if
the user created the project, or has canEditAll authorization
ConnectionException
public void removeProject(int connectionID,
int projID)
throws ConnectionException
connectionID - ID of the person making the requestprojID - ID of the project to delete
ConnectionException
public List<ProjectInfo> getProjects(int connectionID,
int[] projIDs)
throws ConnectionException
NGSPortalService
getProjects in interface NGSPortalServiceconnectionID - The user's connection IDprojIDs - ID(s) of the projects to fetch. If empty or null, all projects are returned.
ConnectionException
public List<String> getProjectNames(int connectionID)
throws ConnectionException
NGSPortalService
getProjectNames in interface NGSPortalServiceconnectionID - The user's connection ID
ConnectionException
public List<String> getPrimaryProjectNames(int connectionID)
throws ConnectionException
connectionID - The user's connection ID
ConnectionException
public List<ContactInfo> getContacts(int connectionID,
int[] contactIDs)
throws ConnectionException
NGSPortalService
getContacts in interface NGSPortalServiceconnectionID - The user's connection IDcontactIDs - ID(s) of the contacts to fetch. If empty or null, all contacts are returned.
ConnectionException
public Map<String,PrimaryAnalysisBean> getCurrentPrimaryStatus(int connectionID)
throws ConnectionException
getCurrentPrimaryStatus in interface NGSPortalServiceconnectionID - The id of the connection, so know what user has access to
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public List<String> getValidRunTypes(int connectionID)
throws ConnectionException
NGSPortalService
getValidRunTypes in interface NGSPortalServiceconnectionID - The user's connection ID.
ConnectionException
public List<SGEScriptSummary> getAvgCPUSecondsPerScript(SGEFilter filter,
int connectionID)
throws ConnectionException
NGSPortalService
getAvgCPUSecondsPerScript in interface NGSPortalServicefilter - An SGEFilter (null gives no filtering)connectionID - The user's connection ID.
ConnectionException
public List<SGEScriptSummary> getScriptInvocations(SGEFilter filter,
int connectionID)
throws ConnectionException
NGSPortalService
getScriptInvocations in interface NGSPortalServicefilter - An SGEFilter (null gives no filtering)connectionID - The user's connection ID.
ConnectionException
public List<SGEScriptSummary> getAvgRun(SGEFilter filter,
int connectionID)
throws ConnectionException
NGSPortalService
getAvgRun in interface NGSPortalServicefilter - An SGEFilter (null gives no filtering)connectionID - The user's connection ID.
ConnectionException
public List<SGEScriptSummary> getSumCPUSecondsPerScript(SGEFilter filter,
int connectionID)
throws ConnectionException
NGSPortalService
getSumCPUSecondsPerScript in interface NGSPortalServicefilter - An SGEFilter (null gives no filtering)connectionID - The user's connection ID.
ConnectionException
public List<String> getValidRLIMS(SGEFilter filter,
int connectionID)
throws ConnectionException
NGSPortalService
getValidRLIMS in interface NGSPortalServicefilter - An SGEFilter (null gives no filtering)connectionID - The user's connection ID.
ConnectionException
public Map<String,Double> getWallClockPerRun(SGEFilter filter,
int connectionID)
throws ConnectionException
NGSPortalService
getWallClockPerRun in interface NGSPortalServicefilter - An SGEFilter (null gives no filtering)connectionID - The user's connection ID.
ConnectionException
public Map<String,Double> getWallClockPerSample(SGEFilter filter,
int connectionID)
throws ConnectionException
NGSPortalService
getWallClockPerSample in interface NGSPortalServicefilter - An SGEFilter (null gives no filtering)connectionID - The user's connection ID.
ConnectionException
public Map<String,Integer> getSamplesPerMonth(SGEFilter filter,
int connectionID)
throws ConnectionException
NGSPortalService
getSamplesPerMonth in interface NGSPortalServicefilter - An SGEFilter(null gives no filtering)connectionID - The user's connection ID.
ConnectionException
public Map<String,Integer> getErrorsPerRun(SGEFilter filter,
int connectionID)
throws ConnectionException
NGSPortalService
getErrorsPerRun in interface NGSPortalServicefilter - An SGEFilter(null gives no filtering)connectionID - The user's connection ID.
ConnectionException
public Map<String,Integer> getSGEFlowcellsPerMonth(SGEFilter filter,
int connectionID)
throws ConnectionException
getSGEFlowcellsPerMonth in interface NGSPortalServiceConnectionException
public String getDefaultProjectName(String runName,
String appType,
String pi,
boolean isReanalysis)
NGSPortalService
getDefaultProjectName in interface NGSPortalServicerunName - Name of the run of interestappType - Application typepi - Name of the PIisReanalysis - True if it's a reanalysis, false otherwise
public ProjectSummaryBuilder getProjectsSummary(int connectionID,
String userLanID,
Date fromDate,
Date toDate)
throws ConnectionException
getProjectsSummary in interface NGSPortalServiceConnectionException
public Map<String,List<SecondaryAnalysisBean>> getSecondaryStatus(int connectID)
throws ConnectionException
getSecondaryStatus in interface NGSPortalServiceconnectID - The id of the connection, so know what user has access to
ConnectionExceptionpublic Map<String,Integer> getAllSecondaryStatuses()
getAllSecondaryStatuses in interface NGSPortalService
public Map<String,List<SecondaryAnalysisBean>> sqlresultToSecondaryAnalysis(ResultSet rs)
throws SQLException
rs -
SQLException
public void sendEmailNotification(int connectID,
String runName,
String application,
String pi,
String assignerLanID,
String notes,
String newAssignee,
String oldAssignee,
int projectID)
throws ConnectionException
sendEmailNotification in interface NGSPortalServiceconnectID - The user's connection IDrunName - The name of the runapplication - The type of analysis to be runpi - The PI the work is being done forassignerLanID - The LAN ID of the person assigning the worknotes - Any notes for the analysisnewAssignee - The person being assigned to run the analysisoldAssignee - The previous person assigned to do the analysis, or null if no oneprojectID - ID of the project, so can send along its name
ConnectionException
public void saveNotes(int connectID,
int projectID,
String runName,
String pI,
String application,
String personnel,
String newNotes)
throws ConnectionException
saveNotes in interface NGSPortalServiceconnectID - The id of the connection, so know what user has access toprojectID - ID of the project we're adding notes aboutrunName - Name of the run we're adding notes aboutpI - The PI the work is being done forapplication - The type of analysis being runpersonnel - LanID of the person doing the analysisnewNotes - New value of the notes field
ConnectionExceptionpublic Map<String,String> getISdetails()
getISdetails in interface NGSPortalService
public void saveSecondaryStartDate(int connectID,
int projectID,
Date date)
throws ConnectionException
saveSecondaryStartDate in interface NGSPortalServiceconnectID - The id of the connection, so know what user has access to
ConnectionException
public void saveBatched(int connectID,
int projectID,
String value)
throws ConnectionException
saveBatched in interface NGSPortalServiceConnectionException
public boolean setIsBIC(int connectionID,
boolean isBIC,
int projectID)
throws ConnectionException
setIsBIC in interface NGSPortalServiceconnectionID - ID of the connection, used to retrieve the PortalConnection. Must match
the session connection ID, if the session connection ID existsisBIC - Value to set all the samples toprojectID - DB Row ID of the project holding the samples
ConnectionException - If the connectionID is not valid, or if it doesn't match the session
connection ID
public void saveSecondaryDeliveryDate(int connectID,
int projectID,
Date date)
throws ConnectionException
saveSecondaryDeliveryDate in interface NGSPortalServiceconnectID - The id of the connection, so know what user has access to
ConnectionException
public void saveSecondaryCompleteDate(int connectID,
int projectID,
Date date)
throws ConnectionException
saveSecondaryCompleteDate in interface NGSPortalServiceConnectionExceptionpublic boolean checkAccessPrivilages(String userID)
checkAccessPrivilages in interface NGSPortalService
public void saveSecondaryAssignedDate(int connectID,
int projectID,
Date newValue)
throws ConnectionException
saveSecondaryAssignedDate in interface NGSPortalServiceConnectionException
public String addNewRerun(int connectID,
int projectID,
String projectName)
throws ConnectionException
addNewRerun in interface NGSPortalServiceConnectionException
public void writedatatofile(int connectid,
String exportdata)
throws IOException
writedatatofile in interface NGSPortalServiceIOException
public List<SecondaryDetails> getSecondaryAnalysisHistory(int connectid,
int projectid)
getSecondaryAnalysisHistory in interface NGSPortalService
public Map<String,Integer> getFlowcellsPerMonth(SGEFilter filter,
int connectID)
getFlowcellsPerMonth in interface NGSPortalService
public void savePersonneltoDB(int connectID,
int projectID,
String newISAssignee,
String oldISAssignee)
throws ConnectionException
savePersonneltoDB in interface NGSPortalServiceConnectionException
public void saveSecondaryAnalysisNotes(int connectID,
int analysisID,
String notes)
throws ConnectionException
saveSecondaryAnalysisNotes in interface NGSPortalServiceconnectID - The id of the connection, so know what user has access toanalysisID - The analysis to replace the notesnotes - The new notes for the analysis
ConnectionException - If not a valid connection
public String checkIfProjectNameIsUnique(String projectName,
Connection theConnection)
projectName - The name of the projecttheConnection - Connection to the DB to get the information
public boolean getRunSecondaryAnalysisStatus(List<Integer> sampleIDs)
getRunSecondaryAnalysisStatus in interface NGSPortalServicesampleIDs - List of IDs to look for, must not be empty or null
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
javax.servlet.ServletException
doGet in class javax.servlet.http.HttpServletIOException
javax.servlet.ServletException
public boolean sendWeeklyReport(String userlanID,
int connectionID)
throws ConnectionException
sendWeeklyReport in interface NGSPortalServiceuserlanID - connectionID -
ConnectionExceptionNGSPortalService.sendWeeklyReport(java.lang.String, int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||