Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
IndexKmerToRead
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vandamme Léa
IndexKmerToRead
Commits
bf440c2b
Commit
bf440c2b
authored
3 years ago
by
Vandamme Léa
Browse files
Options
Downloads
Patches
Plain Diff
add memory usage for 1 kmer
parent
95232450
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
sources/Results.md
+10
-0
10 additions, 0 deletions
sources/Results.md
sources/index.cpp
+3
-1
3 additions, 1 deletion
sources/index.cpp
sources/main.cpp
+3
-1
3 additions, 1 deletion
sources/main.cpp
with
16 additions
and
2 deletions
sources/Results.md
0 → 100644
+
10
−
0
View file @
bf440c2b
# Results
## Indexing with k-mers of size 15
### Using phage_5kb_10percent.fa
| | Time | Resource usage | Resource usage (1 k-mer) |
|--- |:-: |:-: |:-: |
| Naive version | 4 seconds | 842 Mo | 0.17 Ko |
| Robin Hood Hashtable
<br/>
& K_mer uint64_t | FACE WITH TEARS OF JOY |
```😂```
|
```😂```
|
| Delta encoding ||||
\ No newline at end of file
This diff is collapsed.
Click to expand it.
sources/index.cpp
+
3
−
1
View file @
bf440c2b
...
...
@@ -43,6 +43,7 @@ void Index::index_fasta(const string& read_file, int k){
umap
hmap
;
uint32_t
num_read
=
0
;
uint32_t
num_kmers
=
0
;
ifstream
fichier
(
read_file
,
ios
::
in
);
if
(
fichier
)
{
...
...
@@ -51,6 +52,7 @@ void Index::index_fasta(const string& read_file, int k){
getline
(
fichier
,
ligne
);
if
(
ligne
[
0
]
!=
'>'
&&
!
ligne
.
empty
()){
// ONLY GET SEQUENCES
for
(
long
unsigned
int
i
=
0
;
i
<=
ligne
.
length
()
-
k
;
i
++
){
num_kmers
++
;
string
kmer
=
ligne
.
substr
(
i
,
k
);
hmap
[
kmer
].
push_back
(
num_read
);
// CHECK IF THE KMER IS ALREADY IN THE HASHMAP AND INSERT
}
...
...
@@ -62,7 +64,7 @@ void Index::index_fasta(const string& read_file, int k){
else
{
cerr
<<
"Error opening the file."
<<
endl
;
}
set_nb_kmers
(
num_
read
);
set_nb_kmers
(
num_
kmers
);
set_index
(
hmap
);
}
...
...
This diff is collapsed.
Click to expand it.
sources/main.cpp
+
3
−
1
View file @
bf440c2b
...
...
@@ -84,7 +84,9 @@ int main(int argc, char *argv[])
}
}
cout
<<
"Resource usage : "
<<
to_string
(
getMemorySelfMaxUsed
())
<<
"Ko"
<<
endl
;
uint64_t
memory_used
=
getMemorySelfMaxUsed
();
cout
<<
"Resource usage : "
<<
memory_used
<<
"Ko"
<<
endl
;
cout
<<
"Resource usage (for 1 k-mer) : "
<<
(
double
)
memory_used
/
index
.
get_nb_kmers
()
<<
"Ko"
<<
endl
;
}
return
0
;
}
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