GithubHelp home page GithubHelp logo

nimbigwig's Introduction

Nimbigwig is a Nim wrapper for the libBigWig library.

Nimbigwig is distributed as a Nimble package and depends on nimgen and c2nim to generate the wrappers. The libBigWig source code is downloaded using git.

Installation

Nimbigwig can be installed via Nimble:

> nimble install nimbigwig

This will download, wrap and install nimbigwig in the standard Nimble package location, typically ~/.nimble. Once installed, it can be imported into any Nim program.

Usage

Module documentation can be found here.

import nimbigwig/bigWig

echo bwIsBigWig("nimbigwig/test/test.bw", nil)

Credits

Nimbigwig wraps the libBigWig library and all its licensing terms apply to the usage of this package.

Credits go out to c2nim as well without which this package would be greatly limited in its abilities.

Feedback

Nimbigwig is a work in progress and any feedback or suggestions are welcome. It is hosted on GitHub with an MIT license so issues, forks and PRs are most appreciated.

nimbigwig's People

Contributors

genotrance avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nimbigwig's Issues

can't use bwOpen

with this installed, your test passes. However, if I add:

echo bwOpen("nimbigwig/test/test.bw", nil, "r") == nil

to tests/tnimbigwig.nim
then there is the following compilation error:

Error: execution of an external compiler program 'gcc -c  -w -I"/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig" -DNOCURL  -I/home/brentp/src/nim/lib -I/home/brentp/src/nimbigwig/tests -o /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c.o /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c' failed with exit code: 1

In file included from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:12:0:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:22:6: error: nested redefinition of ‘enum bigWigFile_type_enum’
 enum bigWigFile_type_enum {
      ^
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:22:6: error: redeclaration of ‘enum bigWigFile_type_enum’
In file included from /home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWig.h:1:0,
                 from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:11:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:22:6: note: originally defined here
 enum bigWigFile_type_enum {
      ^
In file included from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:12:0:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:23:5: error: redeclaration of enumerator ‘BWG_FILE’
     BWG_FILE = 0,
     ^
In file included from /home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWig.h:1:0,
                 from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:11:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:23:5: note: previous definition of ‘BWG_FILE’ was here
     BWG_FILE = 0,
     ^
In file included from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:12:0:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:24:5: error: redeclaration of enumerator ‘BWG_HTTP’
     BWG_HTTP = 1,
     ^
In file included from /home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWig.h:1:0,
                 from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:11:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:24:5: note: previous definition of ‘BWG_HTTP’ was here
     BWG_HTTP = 1,
     ^
In file included from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:12:0:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:25:5: error: redeclaration of enumerator ‘BWG_HTTPS’
     BWG_HTTPS = 2,
     ^
In file included from /home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWig.h:1:0,
                 from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:11:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:25:5: note: previous definition of ‘BWG_HTTPS’ was here
     BWG_HTTPS = 2,
     ^
In file included from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:12:0:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:26:5: error: redeclaration of enumerator ‘BWG_FTP’
     BWG_FTP = 3
     ^
In file included from /home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWig.h:1:0,
                 from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:11:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:26:5: note: previous definition of ‘BWG_FTP’ was here
     BWG_FTP = 3
     ^
In file included from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:12:0:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:47:3: error: conflicting types for ‘URL_t’
 } URL_t;
   ^
In file included from /home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWig.h:1:0,
                 from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:11:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:47:3: note: previous declaration of ‘URL_t’ was here
 } URL_t;
   ^
In file included from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:12:0:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:62:8: error: conflicting types for ‘urlRead’
 size_t urlRead(URL_t *URL, void *buf, size_t bufSize);
        ^
In file included from /home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWig.h:1:0,
                 from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:11:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:62:8: note: previous declaration of ‘urlRead’ was here
 size_t urlRead(URL_t *URL, void *buf, size_t bufSize);
        ^
In file included from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:12:0:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:74:10: error: conflicting types for ‘urlSeek’
 CURLcode urlSeek(URL_t *URL, size_t pos);
          ^
In file included from /home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWig.h:1:0,
                 from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:11:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:74:10: note: previous declaration of ‘urlSeek’ was here
 CURLcode urlSeek(URL_t *URL, size_t pos);
          ^
In file included from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:12:0:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:91:8: error: conflicting types for ‘urlOpen’
 URL_t *urlOpen(char *fname, CURLcode (*callBack)(CURL*), const char* mode);
        ^
In file included from /home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWig.h:1:0,
                 from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:11:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:91:8: note: previous declaration of ‘urlOpen’ was here
 URL_t *urlOpen(char *fname, CURLcode (*callBack)(CURL*), const char* mode);
        ^
In file included from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:12:0:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:102:6: error: conflicting types for ‘urlClose’
 void urlClose(URL_t *URL);
      ^
In file included from /home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWig.h:1:0,
                 from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:11:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWigIO.h:102:6: note: previous declaration of ‘urlClose’ was here
 void urlClose(URL_t *URL);
      ^
In file included from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:13:0:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bwValues.h:17:16: error: redefinition of ‘struct bwRTreeNode_t’
 typedef struct bwRTreeNode_t {
                ^
In file included from /home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWig.h:2:0,
                 from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:11:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bwValues.h:17:16: note: originally defined here
 typedef struct bwRTreeNode_t {
                ^
In file included from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:13:0:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bwValues.h:30:3: error: conflicting types for ‘bwRTreeNode_t’
 } bwRTreeNode_t;
   ^
In file included from /home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWig.h:2:0,
                 from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:11:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bwValues.h:30:3: note: previous declaration of ‘bwRTreeNode_t’ was here
 } bwRTreeNode_t;
   ^
In file included from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:13:0:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bwValues.h:48:3: error: conflicting types for ‘bwRTree_t’
 } bwRTree_t;
   ^
In file included from /home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWig.h:2:0,
                 from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:11:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bwValues.h:48:3: note: previous declaration of ‘bwRTree_t’ was here
 } bwRTree_t;
   ^
In file included from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:13:0:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bwValues.h:57:3: error: conflicting types for ‘bwOverlapBlock_t’
 } bwOverlapBlock_t;
   ^
In file included from /home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWig.h:2:0,
                 from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:11:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bwValues.h:57:3: note: previous declaration of ‘bwOverlapBlock_t’ was here
 } bwOverlapBlock_t;
   ^
In file included from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:13:0:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bwValues.h:72:3: error: conflicting types for ‘bwDataHeader_t’
 } bwDataHeader_t;
   ^
In file included from /home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bigWig.h:2:0,
                 from /home/brentp/.cache/nim/tnimbigwig_d/tnimbigwig.nim.c:11:
/home/brentp/.nimble/pkgs/nimbigwig-0.1.2/nimbigwig/bwValues.h:72:3: note: previous declaration of ‘bwDataHeader_t’ was here
 } bwDataHeader_t;
   ^
stack trace: (most recent call last)
/tmp/nimblecache/nimscriptapi.nim(164, 16)
/home/brentp/src/nimbigwig/nimbigwig_17610.nims(35, 8) testTask
/home/brentp/src/nim/lib/system/nimscript.nim(246, 7) exec
/home/brentp/src/nim/lib/system/nimscript.nim(246, 7) Error: unhandled exception: FAILED: nim c -r tests/tnimbigwig.nim

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.