Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
PyFastANI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Larralde
PyFastANI
Commits
dc7f482f
Commit
dc7f482f
authored
3 years ago
by
Martin Larralde
Browse files
Options
Downloads
Patches
Plain Diff
Make classes final and prevent direct instantiation of `Mapper`
parent
0f388a0f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyfastani/_fastani.pyx
+6
-0
6 additions, 0 deletions
pyfastani/_fastani.pyx
with
6 additions
and
0 deletions
pyfastani/_fastani.pyx
+
6
−
0
View file @
dc7f482f
...
...
@@ -5,6 +5,7 @@
# --- C imports --------------------------------------------------------------
cimport
cython
cimport
libcpp11.chrono
from
cython.operator
cimport
dereference
,
preincrement
,
postincrement
from
libc.string
cimport
memcpy
...
...
@@ -231,6 +232,7 @@ cdef class _Parameterized:
return
self
.
_param
.
p_value
@cython.final
cdef
class
Sketch
(
_Parameterized
):
"""
An index computing minimizers over the reference genomes.
"""
...
...
@@ -536,6 +538,7 @@ cdef class Sketch(_Parameterized):
return
mapper
@cython.final
cdef
class
Mapper
(
_Parameterized
):
"""
A genome mapper using Murmur3 hashes and k-mers to compute ANI.
"""
...
...
@@ -549,6 +552,9 @@ cdef class Mapper(_Parameterized):
# --- Magic methods ------------------------------------------------------
def
__init__
(
self
,
*
args
,
**
kwargs
):
raise
TypeError
(
"
Mapper cannot be instantiated, use `Sketch.index` instead.
"
)
def
__dealloc__
(
self
):
del
self
.
_sk
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment