uk.ac.sanger.cgp.standalonecsa.interfaces
Interface FileLocatorService
- All Known Implementing Classes:
- FileLocatorServiceImpl
public interface FileLocatorService
This interface handles file searching and construction of data objects from
filenames.
- Author:
- Original: kr2, $Author: kr2 $
Method Summary |
java.lang.String |
csvExists()
Gets the location of the results.csv if it exists. |
java.util.Map |
findOutput()
Collates information required to construct an index page. |
TraceGroupBean |
getAmplimerGroup(java.util.List files,
AmplimerBean amplimer)
Constructs a TraceGroupBean for the specified amplimer. |
java.util.Map |
getTraceFiles()
Gets a list of possible trace filenames. |
getTraceFiles
java.util.Map getTraceFiles()
- Gets a list of possible trace filenames.
This method is expected to behave as follows:
- parse directory structures starting from the input location specified in the standaloneCsa.properties file
- build a list of files where the extension and file name parse correctly based on the standaloneCsa.properties file
- Returns:
- a set of Files grouped by amplimer name
getAmplimerGroup
TraceGroupBean getAmplimerGroup(java.util.List files,
AmplimerBean amplimer)
- Constructs a TraceGroupBean for the specified amplimer.
This method is expected to behave as follows:
- construct an ExperimentBean for each input file with its chromatogram already loaded
- add the ExperimentBean to the relevant list within the group (wildtype/variant)
- pair the ExperimentBeans in each list (ExperimentBean.setComplimentExp(ExperimentBean complimentExp)
)
- Parameters:
files
- a list of files that should be incorporated into this groupamplimer
- the AmplimerBean for this amplimer
- Returns:
- a TraceGroupBean populated with ExperimentBeans constructed from the list of files
findOutput
java.util.Map findOutput()
- Collates information required to construct an index page.
This method is expected to behave as follows:
- Search the view output location (specified in standaloneCsa.properties) for *-amp.html files
- For each *-amp.html file recurse the amplimer directory counting the number of variants
- Construct a Map with amplimerName as the key and the number of variants as the value
- Returns:
- a Map of amplimerName and number of variants
csvExists
java.lang.String csvExists()
- Gets the location of the results.csv if it exists.
This method is expected to behave as follows:
- Check for the presence of the 'results.csv' file in the location specified in standaloneCsa.properties
- When present return the location as a string
- When not present return an empty string (not able to use null as this is passed to VelocityTemplate engine)
- Returns:
- the location of the results.csv file (empty string if not present)