diff --git a/BA5I.py b/BA5I.py
index e4ce6dd..398789f 100644
--- a/BA5I.py
+++ b/BA5I.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# Copyright (C) 2019 Greenweaves Software Limited
#
# This is free software: you can redistribute it and/or modify
@@ -19,10 +21,9 @@
if __name__=='__main__':
from helpers import create_strings
-
+
strings = create_strings('ba5i',ext=1)
- d,s1,t1 = overlap_assignment(strings[0],strings[1])
+ d,s1,t1 = overlap_assignment(strings[0],strings[1])
print ('{0}'.format(d))
print (s1)
- print (t1)
-
\ No newline at end of file
+ print (t1)
diff --git a/BA5J.py b/BA5J.py
index bea4ff4..415e39d 100644
--- a/BA5J.py
+++ b/BA5J.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# Copyright (C) 2019 Greenweaves Software Limited
#
# This is free software: you can redistribute it and/or modify
@@ -22,14 +24,14 @@ def ba5j(s,t):
return score,''.join(s1),''.join(t1)
if __name__=='__main__':
- from helpers import create_strings
+ from helpers import create_strings
strings = create_strings('ba5j',ext=7)
score,s,t=ba5j(strings[0],strings[1])
print (score)
print (s)
- print (t)
+ print (t)
with open('ba5j.txt','w') as o:
o.write('{0}\n'.format(score))
o.write('{0}\n'.format(s))
- o.write('{0}\n'.format(t))
\ No newline at end of file
+ o.write('{0}\n'.format(t))
diff --git a/BA5K.py b/BA5K.py
index f64effc..ab216e3 100644
--- a/BA5K.py
+++ b/BA5K.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# Copyright (C) 2019-2020 Greenweaves Software Limited
#
# This is free software: you can redistribute it and/or modify
@@ -28,26 +30,26 @@
parser.add_argument('--extra', default=False, action='store_true', help='process extra dataset')
parser.add_argument('--rosalind', default=False, action='store_true', help='process Rosalind dataset')
args = parser.parse_args()
-
+
if args.sample:
print (FindMiddleEdge('PLEASANTLY','MEASNLY'))
# (4, 3) (5, 4)
-
- if args.extra:
+
+ if args.extra:
Input,Expected = read_strings(f'data/middle_edge.txt',init=0)
((i,j),(k,l)) = FindMiddleEdge(Input[0],Input[1])
print (f'Calculated: (({i},{j}),({k},{l}))')
print (f'Expected {Expected[0]}')
# Expect (512,510)(513,511)
-
+
if args.rosalind:
Input = read_strings(f'data/rosalind_{os.path.basename(__file__).split(".")[0]}.txt')
((i,j),(k,l)) = FindMiddleEdge(Input[0],Input[1])
print (f'({i},{j}) ({k},{l})')
with open(f'{os.path.basename(__file__).split(".")[0]}.txt','w') as f:
f.write(f'({i},{j}) ({k},{l})\n')
-
+
elapsed = time.time() - start
minutes = int(elapsed/60)
seconds = elapsed - 60*minutes
- print (f'Elapsed Time {minutes} m {seconds:.2f} s')
+ print (f'Elapsed Time {minutes} m {seconds:.2f} s')
diff --git a/BA5L.py b/BA5L.py
index de5a7c0..8093686 100644
--- a/BA5L.py
+++ b/BA5L.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# Copyright (C) 2019-2020 Greenweaves Software Limited
#
# This is free software: you can redistribute it and/or modify
@@ -34,13 +36,13 @@
def alignUsingLinearSpace(v,w,
replace_score = substitution_matrices.load("BLOSUM62"),
indel_cost = 5):
-
+
def isRightOrDownRight(midEdge):
return midEdge==RIGHT or midEdge==DOWNRIGHT
-
+
def isDownOrDownRight(midEdge):
return midEdge==DOWN or midEdge==DOWNRIGHT
-
+
# MiddleNodeAndEdge
#
# An adapter which replaces MiddleNode and MiddleEdge in the pseudocode, and calls FindMiddleEdge
@@ -48,7 +50,7 @@ def MiddleNodeAndEdge(top, bottom, left, right):
((i1,j1),(i2,j2)) = FindMiddleEdge(v[top:bottom],w[left:right],replace_score=replace_score,indel_cost=indel_cost)
direction = RIGHT if i1==i2 else DOWN if j1==j2 else DOWNRIGHT
return j1,direction
-
+
# LinearSpaceAlignment
#
# Find longest path between a substring of v[top] v[bottom-1]
@@ -58,7 +60,7 @@ def MiddleNodeAndEdge(top, bottom, left, right):
# bottom
# left
# right
-
+
def LinearSpaceAlignment(top, bottom, left, right):
if left==right:
return indel_cost*(bottom - top)
@@ -66,21 +68,21 @@ def LinearSpaceAlignment(top, bottom, left, right):
return indel_cost*(right-left)
middle = (left + right)//2
midNode,midEdge = MiddleNodeAndEdge(top, bottom, left, right)
-
+
LinearSpaceAlignment(top, midNode, left, middle)
# output midEdge
if isRightOrDownRight(midEdge):
middle += 1
if isDownOrDownRight(midEdge):
midNode+= 1
- LinearSpaceAlignment(midNode, bottom, middle, right)
-
+ LinearSpaceAlignment(midNode, bottom, middle, right)
+
RIGHT = 0
DOWN = 1
DOWNRIGHT = 2
LinearSpaceAlignment(0,len(v)+1,0,len(w)+1)
-
-
+
+
if __name__=='__main__':
start = time.time()
parser = argparse.ArgumentParser('BA5L.py Align Two Strings Using Linear Space')
@@ -90,20 +92,20 @@ def LinearSpaceAlignment(top, bottom, left, right):
args = parser.parse_args()
if args.sample:
print (alignUsingLinearSpace('PLEASANTLY','MEANLY'))
-
+
if args.extra:
Input,Expected = read_strings(f'data/linear_space_alignment.txt',init=0)
print (alignUsingLinearSpace(Input[0],Input[1]))
-
+
if args.rosalind:
Input = read_strings(f'data/rosalind_{os.path.basename(__file__).split(".")[0]}.txt')
-
+
Result = None
print (Result)
with open(f'{os.path.basename(__file__).split(".")[0]}.txt','w') as f:
for line in Result:
f.write(f'{line}\n')
-
+
elapsed = time.time() - start
minutes = int(elapsed/60)
- seconds = elapsed - 60*minutes
+ seconds = elapsed - 60*minutes
diff --git a/BA5M.py b/BA5M.py
index 843084a..27ff1b1 100644
--- a/BA5M.py
+++ b/BA5M.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# Copyright (C) 2019 Greenweaves Software Limited
#
# This is free software: you can redistribute it and/or modify
@@ -13,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with GNU Emacs. If not, see
-# BA5M.py Find a Highest-Scoring Multiple Sequence Alignment
+# BA5M.py Find a Highest-Scoring Multiple Sequence Alignment
from align import FindHighestScoringMultipleSequenceAlignment
@@ -21,25 +23,24 @@
if __name__=='__main__':
- from helpers import create_strings
+ from helpers import create_strings
s,u,v,w = FindHighestScoringMultipleSequenceAlignment('ATATCCG','TCCGA','ATGTACTG')
print (s)
print (u)
print (v)
print (w)
-
+
s1,u1,v1,w1 = FindHighestScoringMultipleSequenceAlignment('TGTTTAAAAATGTCCGCAACCATTTC',
'GATATAAAACAGGGATAACTGCAATGG',
'CCTGCTACTTTATGCCGTCTCCATATGCG')
print (s1)
print (u1)
print (v1)
- print (w1)
-
+ print (w1)
+
ss=create_strings(ext=3)
s2,u2,v2,w2 = FindHighestScoringMultipleSequenceAlignment(ss[0],ss[1],ss[2])
print (s2)
print (u2)
print (v2)
- print (w2)
-
\ No newline at end of file
+ print (w2)
diff --git a/BA6A.py b/BA6A.py
index f16960c..0aa243e 100644
--- a/BA6A.py
+++ b/BA6A.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# Copyright (C) 2019-2021 Greenweaves Software Limited
#
# This is free software: you can redistribute it and/or modify
@@ -43,8 +45,8 @@ def f(p):
for permutation in GreedySorting(get_permutation(Input[0]),signed=True):
print (format(permutation))
f.write(f'{format(permutation)}\n')
-
+
elapsed = time.time() - start
minutes = int(elapsed/60)
seconds = elapsed - 60*minutes
- print (f'Elapsed Time {minutes} m {seconds:.2f} s')
\ No newline at end of file
+ print (f'Elapsed Time {minutes} m {seconds:.2f} s')
diff --git a/BA6B.py b/BA6B.py
index 5b150a6..aeb4703 100644
--- a/BA6B.py
+++ b/BA6B.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# Copyright (C) 2019-2021 Greenweaves Software Limited
#
# This is free software: you can redistribute it and/or modify
@@ -13,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
#
-# BA6B Compute the Number of Breakpoints in a Permutation
+# BA6B Compute the Number of Breakpoints in a Permutation
import argparse
import os
@@ -29,15 +31,15 @@
parser.add_argument('--sample', default=False, action='store_true', help='process sample dataset')
parser.add_argument('--rosalind', default=False, action='store_true', help='process Rosalind dataset')
args = parser.parse_args()
- if args.sample:
+ if args.sample:
print (getBreakPoints([+3, +4, +5, -12, -8, -7, -6, +1, +2, +10, +9, -11, +13, +14]))
-
+
if args.rosalind:
Input = read_strings(f'data/rosalind_{os.path.basename(__file__).split(".")[0]}.txt')
Result = getBreakPoints(get_permutation(Input[0]))
print (Result)
-
+
elapsed = time.time() - start
minutes = int(elapsed/60)
seconds = elapsed - 60*minutes
- print (f'Elapsed Time {minutes} m {seconds:.2f} s')
\ No newline at end of file
+ print (f'Elapsed Time {minutes} m {seconds:.2f} s')
diff --git a/BA6C.py b/BA6C.py
index 41e6055..105a753 100644
--- a/BA6C.py
+++ b/BA6C.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# Copyright (C) 2019-2021 Greenweaves Software Limited
#
# This is free software: you can redistribute it and/or modify
@@ -35,9 +37,9 @@ def parse_permutations(text):
depth -= 1
i1 = i
Permutations.append([int(j) for j in text[i0+1:i1-1].split()])
-
+
return Permutations
-
+
if __name__=='__main__':
start = time.time()
@@ -48,7 +50,7 @@ def parse_permutations(text):
if args.sample:
print (d2break([[+1, +2, +3, +4, +5, +6]],
[[+1, -3, -6, -5],[+2, -4]]))
-
+
if args.rosalind:
Input = read_strings(f'data/rosalind_{os.path.basename(__file__).split(".")[0]}.txt')
Perms = [parse_permutations(i) for i in Input]
@@ -57,5 +59,5 @@ def parse_permutations(text):
elapsed = time.time() - start
minutes = int(elapsed/60)
seconds = elapsed - 60*minutes
- print (f'Elapsed Time {minutes} m {seconds:.2f} s')
-
+ print (f'Elapsed Time {minutes} m {seconds:.2f} s')
+
diff --git a/BA6D.py b/BA6D.py
index 98fc68b..d516188 100644
--- a/BA6D.py
+++ b/BA6D.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# Copyright (C) 2019-2021 Greenweaves Software Limited
# This is free software: you can redistribute it and/or modify
@@ -13,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
-# BA6D Find a Shortest Transformation of One Genome into Another by 2-Breaks
+# BA6D Find a Shortest Transformation of One Genome into Another by 2-Breaks
import argparse
import os
@@ -39,7 +41,7 @@ def get2_breaks(Configuration):
i1,j1 = Configuration[l]
result.append((i0,j0,i1,j1))
return result
-
+
def FindShortestTransformationCycles(s,t):
assert sorted(s)== sorted(t)
ColouredS = ColouredEdges(s)
@@ -61,7 +63,7 @@ def FindShortestTransformationCycles(s,t):
Config,score,path = leader_board[0]
if score==0:
return path,Blacks
-
+
return FindShortestTransformationCycles(ChromosomeToCycle(s),ChromosomeToCycle(t))
def CycleToChromosome1(Blacks,Coloured):
@@ -89,7 +91,7 @@ def CycleToChromosome1(Blacks,Coloured):
#print (len(paths))
for Coloured in paths:
#print (Coloured)
- print (CycleToChromosome1(Blacks,Coloured))
+ print (CycleToChromosome1(Blacks,Coloured))
@@ -105,5 +107,4 @@ def CycleToChromosome1(Blacks,Coloured):
elapsed = time.time() - start
minutes = int(elapsed/60)
seconds = elapsed - 60*minutes
- print (f'Elapsed Time {minutes} m {seconds:.2f} s')
-
\ No newline at end of file
+ print (f'Elapsed Time {minutes} m {seconds:.2f} s')
diff --git a/BA6F.py b/BA6F.py
index fb70a2e..3d6b5f6 100644
--- a/BA6F.py
+++ b/BA6F.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# Copyright (C) 2019 Greenweaves Software Limited
#
# This is free software: you can redistribute it and/or modify
@@ -18,4 +20,4 @@
from fragile import ChromosomeToCycle
if __name__=='__main__':
- print (ChromosomeToCycle([-1, -2, -3, -4, +5, -6, +7, +8, +9, -10, -11, +12, -13, +14, -15, +16, +17, -18, -19, -20, -21, -22, +23, +24, -25, +26, -27, -28, -29, -30, -31, -32, -33, +34, +35, +36, -37, +38, +39, -40, +41, -42, -43, +44, +45, +46, -47, +48, -49, -50, +51, +52, -53, +54, +55, +56, -57, +58, -59, -60, -61, -62, +63, +64, +65, +66, +67, +68]))
\ No newline at end of file
+ print (ChromosomeToCycle([-1, -2, -3, -4, +5, -6, +7, +8, +9, -10, -11, +12, -13, +14, -15, +16, +17, -18, -19, -20, -21, -22, +23, +24, -25, +26, -27, -28, -29, -30, -31, -32, -33, +34, +35, +36, -37, +38, +39, -40, +41, -42, -43, +44, +45, +46, -47, +48, -49, -50, +51, +52, -53, +54, +55, +56, -57, +58, -59, -60, -61, -62, +63, +64, +65, +66, +67, +68]))
diff --git a/BA6G.py b/BA6G.py
index 094503c..d31d51f 100644
--- a/BA6G.py
+++ b/BA6G.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# Copyright (C) 2019 Greenweaves Software Limited
#
# This is free software: you can redistribute it and/or modify
@@ -13,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with GNU Emacs. If not, see
-# BA6G Implement Cycle to Chromosome
+# BA6G Implement Cycle to Chromosome
from fragile import CycleToChromosome,ChromosomeToCycle
@@ -23,11 +25,11 @@ def disp(i):
return str(i) if i < 0 else '+' + str(i)
cycle = [1, 2, 4, 3, 5, 6, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15, 17, 18, 19, 20, 22, 21, 23, 24, 25, 26, 28, 27, 30, 29, 32, 31, 33, 34, 36, 35, 37, 38, 39, 40, 42, 41, 44, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 55, 57, 58, 59, 60, 62, 61, 64, 63, 65, 66, 68, 67, 69, 70, 72, 71, 73, 74, 76, 75, 77, 78, 79, 80, 82, 81, 83, 84, 85, 86, 88, 87, 89, 90, 92, 91, 93, 94, 95, 96, 98, 97, 100, 99, 102, 101, 103, 104, 106, 105, 108, 107, 109, 110, 112, 111, 114, 113, 116, 115, 117, 118, 120, 119, 121, 122, 123, 124, 126, 125, 128, 127, 129, 130, 131, 132, 134, 133, 135, 136, 138, 137, 140, 139]
Chromosome =CycleToChromosome(cycle)
-
+
# Test - invert transformation and compare
cycle1 = ChromosomeToCycle(Chromosome)
for i in range(max(len(cycle),len(cycle1))):
if cycle[i] != cycle1[i]:
print (i, cycle[i],cycle1[i])
digits = ' '.join(disp(c) for c in Chromosome)
- print ('(' + digits + ')')
\ No newline at end of file
+ print ('(' + digits + ')')
diff --git a/BA6H.py b/BA6H.py
index f496400..dde6c3b 100644
--- a/BA6H.py
+++ b/BA6H.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# Copyright (C) 2019 Greenweaves Software Limited
#
# This is free software: you can redistribute it and/or modify
@@ -18,4 +20,4 @@
from fragile import ColouredEdges
if __name__=='__main__':
- print (ColouredEdges([[-1, +2, -3, -4, +5, +6, +7, -8, +9, +10, +11, -12, +13, -14, +15, +16, +17, -18, +19, +20, -21, +22, +23, +24, -25, +26, +27, -28, -29, -30, -31],[+32, +33, -34, -35, -36, +37, -38, +39, +40, -41, -42, +43, -44, +45, -46, -47, +48, -49, +50, +51, +52, +53, +54],[-55, +56, -57, -58, +59, -60, -61, +62, +63, +64, -65, -66, -67, +68, -69, +70, +71, +72, +73, -74, +75, +76, -77],[+78, -79, +80, +81, +82, +83, -84, -85, +86, +87, -88, -89, +90, +91, -92, +93, -94, -95, +96, +97, -98, +99, +100, -101, +102],[+103, -104, +105, -106, -107, +108, +109, +110, -111, -112, +113, +114, +115, +116, +117, +118, -119, -120, -121, +122, -123, +124, -125, -126, -127],[-128, -129, -130, -131, +132, -133, +134, +135, +136, +137, +138, -139, -140, -141, +142, +143, +144, +145, -146, -147, +148, +149, -150, -151], [+152, +153, +154, +155, +156, -157, -158, +159, -160, -161, -162, +163, +164, -165, +166, +167, +168, -169, +170, -171, +172, -173, +174, +175, +176, -177, +178, -179, +180],[-181, -182, +183, +184, +185, +186, +187, +188, +189, +190, +191, +192, +193, -194, +195, -196, -197, -198, -199, +200, +201, -202, +203, -204, -205, -206, +207, +208, -209]]))
\ No newline at end of file
+ print (ColouredEdges([[-1, +2, -3, -4, +5, +6, +7, -8, +9, +10, +11, -12, +13, -14, +15, +16, +17, -18, +19, +20, -21, +22, +23, +24, -25, +26, +27, -28, -29, -30, -31],[+32, +33, -34, -35, -36, +37, -38, +39, +40, -41, -42, +43, -44, +45, -46, -47, +48, -49, +50, +51, +52, +53, +54],[-55, +56, -57, -58, +59, -60, -61, +62, +63, +64, -65, -66, -67, +68, -69, +70, +71, +72, +73, -74, +75, +76, -77],[+78, -79, +80, +81, +82, +83, -84, -85, +86, +87, -88, -89, +90, +91, -92, +93, -94, -95, +96, +97, -98, +99, +100, -101, +102],[+103, -104, +105, -106, -107, +108, +109, +110, -111, -112, +113, +114, +115, +116, +117, +118, -119, -120, -121, +122, -123, +124, -125, -126, -127],[-128, -129, -130, -131, +132, -133, +134, +135, +136, +137, +138, -139, -140, -141, +142, +143, +144, +145, -146, -147, +148, +149, -150, -151], [+152, +153, +154, +155, +156, -157, -158, +159, -160, -161, -162, +163, +164, -165, +166, +167, +168, -169, +170, -171, +172, -173, +174, +175, +176, -177, +178, -179, +180],[-181, -182, +183, +184, +185, +186, +187, +188, +189, +190, +191, +192, +193, -194, +195, -196, -197, -198, -199, +200, +201, -202, +203, -204, -205, -206, +207, +208, -209]]))
diff --git a/BA6I.py b/BA6I.py
index c3e70b4..2e7b2f4 100644
--- a/BA6I.py
+++ b/BA6I.py
@@ -1,3 +1,6 @@
+#!/usr/bin/env python
+
+
# Copyright (C) 2019 Greenweaves Software Limited
#
# This is free software: you can redistribute it and/or modify
@@ -21,19 +24,19 @@
if __name__=='__main__':
#print (GraphToGenome([
#(2, 4), (3, 6), (5, 1), (7, 9), (10, 12), (11, 8)
-
+
#]))
-
-
+
+
print (
GraphToGenome([
(1, 3), (4, 5), (6, 8), (7, 9), (10, 12), (11, 14), (13, 15), (16, 18), (17, 19), (20, 21), (22, 23), (24, 25),
(26, 28), (27, 30), (29, 31), (32, 34), (33, 36), (35, 38), (37, 39), (40, 41), (42, 44), (43, 45), (46, 47),
- (48, 50), (49, 52), (51, 53), (54, 55), (56, 2), (57, 60), (59, 62), (61, 63), (64, 65), (66, 68), (67, 70),
+ (48, 50), (49, 52), (51, 53), (54, 55), (56, 2), (57, 60), (59, 62), (61, 63), (64, 65), (66, 68), (67, 70),
(69, 71), (72, 73), (74, 76), (75, 78), (77, 80), (79, 81), (82, 83), (84, 86), (85, 88), (87, 90), (89, 91),
(92, 94), (93, 95), (96, 98), (97, 99), (100, 102), (101, 104), (103, 105), (106, 107), (108, 110), (109, 58),
(112, 114), (113, 115), (116, 118), (117, 119), (120, 121), (122, 123), (124, 126), (125, 128), (127, 130),
- (129, 131), (132, 134), (133, 136), (135, 138), (137, 139), (140, 142), (141, 144), (143, 146), (145, 148),
+ (129, 131), (132, 134), (133, 136), (135, 138), (137, 139), (140, 142), (141, 144), (143, 146), (145, 148),
(147, 149), (150, 151), (152, 154), (153, 155), (156, 158), (157, 160), (159, 162), (161, 163), (164, 165),
(166, 167), (168, 111), (169, 171), (172, 173), (174, 176), (175, 177), (178, 179), (180, 182), (181, 184),
(183, 185), (186, 188), (187, 189), (190, 191), (192, 194), (193, 196), (195, 197), (198, 200), (199, 201),
@@ -42,17 +45,16 @@
(237, 239), (240, 242), (241, 243), (244, 246), (245, 248), (247, 249), (250, 252), (251, 254), (253, 256),
(255, 258), (257, 259), (260, 261), (262, 264), (263, 265), (266, 268), (267, 270), (269, 222), (272, 274),
(273, 275), (276, 278), (277, 280), (279, 281), (282, 284), (283, 286), (285, 287), (288, 290), (289, 292),
- (291, 293), (294, 296), (295, 297), (298, 299), (300, 301), (302, 304), (303, 305), (306, 308), (307, 309),
- (310, 311), (312, 313), (314, 315), (316, 317), (318, 320), (319, 321), (322, 324), (323, 271), (326, 327),
+ (291, 293), (294, 296), (295, 297), (298, 299), (300, 301), (302, 304), (303, 305), (306, 308), (307, 309),
+ (310, 311), (312, 313), (314, 315), (316, 317), (318, 320), (319, 321), (322, 324), (323, 271), (326, 327),
(328, 329), (330, 332), (331, 334), (333, 335), (336, 338), (337, 340), (339, 341), (342, 344), (343, 345),
- (346, 347), (348, 349), (350, 352), (351, 353), (354, 355), (356, 358), (357, 360), (359, 362), (361, 364),
- (363, 325), (365, 368), (367, 369), (370, 372), (371, 373), (374, 376), (375, 378), (377, 380), (379, 381),
- (382, 384), (383, 386), (385, 388), (387, 389), (390, 391), (392, 393), (394, 396), (395, 397), (398, 399),
- (400, 401), (402, 403), (404, 405), (406, 407), (408, 410), (409, 412), (411, 413), (414, 416), (415, 417),
+ (346, 347), (348, 349), (350, 352), (351, 353), (354, 355), (356, 358), (357, 360), (359, 362), (361, 364),
+ (363, 325), (365, 368), (367, 369), (370, 372), (371, 373), (374, 376), (375, 378), (377, 380), (379, 381),
+ (382, 384), (383, 386), (385, 388), (387, 389), (390, 391), (392, 393), (394, 396), (395, 397), (398, 399),
+ (400, 401), (402, 403), (404, 405), (406, 407), (408, 410), (409, 412), (411, 413), (414, 416), (415, 417),
(418, 420), (419, 422), (421, 366), (423, 425), (426, 428), (427, 429), (430, 431), (432, 433), (434, 436),
(435, 438), (437, 440), (439, 441), (442, 443), (444, 446), (445, 447), (448, 450), (449, 451), (452, 454),
- (453, 455), (456, 458), (457, 459), (460, 462), (461, 464), (463, 466), (465, 467), (468, 469), (470, 471),
+ (453, 455), (456, 458), (457, 459), (460, 462), (461, 464), (463, 466), (465, 467), (468, 469), (470, 471),
(472, 473), (474, 476), (475, 478), (477, 479), (480, 482), (481, 424)
- ]))
-
-
\ No newline at end of file
+ ]))
+
diff --git a/BA6J.py b/BA6J.py
index e844d3e..ce94be0 100644
--- a/BA6J.py
+++ b/BA6J.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# Copyright (C) 2019 Greenweaves Software Limited
#
# This is free software: you can redistribute it and/or modify
@@ -22,9 +24,9 @@
#print (get2BreakOnGenomeGraph([(2, 4), (3, 5), (6, 8), (7, 10), (9, 12), (11, 13), (14, 15), (16, 17), (18, 19), (20, 21), (22, 24), (23, 25), (26, 28), (27, 30), (29, 32), (31, 33), (34, 35), (36, 37), (38, 40), (39, 42), (41, 44), (43, 45), (46, 47), (48, 49), (50, 51), (52, 53), (54, 56), (55, 58), (57, 59), (60, 61), (62, 64), (63, 66), (65, 68), (67, 69), (70, 72), (71, 73), (74, 75), (76, 77), (78, 80), (79, 81), (82, 83), (84, 86), (85, 88), (87, 90), (89, 92), (91, 94), (93, 96), (95, 98), (97, 99), (100, 102), (101, 104), (103, 106), (105, 107), (108, 109), (110, 111), (112, 113), (114, 116), (115, 117), (118, 120), (119, 121), (122, 124), (123, 126), (125, 128), (127, 129), (130, 132), (131, 134), (133, 136), (135, 1)],
#87, 90, 74, 75))
print (get2BreakOnGenomeGraph(
- [(2, 3), (4, 6), (5, 8), (7, 10), (9, 11), (12, 14), (13, 15), (16, 18), (17, 20),
- (19, 22), (21, 23), (24, 25), (26, 27), (28, 29), (30, 32), (31, 34), (33, 36), (35, 37), (38, 40), (39, 42), (41, 44),
+ [(2, 3), (4, 6), (5, 8), (7, 10), (9, 11), (12, 14), (13, 15), (16, 18), (17, 20),
+ (19, 22), (21, 23), (24, 25), (26, 27), (28, 29), (30, 32), (31, 34), (33, 36), (35, 37), (38, 40), (39, 42), (41, 44),
(43, 45), (46, 48), (47, 50), (49, 51), (52, 53), (54, 55), (56, 57), (58, 59), (60, 61), (62, 64), (63, 66), (65, 68), (67, 69), (70, 71), (72, 73), (74, 76), (75, 78), (77, 79), (80, 82), (81, 83), (84, 85), (86, 87), (88, 90), (89, 92), (91, 94), (93, 96), (95, 98), (97, 100), (99, 102), (101, 103), (104, 105), (106, 107), (108, 109), (110, 112), (111, 113), (114, 115), (116, 117), (118, 119), (120, 121), (122, 123), (124, 126), (125, 128), (127, 129), (130, 132), (131, 1)
],13, 15, 86, 87
-
- ))
\ No newline at end of file
+
+ ))
diff --git a/BA6K.py b/BA6K.py
index 1fe1100..d051aaf 100644
--- a/BA6K.py
+++ b/BA6K.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# Copyright (C) 2019 Greenweaves Software Limited
#
# This is free software: you can redistribute it and/or modify
@@ -28,11 +30,10 @@ def ff(g):
def f(g):
return '('+ ' '.join([ff(g0) for g0 in g]) + ')'
return ' '.join([f(g) for g in genome])
-
+
print (
format(
perform_2_BreakOnGenome(
[-1, +2, +3, -4, -5, +6, +7, -8, -9, +10, +11, -12, -13, +14, +15, +16, +17, -18, +19, +20, -21, -22, -23, -24, +25, -26, -27, +28, +29, -30, -31, -32, +33, -34, -35, +36, +37, -38, +39, +40, -41, +42, -43, -44, -45, +46, +47, +48, -49, -50, -51, -52, +53, -54, -55, -56, -57, -58, -59, -60, -61, -62, +63, +64, +65, -66, +67],
17, 19, 67, 70
)))
-
\ No newline at end of file