Interface SequencingObjectService
-
- All Superinterfaces:
CRUDService<java.lang.Long,SequencingObject>
- All Known Implementing Classes:
SequencingObjectServiceImpl
public interface SequencingObjectService extends CRUDService<java.lang.Long,SequencingObject>
Service for managingSequencingObject
s and relationships with related objects
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SampleSequencingObjectJoin
concatenateSequences(java.util.List<SequencingObject> toJoin, java.lang.String filename, Sample targetSample, boolean removeOriginals)
Concatenate a collection ofSequencingObject
s and save back to aSample
SampleSequencingObjectJoin
createSequencingObjectInSample(SequencingObject seqObject, Sample sample)
Create a newSequencingObject
associated with aSample
java.util.Collection<SampleSequencingObjectJoin>
getSequencesForSampleOfType(Sample sample, java.lang.Class<? extends SequencingObject> type)
Get a collection ofSampleSequencingObjectJoin
s assocaited with a givenSample
and of the given class typejava.util.Set<SequencingObject>
getSequencingObjectsForAnalysisSubmission(AnalysisSubmission submission)
Get the set ofSequencingObject
s associated with a givenAnalysisSubmission
java.util.Collection<SampleSequencingObjectJoin>
getSequencingObjectsForSample(Sample sample)
Get all theSequencingObject
s associate with a givenSample
java.util.Set<SequencingObject>
getSequencingObjectsForSequencingRun(SequencingRun sequencingRun)
Get all theSequencingObject
s associated with a givenSequencingRun
<Type extends SequencingObject>
java.util.Set<Type>getSequencingObjectsOfTypeForAnalysisSubmission(AnalysisSubmission submission, java.lang.Class<Type> type)
Get allSequencingObject
s of a given type associated with anAnalysisSubmission
<T extends SequencingObject>
java.util.Map<Sample,T>getUniqueSamplesForSequencingObjects(java.util.Set<T> sequenceFiles)
Gets a map ofSequencingObject
s and correspondingSample
s.SequencingObject
readSequencingObjectForSample(Sample sample, java.lang.Long objectId)
Read aSequencingObject
and verify that it belongs to a givenSample
.SequencingObject
updateRemoteStatus(java.lang.Long id, RemoteStatus remoteStatus)
Update theRemoteStatus
for aSequencingObject
-
Methods inherited from interface ca.corefacility.bioinformatics.irida.service.CRUDService
count, create, delete, exists, findAll, findRevisions, findRevisions, list, list, list, read, readMultiple, search, search, update, updateFields, updateMultiple
-
-
-
-
Method Detail
-
createSequencingObjectInSample
SampleSequencingObjectJoin createSequencingObjectInSample(SequencingObject seqObject, Sample sample)
Create a newSequencingObject
associated with aSample
- Parameters:
seqObject
- TheSequencingObject
to createsample
- theSample
to associate it with- Returns:
- a new
SampleSequencingObjectJoin
describing the relationship
-
getSequencingObjectsForSample
java.util.Collection<SampleSequencingObjectJoin> getSequencingObjectsForSample(Sample sample)
Get all theSequencingObject
s associate with a givenSample
- Parameters:
sample
- TheSample
to get sequences for- Returns:
- A collection of
SampleSequencingObjectJoin
-
getSequencesForSampleOfType
java.util.Collection<SampleSequencingObjectJoin> getSequencesForSampleOfType(Sample sample, java.lang.Class<? extends SequencingObject> type)
Get a collection ofSampleSequencingObjectJoin
s assocaited with a givenSample
and of the given class type- Parameters:
sample
- theSample
used in the jointype
- The type ofSequencingObject
that must be in the join- Returns:
- a Collection of
SampleSequencingObjectJoin
-
readSequencingObjectForSample
SequencingObject readSequencingObjectForSample(Sample sample, java.lang.Long objectId)
Read aSequencingObject
and verify that it belongs to a givenSample
.- Parameters:
sample
- theSample
to get theSequencingObject
forobjectId
- TheSequencingObject
ID- Returns:
- A
SequencingObject
object
-
getUniqueSamplesForSequencingObjects
<T extends SequencingObject> java.util.Map<Sample,T> getUniqueSamplesForSequencingObjects(java.util.Set<T> sequenceFiles) throws DuplicateSampleException
Gets a map ofSequencingObject
s and correspondingSample
s.- Type Parameters:
T
- The type of sequencing object which should be returned- Parameters:
sequenceFiles
- ASet
ofSequencingObject
s.- Returns:
- A
Map
of betweenSample
andSequencingObject
. - Throws:
DuplicateSampleException
- If there is a duplicate sample.
-
getSequencingObjectsForSequencingRun
java.util.Set<SequencingObject> getSequencingObjectsForSequencingRun(SequencingRun sequencingRun)
Get all theSequencingObject
s associated with a givenSequencingRun
- Parameters:
sequencingRun
- the run to get objects for- Returns:
- a set of
SequencingObject
-
updateRemoteStatus
SequencingObject updateRemoteStatus(java.lang.Long id, RemoteStatus remoteStatus)
Update theRemoteStatus
for aSequencingObject
- Parameters:
id
- ID of the objet to updateremoteStatus
- a RemoteStatus to set- Returns:
- the updated
SequencingObject
-
getSequencingObjectsForAnalysisSubmission
java.util.Set<SequencingObject> getSequencingObjectsForAnalysisSubmission(AnalysisSubmission submission)
Get the set ofSequencingObject
s associated with a givenAnalysisSubmission
- Parameters:
submission
- theAnalysisSubmission
- Returns:
- the associated
SequencingObject
s
-
getSequencingObjectsOfTypeForAnalysisSubmission
<Type extends SequencingObject> java.util.Set<Type> getSequencingObjectsOfTypeForAnalysisSubmission(AnalysisSubmission submission, java.lang.Class<Type> type)
Get allSequencingObject
s of a given type associated with anAnalysisSubmission
- Type Parameters:
Type
- a class type extendingSequencingObject
- Parameters:
submission
- theAnalysisSubmission
type
- the class type ofSequencingObject
to return- Returns:
- a set of the requested type
-
concatenateSequences
SampleSequencingObjectJoin concatenateSequences(java.util.List<SequencingObject> toJoin, java.lang.String filename, Sample targetSample, boolean removeOriginals) throws ConcatenateException
Concatenate a collection ofSequencingObject
s and save back to aSample
- Parameters:
toJoin
- theSequencingObject
s to concatenatefilename
- The name of the file to create on concatenationtargetSample
- theSample
to save toremoveOriginals
- Whether to remove the originalSequencingObject
s from the sample- Returns:
- the new
SampleSequencingObjectJoin
- Throws:
ConcatenateException
- if there was an error concatenating the sequences
-
-