Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BIOINF588
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Analyze
Contributor 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
Etienne MORICE
BIOINF588
Commits
d01c71cf
Commit
d01c71cf
authored
6 years ago
by
Ariane Delrocq
Browse files
Options
Downloads
Patches
Plain Diff
Start testing multiple alignment function, uncompleted
parent
5badb668
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
alignementseq_tests.py
+36
-0
36 additions, 0 deletions
alignementseq_tests.py
with
36 additions
and
0 deletions
alignementseq_tests.py
+
36
−
0
View file @
d01c71cf
...
...
@@ -54,6 +54,17 @@ class AlignmentSeqTestCase(unittest.TestCase):
seq2
=
next
(
records
)
yield
seq1
,
seq2
,
filename
def
get_dataset_records
(
self
):
"""
Generator function to iterate over the record generator of each
unaligned fasta file.
"""
dataset_dir
=
os
.
path
.
join
(
self
.
balibase_path
,
"
RV11.unaligned
"
)
for
filename
in
os
.
listdir
(
dataset_dir
):
records
=
Bio
.
SeqIO
.
parse
(
os
.
path
.
join
(
dataset_dir
,
filename
),
"
fasta
"
)
yield
records
,
filename
def
assertSameResidues
(
self
,
str1
,
str2
):
"""
Strip strings of their
'
-
'
before comparing them
"""
...
...
@@ -167,6 +178,31 @@ class AlignmentSeqTestCase(unittest.TestCase):
print
(
ex_r2
)
raise
# =============================================================================
# def test_multiple_align(self):
# """Tests the multiple_align function (using blosum and gap extension)."""
# #from alignementseq import multiple_align
# from Bio.Align.Applications import ClustalwCommandline
# from Bio import AlignIO
# import pip
#
# if not os.path.isfile("clustalo.py"):
# print("Fetching clustalo.py from Github...")
# urllib.request.urlretrieve(
# "https://raw.githubusercontent.com/ebi-wp/webservice-clients/master/python/clustalo.py",
# "clustalo.py")
# pip.main(["install --upgrade", "xmltramp2"])
# #pip("install --upgrade xmltramp2")
# print("Done")
# import clustalo
# # How to use: python clustalo.py --email <your@email.com> --sequence sp:wap_rat,sp:wap_mouse,sp:wap_pig
#
# for records, filename in self.get_dataset_records():
# clustalo("ariane.delrocq@polytechnique.edu", *list(records))
#
# print("Fine", filename)
# =============================================================================
class
PerformanceTestCase
(
AlignmentSeqTestCase
):
"""
Performance tests, slow.
...
...
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