shaq_lib 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +4 -0
- data/README.md +43 -0
- data/Rakefile +15 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/ext/shaq_lib/extconf.rb +3 -0
- data/ext/shaq_lib/shaq_lib.c +31 -0
- data/lib/shaq_lib/shaq_lib.bundle +0 -0
- data/lib/shaq_lib/version.rb +3 -0
- data/lib/shaq_lib.bundle +0 -0
- data/lib/shaq_lib.rb +5 -0
- data/shaq_lib.gemspec +29 -0
- metadata +120 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4e78132d369c3339be61e910d2aed506a5723f99
|
4
|
+
data.tar.gz: 4956ff48790446388a0d871343228661bbbe6ec1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 84f0148731c233e5a98d8df330b655875a34e96d3b5878f9b7a9f5e135fe40b56d9573e9d16ec6d1e24f103ee3f4d9ff1c9ca295d90d92dd1e3aaa0f8fda8170
|
7
|
+
data.tar.gz: 20643dc104db18781e8e9c49f77baf1a69b72d7dd5d090adf96719bc87c8fdc670129b7729dce3f46934c3f092a2984a665b26c603c2e96d53db2612cabb76ea
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
shaq_lib
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.3.0
|
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at moorer@udel.edu. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# ShaqLib #
|
2
|
+
|
3
|
+
Library code for the [Shaq](https://github.com/mooreryan/shaq)
|
4
|
+
assembler.
|
5
|
+
|
6
|
+
## Installation ##
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'shaq_lib'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install shaq_lib
|
21
|
+
|
22
|
+
|
23
|
+
## Development ##
|
24
|
+
|
25
|
+
After checking out the repo, run `bin/setup` to install
|
26
|
+
dependencies. Then, run `rake spec` to run the tests. You can also run
|
27
|
+
`bin/console` for an interactive prompt that will allow you to
|
28
|
+
experiment.
|
29
|
+
|
30
|
+
To install this gem onto your local machine, run `bundle exec rake
|
31
|
+
install`. To release a new version, update the version number in
|
32
|
+
`version.rb`, and then run `bundle exec rake release`, which will
|
33
|
+
create a git tag for the version, push git commits and tags, and push
|
34
|
+
the `.gem` file to [rubygems.org](https://rubygems.org).
|
35
|
+
|
36
|
+
## Contributing ##
|
37
|
+
|
38
|
+
Bug reports and pull requests are welcome on GitHub at
|
39
|
+
https://github.com/[mooreryan]/shaq_lib. This project is intended to be
|
40
|
+
a safe, welcoming space for collaboration, and contributors are
|
41
|
+
expected to adhere to the
|
42
|
+
[Contributor Covenant](http://contributor-covenant.org) code of
|
43
|
+
conduct.
|
data/Rakefile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "rspec/core/rake_task"
|
3
|
+
require "rake/extensiontask"
|
4
|
+
|
5
|
+
RSpec::Core::RakeTask.new(:spec)
|
6
|
+
|
7
|
+
task :default => :spec
|
8
|
+
|
9
|
+
Rake::ExtensionTask.new do |ext|
|
10
|
+
ext.name = "shaq_lib"
|
11
|
+
ext.ext_dir = "ext/shaq_lib"
|
12
|
+
ext.lib_dir = "lib/shaq_lib"
|
13
|
+
end
|
14
|
+
|
15
|
+
Rake::Task[:spec].prerequisites << :compile
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "shaq_lib"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
#include <ruby.h>
|
2
|
+
|
3
|
+
static VALUE kmers(VALUE klass, VALUE str, VALUE ksize)
|
4
|
+
{
|
5
|
+
long i = 0;
|
6
|
+
long j = 0;
|
7
|
+
long k = NUM2LONG(ksize);
|
8
|
+
long num_kmers = RSTRING_LEN(str) - k + 1;
|
9
|
+
|
10
|
+
char *c_str = RSTRING_PTR(str);
|
11
|
+
|
12
|
+
for (i = 0; i < num_kmers; ++i) {
|
13
|
+
char substr[k+1];
|
14
|
+
|
15
|
+
for (j = 0; j < k; ++j) {
|
16
|
+
substr[j] = c_str[i+j];
|
17
|
+
}
|
18
|
+
substr[j] = '\0';
|
19
|
+
|
20
|
+
/* for this, put the length without the null char */
|
21
|
+
rb_yield(rb_str_new(substr, k));
|
22
|
+
}
|
23
|
+
|
24
|
+
return str;
|
25
|
+
}
|
26
|
+
|
27
|
+
void Init_shaq_lib(void)
|
28
|
+
{
|
29
|
+
VALUE ModuleShaqLib = rb_define_module("ShaqLib");
|
30
|
+
rb_define_singleton_method(ModuleShaqLib, "kmers", kmers, 2);
|
31
|
+
}
|
Binary file
|
data/lib/shaq_lib.bundle
ADDED
Binary file
|
data/lib/shaq_lib.rb
ADDED
data/shaq_lib.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'shaq_lib/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "shaq_lib"
|
8
|
+
spec.version = ShaqLib::VERSION
|
9
|
+
spec.authors = ["Ryan Moore"]
|
10
|
+
spec.email = ["moorer@udel.edu"]
|
11
|
+
spec.license = "GPLv3"
|
12
|
+
|
13
|
+
spec.summary = %q{Library code for Shaq assembler}
|
14
|
+
spec.description = %q{Library code for Shaq assembler}
|
15
|
+
spec.homepage = "https://github.com/mooreryan/shaq_lib"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib", "ext"]
|
21
|
+
|
22
|
+
spec.platform = Gem::Platform::RUBY
|
23
|
+
spec.extensions = ["ext/shaq_lib/extconf.rb"]
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", "~> 1.11"
|
26
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
27
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
28
|
+
spec.add_development_dependency "rake-compiler", "~> 0.9.7"
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: shaq_lib
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ryan Moore
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-04-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.11'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.11'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake-compiler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.9.7
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.9.7
|
69
|
+
description: Library code for Shaq assembler
|
70
|
+
email:
|
71
|
+
- moorer@udel.edu
|
72
|
+
executables: []
|
73
|
+
extensions:
|
74
|
+
- ext/shaq_lib/extconf.rb
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- ".gitignore"
|
78
|
+
- ".rspec"
|
79
|
+
- ".ruby-gemset"
|
80
|
+
- ".ruby-version"
|
81
|
+
- ".travis.yml"
|
82
|
+
- CODE_OF_CONDUCT.md
|
83
|
+
- Gemfile
|
84
|
+
- README.md
|
85
|
+
- Rakefile
|
86
|
+
- bin/console
|
87
|
+
- bin/setup
|
88
|
+
- ext/shaq_lib/extconf.rb
|
89
|
+
- ext/shaq_lib/shaq_lib.c
|
90
|
+
- lib/shaq_lib.bundle
|
91
|
+
- lib/shaq_lib.rb
|
92
|
+
- lib/shaq_lib/shaq_lib.bundle
|
93
|
+
- lib/shaq_lib/version.rb
|
94
|
+
- shaq_lib.gemspec
|
95
|
+
homepage: https://github.com/mooreryan/shaq_lib
|
96
|
+
licenses:
|
97
|
+
- GPLv3
|
98
|
+
metadata: {}
|
99
|
+
post_install_message:
|
100
|
+
rdoc_options: []
|
101
|
+
require_paths:
|
102
|
+
- lib
|
103
|
+
- ext
|
104
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - ">="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '0'
|
109
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: '0'
|
114
|
+
requirements: []
|
115
|
+
rubyforge_project:
|
116
|
+
rubygems_version: 2.5.1
|
117
|
+
signing_key:
|
118
|
+
specification_version: 4
|
119
|
+
summary: Library code for Shaq assembler
|
120
|
+
test_files: []
|