Skip to content

Commit

Permalink
Fix typo in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kojix2 committed Mar 13, 2024
1 parent 3e7ded4 commit 5cd57ed
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ gem install minimap2
bundle install
bundle exec rake minimap2:build
bundle exec rake install

</details>

## Quick Start
Expand All @@ -36,6 +36,7 @@ seq = aligner.seq("MT_human", 100, 200)
hits = aligner.align(seq)
pp hits
```

```
[#<Minimap2::Alignment:0x000055bbfde2d128
@blen=100,
Expand Down Expand Up @@ -85,7 +86,7 @@ pp hits
- trans_strand Returns transcript strand. +1 if on the forward strand; -1 if on the reverse strand; 0 if unknown.
- blen Returns length of the alignment, including both alignment matches and gaps but excluding ambiguous bases.
- mlen Returns length of the matching bases in the alignment, excluding ambiguous base matches.
- nm Returns number of mismatches, gaps and ambiguous poistions in the alignment.
- nm Returns number of mismatches, gaps and ambiguous positions in the alignment.
- primary Returns if the alignment is primary (typically the best and the first to generate).
- q_st Returns start positions on the query.
- q_en Returns end positions on the query.
Expand All @@ -104,19 +105,20 @@ pp hits
* MapOpt class Mapping options.
```

* API is based on [Mappy](https://github.com/lh3/minimap2/tree/master/python), the official Python binding for Minimap2.
* `Aligner#map` has been changed to `align`, because `map` means iterator in Ruby.
* See [documentation](https://kojix2.github.io/ruby-minimap2/) for details.
- API is based on [Mappy](https://github.com/lh3/minimap2/tree/master/python), the official Python binding for Minimap2.
- `Aligner#map` has been changed to `align`, because `map` means iterator in Ruby.
- See [documentation](https://kojix2.github.io/ruby-minimap2/) for details.

<details>
<summary><b>C Structures and Functions</b></summary>

### FFI
* Ruby-Minimap2 is built on top of [Ruby-FFI](https://github.com/ffi/ffi).
* Native C functions can be called from the `Minimap2::FFI` module.
* Native C structure members can be accessed.
* Bitfields are supported by [ffi-bitfield](https://github.com/kojix2/ffi-bitfield) gems.


- Ruby-Minimap2 is built on top of [Ruby-FFI](https://github.com/ffi/ffi).
- Native C functions can be called from the `Minimap2::FFI` module.
- Native C structure members can be accessed.
- Bitfields are supported by [ffi-bitfield](https://github.com/kojix2/ffi-bitfield) gems.

```ruby
aligner.idx_opt.members
# => [:k, :w, :flag, :bucket_bits, :mini_batch_size, :batch_size]
Expand All @@ -128,15 +130,15 @@ aligner.idx_opt[:k] = 14
aligner.idx_opt[:k]
# => 14
```

</details>

## Contributing

<details>
<summary><b>Development</b></summary>

Fork your repository.
Fork your repository.
then clone.

```sh
Expand Down Expand Up @@ -182,7 +184,7 @@ ruby-minimap2 is a library under development and there are many points to be imp

Please feel free to report [bugs](https://github.com/kojix2/ruby-minimap2/issues) and [pull requests](https://github.com/kojix2/ruby-minimap2/pulls)!

Many OSS projects become abandoned because only the founder has commit rights to the original repository.
Many OSS projects become abandoned because only the founder has commit rights to the original repository.
If you need commit rights to ruby-minimap2 repository or want to get admin rights and take over the project, please feel free to contact me @kojix2.

## License
Expand Down
2 changes: 1 addition & 1 deletion lib/minimap2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def verbose=(level)
# @param [String] file_path
# @param [Boolean] comment If True, the comment will be read.
# @yield [name, seq, qual, comment]
# @return [Enumerator] enum Retrun Enumerator if not block given.
# @return [Enumerator] enum Return Enumerator if not block given.
# Note: You can BioRuby instead of this method.

def fastx_read(file_path, comment: false, &block)
Expand Down
7 changes: 4 additions & 3 deletions lib/minimap2/aligner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ class Aligner
# * ava-ont : Nanopore read overlap
# @param k [Integer] k-mer length, no larger than 28.
# @param w [Integer] minimizer window size, no larger than 255.
# @param min_cnt [Integer] mininum number of minimizers on a chain.
# @param min_chain_score [Integer] minimum chaing score.
# @param min_cnt [Integer] minimum number of minimizers on a chain.
# @param min_chain_score [Integer] minimum chain score.
# @param min_dp_score
# @param bw [Integer] chaining and alignment band width.
# @param bw [Integer] chaining and alignment band width. (initial chaining and extension)
# @param bw_long [Integer] chaining and alignment band width (RMQ-based rechaining and closing gaps)
# @param best_n [Integer] max number of alignments to return.
# @param n_threads [Integer] number of indexing threads.
# @param fn_idx_out [String] name of file to which the index is written.
Expand Down
2 changes: 1 addition & 1 deletion lib/minimap2/alignment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module Minimap2
# @return [Integer] length of the matching bases in the alignment,
# excluding ambiguous base matches.
# @!attribute nm
# @return [Integer] number of mismatches, gaps and ambiguous poistions in the alignment.
# @return [Integer] number of mismatches, gaps and ambiguous positions in the alignment.
# @!attribute primary
# @return [Integer] if the alignment is primary (typically the best and the first to generate)
# @!attribute q_st
Expand Down

0 comments on commit 5cd57ed

Please sign in to comment.