use of com.github.lindenb.jvarkit.tools.vcfeigen.EigenInfoAnnotator in project jvarkit by lindenb.
the class EigenVariants method initialize.
@Override
public void initialize() {
logger.info("opening eigen directory :" + eigenDir);
IOUtil.assertDirectoryIsReadable(eigenDir);
this.annotator = new EigenInfoAnnotator(this.eigenDir);
if (this.tabixPrefix != null) {
logger.info("changing eigen file prefix from :" + this.annotator.getTabixPrefix() + " to " + this.tabixPrefix);
this.annotator.setTabixFilePrefix(this.tabixPrefix);
}
final VCFHeader header1 = super.getVcfHeader();
final VCFHeader h2 = new VCFHeader(header1);
for (final VCFInfoHeaderLine vihl : this.annotator.getInfoHeaderLines()) {
if (h2.getInfoHeaderLine(vihl.getID()) != null) {
throw new UserException.MalformedVCFHeader("VCF INFO " + vihl.getID() + " already defined in input VCF.");
}
h2.addMetaDataLine(vihl);
}
super.writer.writeHeader(h2);
super.initialize();
}
Aggregations