-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed to the new documentation and changed some stuff around to mak…
…e it look nicer
- Loading branch information
1 parent
1621736
commit 2d1d9b9
Showing
4 changed files
with
166 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from Bio import Align | ||
|
||
def align_sequence(): | ||
aligner = Align.PairwiseAligner(mode='global', match_score=2, mismatch_score=-1) | ||
alignments = aligner.align("GTACACACTC", "ATACAATATAT") | ||
alignment = alignments[0] | ||
matches = alignment.counts().identities | ||
mismatches = alignment.counts().mismatches | ||
gaps = alignment.counts().gaps | ||
print(alignment) | ||
print(matches) | ||
print(mismatches) | ||
print(gaps) | ||
|
||
''' | ||
aligner2 = Align.PairwiseAligner() | ||
aligner2.match_score = 0 | ||
aligner2.mismatch_score = 1 | ||
aligner2.gap_score = 0 | ||
alignments = aligner2.align("GTACACACTC", "ATACAATATAT") | ||
alignment = alignments[0] | ||
print(alignment) | ||
print(alignment.score) | ||
''' | ||
|
||
|
||
if __name__ == "__main__": | ||
align_sequence() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import timeit | ||
|
||
if __name__ == "__main__": | ||
|
||
my_list = [45, 23, 18, 23, 8, 39, 23, 29, 2, 11, 78, 7, | ||
82, 33, 18, 28, 5, 54, 21, 61, 893, 20, 3] | ||
print(my_list) | ||
|
||
start = timeit.default_timer() | ||
|
||
for i in range(len(my_list)): | ||
j = i+1 | ||
while j < len(my_list): | ||
if (my_list[i] - my_list[j]) < 8 and (my_list[i] - my_list[j]) > -8: | ||
print(my_list[j], j) | ||
my_list.remove(my_list[j]) | ||
j -= 1 | ||
j += 1 | ||
|
||
stop = timeit.default_timer() | ||
|
||
print('Time: ', stop - start) | ||
|
||
print(my_list) | ||
|
||
my_list = [20, 12, 43, 6, 78, 30, 14, 23, 9, 30, 29, 10, 40, 62, 73, 4, 2, 35, 14, 22, 0, 10, 21, 80, 90, | ||
79, 54, 2, 34, 26, 56, 87, 3, 20, 65, 34, 1, 98, 75, 57, 45, 23, 18, 23, 8, 39, 23, 29, 2, 11, 78, 7, | ||
82, 33, 18, 28, 5, 54, 21, 61] | ||
print(my_list) | ||
|
||
''' | ||
start = timeit.default_timer() | ||
for i in range(len(my_list)): | ||
j = i+1 | ||
while j < len(my_list): | ||
if (my_list[i] - my_list[j]) < 8 and (my_list[i] - my_list[j]) > -8: | ||
my_list[j] = | ||
j += 1 | ||
''' | ||
|