All Downloads are FREE. Search and download functionalities are using the official Maven repository.

umcg.genetica.io.regulomedb.RegulomeDbFile Maven / Gradle / Ivy

There is a newer version: 1.0.7
Show newest version
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package umcg.genetica.io.regulomedb;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Iterator;

/**
 *
 * @author Patrick Deelen
 */
public class RegulomeDbFile implements Iterable {
	
	private final File regulomeDbFile;

	public RegulomeDbFile(File regulomeDbFile) throws FileNotFoundException, IOException {
		if(!regulomeDbFile.exists()){
			throw new FileNotFoundException("RegulomeDB file not found: " + regulomeDbFile.getAbsolutePath());
		}
		if(!regulomeDbFile.canRead()){
			throw new IOException("Can not read RegulomeDB file: " + regulomeDbFile.getAbsolutePath());
		}
		this.regulomeDbFile = regulomeDbFile;
	}

	@Override
	public Iterator iterator() {
		return new RegulomeDbIterator(this);
	}

	public File getRegulomeDbFile() {
		return regulomeDbFile;
	}
	
	
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy