Package htsjdk.tribble.readers

Examples of htsjdk.tribble.readers.LineIterator


    public static Pair<VCFHeader, List<VariantContext>> readVCF(final File source) throws IOException {
        // read in the features
        final List<VariantContext> vcs = new ArrayList<VariantContext>();
        final VCFCodec codec = new VCFCodec();
        PositionalBufferedStream pbs = new PositionalBufferedStream(new FileInputStream(source));
        final LineIterator vcfSource = codec.makeSourceFromStream(pbs);
        try {
            final VCFHeader vcfHeader = (VCFHeader) codec.readActualHeader(vcfSource);

            while (vcfSource.hasNext()) {
                final VariantContext vc = codec.decode(vcfSource);
                if ( vc != null )
                    vcs.add(vc);
            }
View Full Code Here

TOP

Related Classes of htsjdk.tribble.readers.LineIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.