Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
petitebete
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pacome Riobe
petitebete
Commits
6ba21993
Commit
6ba21993
authored
1 month ago
by
Clara Moreno
Browse files
Options
Downloads
Patches
Plain Diff
Edit Sequence.py
parent
fc2bab50
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Sequence.py
+18
-0
18 additions, 0 deletions
Sequence.py
with
18 additions
and
0 deletions
Sequence.py
+
18
−
0
View file @
6ba21993
...
...
@@ -24,6 +24,12 @@ class Sequence:
"""
construit la table des suffixes
:return: list, la table des suffixes
exemple :
>>>
genome
=
"
ATTCATGACCAGGTGCTGTCCAGGCTGAATGACCAGGTCGGATTATAGGCTATGACCAGGATGC
"
>>>
genome_obj
=
Sequence
(
genome
)
>>>
genome_obj
.
suffix_array
()
[
27
,
54
,
31
,
7
,
57
,
46
,
21
,
34
,
10
,
44
,
51
,
28
,
4
,
60
,
41
,
0
,
63
,
56
,
20
,
33
,
9
,
3
,
55
,
19
,
32
,
8
,
38
,
49
,
24
,
15
,
26
,
53
,
30
,
6
,
59
,
40
,
62
,
48
,
23
,
14
,
58
,
39
,
47
,
22
,
35
,
11
,
17
,
36
,
12
,
45
,
43
,
50
,
2
,
18
,
37
,
25
,
52
,
29
,
5
,
61
,
13
,
16
,
42
,
1
]
"""
return
sorted
(
range
(
len
(
self
.
sequence
)),
key
=
lambda
i
:
self
.
sequence
[
i
:])
...
...
@@ -32,6 +38,12 @@ class Sequence:
renvoie la liste des kmers ; les kmers chevauchants sont filtrés
:param k: int, la taille des kmers
:return: list, les kmers
exemple :
>>>
query
=
"
ATGACCAATTCATGACCAGGTGCTGTCCAGGCTGAATG
"
>>>
query_obj
=
Sequence
(
query
)
>>>
query_obj
.
kmers
(
11
)
[
0
,
5
,
10
,
15
,
20
,
25
,
27
]
"""
self
.
taille_kmer
=
k
kmers
=
[]
# dict
...
...
@@ -52,6 +64,12 @@ class Sequence:
"""
renvoie la sequencede l
'
objet Sequence
:return: str, la sequence
exemple :
>>>
seq
=
"
ATGACCAATTCATGACCAGGTGCTGTCCAGGCTGAATG
"
>>>
seq_obj
=
Sequence
(
seq
)
>>>
seq_obj
.
get_sequence
()
ATGACCAATTCATGACCAGGTGCTGTCCAGGCTGAATG
"""
return
self
.
sequence
...
...
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