Move getSamplesForSamFile to SampleUtils
-- A nearly identical piece of code already lived in SampleUtils. Now there are two functions, one taking a regular header and another grabbing the merged header from the GATK engine itself. Much cleaner
This commit is contained in:
parent
30d23942b1
commit
178ba24c27
|
|
@ -1041,13 +1041,6 @@ public class GenomeAnalysisEngine {
|
|||
return this.sampleDataSource;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all samples that were referenced in the SAM file
|
||||
*/
|
||||
public Set<Sample> getSAMFileSamples() {
|
||||
return sampleDataSource.getSamples(SampleUtils.getSAMFileSamples(getSAMFileHeader()));
|
||||
}
|
||||
|
||||
public Map<String,String> getApproximateCommandLineArguments(Object... argumentProviders) {
|
||||
return CommandLineUtils.getApproximateCommandLineArguments(parsingEngine,argumentProviders);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,6 +69,18 @@ public class SampleUtils {
|
|||
return samples;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Same as @link getSAMFileSamples but gets all of the samples
|
||||
* in the SAM files loaded by the engine
|
||||
*
|
||||
* @param engine
|
||||
* @return
|
||||
*/
|
||||
public final static Set<String> getSAMFileSamples(GenomeAnalysisEngine engine) {
|
||||
return SampleUtils.getSAMFileSamples(engine.getSAMFileHeader());
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all of the unique sample names from all VCF rods input by the user
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue