Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
See what's new at GitLab
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
O
OptiMap
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Akdel
OptiMap
Commits
106e7715
Commit
106e7715
authored
Nov 26, 2018
by
Akdel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
34cee7f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
14 deletions
+16
-14
OptiMap/pairwise.py
OptiMap/pairwise.py
+16
-14
No files found.
OptiMap/pairwise.py
View file @
106e7715
...
...
@@ -29,7 +29,14 @@ def section_vs_section(section1, section2, fft_molecules, fft_rev_molecules, max
print
(
i
)
subject_molecules
=
fft_molecules
[
i
:
i
+
width
]
rev_subject_molecules
=
fft_rev_molecules
[
i
:
i
+
width
]
multiple_top_corrs
=
get_multiple_products
(
subject_molecules
,
rev_subject_molecules
,
db_molecules
)
multiple_corr_maxes
=
np
.
zeros
((
subject_molecules
.
shape
[
0
],
db_molecules
.
shape
[
0
]),
dtype
=
float
)
fft_products1
=
np
.
zeros
((
db_molecules
.
shape
[
0
],
db_molecules
.
shape
[
1
]),
dtype
=
complex
)
fft_products2
=
np
.
zeros
((
db_molecules
.
shape
[
0
],
db_molecules
.
shape
[
1
]),
dtype
=
complex
)
corr_maxes
=
np
.
zeros
(
fft_molecules
.
shape
[
0
])
multiple_top_corrs
=
get_multiple_products
(
subject_molecules
,
rev_subject_molecules
,
db_molecules
,
multiple_corr_maxes
,
fft_products1
,
fft_products2
,
corr_maxes
)
mol_range
=
np
.
arange
(
i
,
i
+
width
)
normalized_top_corrs
=
np
.
zeros
(
multiple_top_corrs
.
shape
)
numba_normalize_molecule_correlation_array
(
multiple_top_corrs
,
maxes
,
section2
,
mol_range
,
normalized_top_corrs
)
...
...
@@ -50,21 +57,16 @@ def create_and_link_paired_matrices(period, fft_molecules, fft_rev_molecules, ma
return
merge_and_extend_pairs
(
pair_sets
,
depth
=
depth
)
# @nb.jit
def
get_multiple_products
(
fft_subject_molecules
,
fft_subject_rev_molecules
,
fft_molecules
):
multiple_corr_maxes
=
np
.
zeros
((
fft_subject_molecules
.
shape
[
0
],
fft_molecules
.
shape
[
0
]),
dtype
=
float
)
# fft_products = np.zeros((2,fft_molecules.shape[0],fft_molecules.shape[1]), dtype=complex)
fft_products1
=
np
.
zeros
((
fft_molecules
.
shape
[
0
],
fft_molecules
.
shape
[
1
]),
dtype
=
complex
)
fft_products2
=
np
.
zeros
((
fft_molecules
.
shape
[
0
],
fft_molecules
.
shape
[
1
]),
dtype
=
complex
)
# corr_products = np.zeros((2,fft_molecules.shape[0],fft_molecules.shape[1]), dtype=float)
corr_maxes
=
np
.
zeros
(
fft_molecules
.
shape
[
0
])
@
nb
.
jit
def
get_multiple_products
(
fft_subject_molecules
,
fft_subject_rev_molecules
,
fft_molecules
,
multiple_corr_maxes
,
fft_products1
,
fft_products2
,
corr_maxes
):
# multiple_corr_maxes = np.zeros((fft_subject_molecules.shape[0], fft_molecules.shape[0]), dtype=float)
# fft_products1 = np.zeros((fft_molecules.shape[0],fft_molecules.shape[1]), dtype=complex)
# fft_products2 = np.zeros((fft_molecules.shape[0],fft_molecules.shape[1]), dtype=complex)
# corr_maxes = np.zeros(fft_molecules.shape[0])
for
i
in
range
(
fft_subject_molecules
.
shape
[
0
]):
print
(
"running numba_get_products"
)
#
print("running numba_get_products")
numba_get_products
(
fft_subject_molecules
[
i
],
fft_subject_rev_molecules
[
i
],
fft_molecules
,
fft_products1
,
fft_products2
)
# print("running ifft")
# corr_products[0] = np.fft.ifft(fft_products[0]).real
# corr_products[1] = np.fft.ifft(fft_products[1]).real
print
(
"running get_corr_maxes and ifft"
)
# print("running get_corr_maxes and ifft")
numba_get_corr_maxes
(
np
.
fft
.
ifft
(
fft_products1
).
real
,
np
.
fft
.
ifft
(
fft_products2
).
real
,
corr_maxes
)
multiple_corr_maxes
[
i
,:]
=
corr_maxes
return
multiple_corr_maxes
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment