Skip to content

Commit

Permalink
fix up some api links and code blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
nh13 committed Jan 9, 2025
1 parent dac25c3 commit 5bd7844
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 79 deletions.
26 changes: 13 additions & 13 deletions pybwa/libbwaaln.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ __all__ = [
]

cdef class BwaAlnOptions:
"""The container for options for [`BwaAln`][pybwa.BwaAln]."""
"""The container for options for :class:`pybwa.BwaAln."""
cdef gap_opt_t * _delegate

_max_hits: int
Expand All @@ -42,14 +42,14 @@ cdef class BwaAlnOptions:
self._delegate.s_mm = value

property max_gap_opens:
"""bwa aln -o <int>"""
""":code:`bwa aln -o <int>`"""
def __get__(self):
return self._delegate.max_gapo
def __set__(self, value: int):
self._delegate.max_gapo = value

property max_gap_extensions:
"""bwa aln -e <int>"""
""":code:`bwa aln -e <int>`"""
def __get__(self):
return self._delegate.max_gapo
def __set__(self, value: int):
Expand All @@ -58,56 +58,56 @@ cdef class BwaAlnOptions:
self._delegate.mode &= ~BWA_MODE_GAPE

property min_indel_to_end_distance:
"""bwa aln -i <int>"""
""":code:`bwa aln -i <int>`"""
def __get__(self):
return self._delegate.indel_end_skip
def __set__(self, value: int):
self._delegate.indel_end_skip = value

property max_occurrences_for_extending_long_deletion:
"""bwa aln -d <int>"""
""":code:`bwa aln -d <int>`"""
def __get__(self):
return self._delegate.max_del_occ
def __set__(self, value: int):
self._delegate.max_del_occ = value

property seed_length:
"""bwa aln -l <int>"""
""":code:`bwa aln -l <int>`"""
def __get__(self):
return self._delegate.seed_len
def __set__(self, value: int):
self._delegate.seed_len = value

property max_mismatches_in_seed:
"""bwa aln -k <int>"""
""":code:`bwa aln -k <int>`"""
def __get__(self):
return self._delegate.max_seed_diff
def __set__(self, value: int):
self._delegate.max_seed_diff = value

property mismatch_penalty:
"""bwa aln -M <int>"""
""":code:`bwa aln -M <int>`"""
def __get__(self):
return self._delegate.s_mm
def __set__(self, value: int):
self._delegate.s_mm = value

property gap_open_penalty:
"""bwa aln -O <int>"""
""":code:`bwa aln -O <int>`"""
def __get__(self):
return self._delegate.s_gapo
def __set__(self, value: int):
self._delegate.s_gapo = value

property gap_extension_penalty:
"""bwa aln -E <int>"""
""":code:`bwa aln -E <int>`"""
def __get__(self):
return self._delegate.s_gape
def __set__(self, value: int):
self._delegate.s_gape = value

property stop_at_max_best_hits:
"""bwa aln -R <int>"""
""":code:`bwa aln -R <int>`"""
def __get__(self):
return self._delegate.max_top2
def __set__(self, value: int):
Expand All @@ -121,7 +121,7 @@ cdef class BwaAlnOptions:
self._max_hits = value

property log_scaled_gap_penalty:
"""bwa aln -L"""
""":code:`bwa aln -L`"""
def __get__(self):
return self._delegate.mode & BWA_MODE_LOGGAP > 0
def __set__(self, value: int):
Expand All @@ -132,7 +132,7 @@ cdef class BwaAlnOptions:


cdef class BwaAln:
"""The class to align reads with `bwa aln`."""
"""The class to align reads with :code:`bwa aln`."""

cdef BwaIndex _index

Expand Down
6 changes: 5 additions & 1 deletion pybwa/libbwaindex.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ cdef bytes force_bytes_with(object s, encoding: str | None = None, errors: str |


cdef class BwaIndex:
"""Contains the index and nucleotide sequence for Bwa.
"""Contains the index and nucleotide sequence for Bwa. Use :code:`bwa index` on the command
line to generate the bwa index.
Note: the accompanying sequence dictionary must exist (i.e. `.dict` file, which can be generated
with :code:`samtools dict <fasta>`).
Args:
prefix (str | Path): the path prefix for teh BWA index
Expand Down
Loading

0 comments on commit 5bd7844

Please sign in to comment.