If only dcov is specified, assume that selected downsample type is BY_SAMPLE.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4147 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
9584cbc05e
commit
fb177c4fee
|
|
@ -143,6 +143,8 @@ public class GATKArgumentCollection {
|
|||
public DownsamplingMethod getDownsamplingMethod() {
|
||||
if(downsamplingType == null && downsampleFraction == null && downsampleCoverage == null)
|
||||
return null;
|
||||
if(downsamplingType == null && downsampleCoverage != null)
|
||||
return new DownsamplingMethod(DEFAULT_DOWNSAMPLING_TYPE,downsampleCoverage,null);
|
||||
return new DownsamplingMethod(downsamplingType,downsampleCoverage,downsampleFraction);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -541,8 +541,8 @@ public class LocusIteratorByState extends LocusIterator {
|
|||
|
||||
public ReadStateManager(Iterator<SAMRecord> source, DownsamplingMethod downsamplingMethod, Collection<String> sampleNames) {
|
||||
this.iterator = new PeekableIterator<SAMRecord>(source);
|
||||
this.downsamplingMethod = downsamplingMethod;
|
||||
switch(downsamplingMethod.type) {
|
||||
this.downsamplingMethod = downsamplingMethod.type != null ? downsamplingMethod : DownsamplingMethod.NONE;
|
||||
switch(this.downsamplingMethod.type) {
|
||||
case BY_SAMPLE:
|
||||
if(downsamplingMethod.toCoverage == null)
|
||||
throw new StingException("Downsampling coverage (-dcov) must be specified when downsampling by sample");
|
||||
|
|
|
|||
Loading…
Reference in New Issue