Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #97

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/bx/_seqmapping.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ cdef class IntToIntMapping:
return copy

def expand( self, int x ):
"""Grow the alphabet by making 'a' a seperate symbol. If it already mapped to a single symbol, do nothing"""
"""Grow the alphabet by making 'a' a separate symbol. If it already mapped to a single symbol, do nothing"""
cdef int i, count, a, b
cdef IntToIntMapping copy
# Get the symbol x maps to
Expand Down
4 changes: 2 additions & 2 deletions lib/bx/align/_epo.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ cpdef numpy.ndarray[numpy.uint64_t, ndim=2] bed_union( numpy.ndarray[numpy.uint6

#@cython.wraparound(False)
#@cython.boundscheck(False)
cpdef numpy.ndarray[numpy.int64_t, ndim=2] cummulative_intervals(numpy.ndarray[numpy.int64_t, ndim=1] S,
cpdef numpy.ndarray[numpy.int64_t, ndim=2] cumulative_intervals(numpy.ndarray[numpy.int64_t, ndim=1] S,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this breaks the library API, is it worth? Should we provide an alias?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is your choice. I can keep the misspelling, or add an alias.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I'd vote for fixing the typo and adding an alias for backward compatibility.

numpy.ndarray[numpy.int64_t, ndim=1] D ):
"""compute cummulative intervals for this side of an aligmnent. S and D are one side of
"""compute cumulative intervals for this side of an aligmnent. S and D are one side of
the alignment as described in the chain file format"""

cdef int N = S.shape[0]
Expand Down
2 changes: 1 addition & 1 deletion lib/bx/align/epo.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from ._epo import ( # noqa: F401
bed_union,
cummulative_intervals,
cumulative_intervals,
fastLoadChain,
rem_dash,
)
Expand Down
4 changes: 2 additions & 2 deletions lib/bx/align/epo_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from bx.align._epo import (
bed_union,
cummulative_intervals,
cumulative_intervals,
)
from bx.align.epo import (
Chain,
Expand All @@ -26,7 +26,7 @@ def test_ci(self):
S.append(random.randint(10, 50))
D.append(random.randint(10, 50))
D[-1] = 0
C = cummulative_intervals(np.array(S, dtype=np.int64), np.array(D, dtype=np.int64))
C = cumulative_intervals(np.array(S, dtype=np.int64), np.array(D, dtype=np.int64))
for i in range(self.N):
assert C[i, 1] - C[i, 0] == S[i]
for i in range(1, self.N):
Expand Down
4 changes: 2 additions & 2 deletions scripts/bnMapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,14 @@ def loadChains(path):

EPO = epo.Chain._parse_file(path, True)
# convert coordinates w.r.t the forward strand (into slices)
# compute cummulative intervals
# compute cumulative intervals
for i in range(len(EPO)):
ch, S, T, Q = EPO[i]
if ch.tStrand == "-":
ch = ch._replace(tEnd=ch.tSize - ch.tStart, tStart=ch.tSize - ch.tEnd)
if ch.qStrand == "-":
ch = ch._replace(qEnd=ch.qSize - ch.qStart, qStart=ch.qSize - ch.qEnd)
EPO[i] = (ch, epo.cummulative_intervals(S, T), epo.cummulative_intervals(S, Q))
EPO[i] = (ch, epo.cumulative_intervals(S, T), epo.cumulative_intervals(S, Q))
# now each element of epo is (chain_header, target_intervals, query_intervals)
assert all(t[0].tStrand == "+" for t in EPO), "all target strands should be +"
return EPO
Expand Down
2 changes: 1 addition & 1 deletion scripts/maf_tile_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def do_interval(sources, index, out, ref_src, start, end, seq_db, missing_data,
# Store the size of the reference sequence for building fake block
if ref_src_size is None:
ref_src_size = ref.src_size
# Handle the reference component seperately, it has no synteny status
# Handle the reference component separately, it has no synteny status
# but we will try to fill in missing sequence
if ref.start > last_stop:
# Need to fill in some reference sequence
Expand Down
2 changes: 1 addition & 1 deletion scripts/maf_tile_2bit.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def do_interval(sources, index, out, ref_src, start, end, ref_2bit, missing_data
# Store the size of the reference sequence for building fake block
if ref_src_size is None:
ref_src_size = ref.src_size
# Handle the reference component seperately, it has no synteny status
# Handle the reference component separately, it has no synteny status
# but we will try to fill in missing sequence
if ref.start > last_stop:
# Need to fill in some reference sequence
Expand Down
2 changes: 1 addition & 1 deletion scripts/mask_quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
-m, --mask=N: Character to use as mask character
-q, --quality=N: Min quality allowed
-t, --type=N: base_pair or nqs
-l, --list=N: colon seperated list of species,len_file[,qualityfile].
-l, --list=N: colon separated list of species,len_file[,qualityfile].
"""

import fileinput
Expand Down
Loading