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

xyz.ielis.hyperutil.reference.fasta.GenomeSequenceAccessors Maven / Gradle / Ivy

There is a newer version: 0.1.4
Show newest version
package xyz.ielis.hyperutil.reference.fasta;

import java.nio.file.Path;

public class GenomeSequenceAccessors {

    private GenomeSequenceAccessors() {
        // private no-op
    }

    public static GenomeSequenceAccessor getGenomeSequenceAccessor(Path fastaPath) {
        return getGenomeSequenceAccessor(fastaPath, Type.SINGLE_FASTA);
    }

    public static GenomeSequenceAccessor getGenomeSequenceAccessor(Path fastaPath, Type type) {
        switch (type) {
            case SINGLE_FASTA:
                return new SingleFastaGenomeSequenceAccessor(fastaPath);
            case SINGLE_CHROMOSOME:
                return new SingleChromosomeGenomeSequenceAccessor(fastaPath);
            default:
                throw new IllegalArgumentException(String.format("Unknown type `%s`", type));
        }
    }

    public enum Type {
        SINGLE_FASTA,
        SINGLE_CHROMOSOME
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy