diff --git a/src/main/java/org/disq_bio/disq/HtsjdkReadsRddStorage.java b/src/main/java/org/disq_bio/disq/HtsjdkReadsRddStorage.java index 941bf87..3420284 100644 --- a/src/main/java/org/disq_bio/disq/HtsjdkReadsRddStorage.java +++ b/src/main/java/org/disq_bio/disq/HtsjdkReadsRddStorage.java @@ -40,10 +40,14 @@ import org.disq_bio.disq.impl.file.NioFileSystemWrapper; import org.disq_bio.disq.impl.formats.sam.AbstractSamSource; import org.disq_bio.disq.impl.formats.sam.SamFormat; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** The entry point for reading or writing a {@link HtsjdkReadsRdd}. */ public class HtsjdkReadsRddStorage { + private static final Logger logger = LoggerFactory.getLogger(HtsjdkReadsRddStorage.class); + private JavaSparkContext sparkContext; private int splitSize; private ValidationStringency validationStringency = ValidationStringency.DEFAULT_STRINGENCY; @@ -199,6 +203,8 @@ public void write(HtsjdkReadsRdd htsjdkReadsRdd, String path, WriteOption... wri indexesToEnable.add(CraiWriteOption.getIndexExtension()); } else if (writeOption instanceof SbiWriteOption && writeOption == SbiWriteOption.ENABLE) { indexesToEnable.add(SbiWriteOption.getIndexExtension()); + } else { + logger.warn("Unrecognized write option: {}", writeOption); } } diff --git a/src/main/java/org/disq_bio/disq/HtsjdkVariantsRddStorage.java b/src/main/java/org/disq_bio/disq/HtsjdkVariantsRddStorage.java index 48f1263..c27fdd7 100644 --- a/src/main/java/org/disq_bio/disq/HtsjdkVariantsRddStorage.java +++ b/src/main/java/org/disq_bio/disq/HtsjdkVariantsRddStorage.java @@ -35,10 +35,14 @@ import org.apache.spark.api.java.JavaSparkContext; import org.disq_bio.disq.impl.formats.vcf.VcfFormat; import org.disq_bio.disq.impl.formats.vcf.VcfSource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** The entry point for reading or writing a {@link HtsjdkVariantsRdd}. */ public class HtsjdkVariantsRddStorage { + private static final Logger logger = LoggerFactory.getLogger(HtsjdkVariantsRddStorage.class); + private JavaSparkContext sparkContext; private int splitSize; @@ -122,6 +126,8 @@ public void write(HtsjdkVariantsRdd htsjdkVariantsRdd, String path, WriteOption. } else if (writeOption instanceof TabixIndexWriteOption && writeOption == TabixIndexWriteOption.ENABLE) { indexesToEnable.add(TabixIndexWriteOption.getIndexExtension()); + } else { + logger.warn("Unrecognized write option: {}", writeOption); } }