Fixing the recent SelectVariants fix
This commit is contained in:
parent
782453235a
commit
0ccd173967
|
|
@ -209,7 +209,7 @@ public class SelectVariants extends RodWalker<Integer, Integer> {
|
||||||
* Note that sample exclusion takes precedence over inclusion, so that if a sample is in both lists it will be excluded.
|
* Note that sample exclusion takes precedence over inclusion, so that if a sample is in both lists it will be excluded.
|
||||||
*/
|
*/
|
||||||
@Argument(fullName="exclude_sample_file", shortName="xl_sf", doc="File containing a list of samples (one per line) to exclude. Can be specified multiple times", required=false)
|
@Argument(fullName="exclude_sample_file", shortName="xl_sf", doc="File containing a list of samples (one per line) to exclude. Can be specified multiple times", required=false)
|
||||||
public Set<File> XLsampleFiles;
|
public Set<File> XLsampleFiles = new HashSet<File>(0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Note that these expressions are evaluated *after* the specified samples are extracted and the INFO field annotations are updated.
|
* Note that these expressions are evaluated *after* the specified samples are extracted and the INFO field annotations are updated.
|
||||||
|
|
@ -344,12 +344,10 @@ public class SelectVariants extends RodWalker<Integer, Integer> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// now, exclude any requested samples
|
// now, exclude any requested samples
|
||||||
if (XLsampleFiles != null)
|
Collection<String> XLsamplesFromFile = SampleUtils.getSamplesFromFiles(XLsampleFiles);
|
||||||
if(!XLsampleFiles.isEmpty()) {
|
samples.removeAll(XLsamplesFromFile);
|
||||||
Collection<String> XLsamplesFromFile = SampleUtils.getSamplesFromFiles(XLsampleFiles);
|
samples.removeAll(XLsampleNames);
|
||||||
samples.removeAll(XLsamplesFromFile);
|
|
||||||
samples.removeAll(XLsampleNames);
|
|
||||||
}
|
|
||||||
if ( samples.size() == 0 && !NO_SAMPLES_SPECIFIED )
|
if ( samples.size() == 0 && !NO_SAMPLES_SPECIFIED )
|
||||||
throw new UserException("All samples requested to be included were also requested to be excluded.");
|
throw new UserException("All samples requested to be included were also requested to be excluded.");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue