I finally wrote a quick wrapper for gzfile that looks a lot like nim's File.

You can use like
    
    
    import gzfile
    import strutils
    
    var vcf:GZFile
    doAssert vcf.open("test.vcf.gz")
    
    for line in vcf.lines:
      if not line.startsWith('#'):
        # do something
        echo line
    
    
    Run

this also works for non-gzipped files. and supports writing as well. available 
via:

nimble install 
[https://github.com/brentp/nim-gzfile](https://github.com/brentp/nim-gzfile)

Reply via email to