public static DownsamplingMethod getDownsamplingMethod( Class<? extends Walker> walkerClass ) {
DownsamplingMethod downsamplingMethod = null;
if( walkerClass.isAnnotationPresent(Downsample.class) ) {
Downsample downsampleParameters = walkerClass.getAnnotation(Downsample.class);
DownsampleType type = downsampleParameters.by();
Integer toCoverage = downsampleParameters.toCoverage() >= 0 ? downsampleParameters.toCoverage() : null;
Double toFraction = downsampleParameters.toFraction() >= 0.0d ? downsampleParameters.toFraction() : null;
downsamplingMethod = new DownsamplingMethod(type, toCoverage, toFraction);
}