예제 #1
0
 def testWikiAnswerWithMatchOneAsDict(self):
     """
     Test the example given in Wikipedia
     http://en.wikipedia.org/wiki/Smith%E2%80%93Waterman_algorithm
     Wikipedia uses a match score of two, here we use a score of one.
     Get the result as a dict.
     """
     seq1 = Read('seq1', 'ACACACTA')
     seq2 = Read('seq2', 'AGCACACA')
     align = LocalAlignment(seq1, seq2, match=1)
     result = align.createAlignment()
     self.assertEqual(
         {
             'cigar': '5=1D1=',
             'sequence1Start': 2,
             'sequence1End': 8,
             'sequence2Start': 3,
             'sequence2End': 8,
             'text': [
                 'seq1 2 CACACTA 8',
                 '       ||||| |',
                 'seq2 3 CACAC-A 8',
             ]
         },
         result
     )
예제 #2
0
 def testWikiAnswerAsDict(self):
     """
     Test the example given in Wikipedia:
     http://en.wikipedia.org/wiki/Smith%E2%80%93Waterman_algorithm
     with the return result being a dict.
     """
     seq1 = Read('seq1', 'ACACACTA')
     seq2 = Read('seq2', 'AGCACACA')
     align = LocalAlignment(seq1, seq2, match=2)
     result = align.createAlignment()
     self.assertEqual(
         {
             'cigar': '1=1I5=1D1=',
             'sequence1Start': 1,
             'sequence1End': 8,
             'sequence2Start': 1,
             'sequence2End': 8,
             'text': [
                 'seq1 1 A-CACACTA 8',
                 '       | ||||| |',
                 'seq2 1 AGCACAC-A 8',
             ]
         },
         result
     )
예제 #3
0
 def testWikiAnswerAsDict(self):
     """
     Test the example given in Wikipedia:
     http://en.wikipedia.org/wiki/Smith%E2%80%93Waterman_algorithm
     with the return result being a dict.
     """
     seq1 = Read('seq1', 'ACACACTA')
     seq2 = Read('seq2', 'AGCACACA')
     align = LocalAlignment(seq1, seq2, match=2)
     result = align.createAlignment()
     self.assertEqual(
         {
             'cigar':
             '1=1I5=1D1=',
             'sequence1Start':
             1,
             'sequence1End':
             8,
             'sequence2Start':
             1,
             'sequence2End':
             8,
             'text': [
                 'seq1 1 A-CACACTA 8',
                 '       | ||||| |',
                 'seq2 1 AGCACAC-A 8',
             ]
         }, result)
예제 #4
0
 def testWikiAnswerWithMatchOneAsDict(self):
     """
     Test the example given in Wikipedia
     http://en.wikipedia.org/wiki/Smith%E2%80%93Waterman_algorithm
     Wikipedia uses a match score of two, here we use a score of one.
     Get the result as a dict.
     """
     seq1 = Read('seq1', 'ACACACTA')
     seq2 = Read('seq2', 'AGCACACA')
     align = LocalAlignment(seq1, seq2, match=1)
     result = align.createAlignment()
     self.assertEqual(
         {
             'cigar':
             '5=1D1=',
             'sequence1Start':
             2,
             'sequence1End':
             8,
             'sequence2Start':
             3,
             'sequence2End':
             8,
             'text': [
                 'seq1 2 CACACTA 8',
                 '       ||||| |',
                 'seq2 3 CACAC-A 8',
             ]
         }, result)
예제 #5
0
 def testTwoCompletelyDifferentSequences(self):
     """
     When two completely different sequences are given, the result
     should be the two sequences with an empty alignment.
     """
     seq1 = SeqRecord(Seq('aaaaaa'), id='seq1')
     seq2 = SeqRecord(Seq('gggggg'), id='seq2')
     align = LocalAlignment(seq1, seq2)
     result = align.createAlignment()
     alignment = ("\nNo alignment between seq1 and seq2 \n")
     self.assertEqual(result, alignment)
예제 #6
0
 def testTwoCompletelyDifferentSequences(self):
     """
     When two completely different sequences are given, the result
     should be the two sequences with an empty alignment.
     """
     seq1 = Read('seq1', 'aaaaaa')
     seq2 = Read('seq2', 'gggggg')
     align = LocalAlignment(seq1, seq2)
     result = align.createAlignment(resultFormat=str)
     alignment = ('\nNo alignment between seq1 and seq2\n')
     self.assertEqual(result, alignment)
예제 #7
0
 def testTwoCompletelyDifferentSequences(self):
     """
     When two completely different sequences are given, the result
     should be the two sequences with an empty alignment.
     """
     seq1 = SeqRecord(Seq('aaaaaa'), id='seq1')
     seq2 = SeqRecord(Seq('gggggg'), id='seq2')
     align = LocalAlignment(seq1, seq2)
     result = align.createAlignment()
     alignment = ("\nNo alignment between seq1 and seq2 \n")
     self.assertEqual(result, alignment)
예제 #8
0
 def testTwoCompletelyDifferentSequences(self):
     """
     When two completely different sequences are given, the result
     should be the two sequences with an empty alignment.
     """
     seq1 = Read('seq1', 'aaaaaa')
     seq2 = Read('seq2', 'gggggg')
     align = LocalAlignment(seq1, seq2)
     result = align.createAlignment(resultFormat=str)
     alignment = ('\nNo alignment between seq1 and seq2\n')
     self.assertEqual(result, alignment)
예제 #9
0
 def testAlignmentWithGapInMiddle(self):
     seq1 = Read('seq1', 'agtcagtcagtc')
     seq2 = Read('seq2', 'cgaatcg')
     align = LocalAlignment(seq1, seq2)
     result = align.createAlignment(resultFormat=str)
     alignment = ('\nCigar string of aligned region: 2=1D1=\n'
                  'seq1 Match start: 7 Match end: 10\n'
                  'seq2 Match start: 5 Match end: 7\n'
                  'seq1 7 TCAG 10\n'
                  '       || |\n'
                  'seq2 5 TC-G 7')
     self.assertEqual(result, alignment)
예제 #10
0
 def testGapAtBothEndsOfSeq1(self):
     seq1 = Read('seq1', 'gaatc')
     seq2 = Read('seq2', 'cgaatcg')
     align = LocalAlignment(seq1, seq2)
     result = align.createAlignment(resultFormat=str)
     alignment = ('\nCigar string of aligned region: 5=\n'
                  'seq1 Match start: 1 Match end: 5\n'
                  'seq2 Match start: 2 Match end: 6\n'
                  'seq1 1 GAATC 5\n'
                  '       |||||\n'
                  'seq2 2 GAATC 6')
     self.assertEqual(result, alignment)
예제 #11
0
 def testGapAtStartOfSeq2(self):
     seq1 = Read('seq1', 'cgaatcg')
     seq2 = Read('seq2', 'gaatcg')
     align = LocalAlignment(seq1, seq2)
     result = align.createAlignment(resultFormat=str)
     alignment = ('\nCigar string of aligned region: 6=\n'
                  'seq1 Match start: 2 Match end: 7\n'
                  'seq2 Match start: 1 Match end: 6\n'
                  'seq1 2 GAATCG 7\n'
                  '       ||||||\n'
                  'seq2 1 GAATCG 6')
     self.assertEqual(result, alignment)
예제 #12
0
 def testAlignmentWithGapInMiddle(self):
     seq1 = SeqRecord(Seq('agtcagtcagtc'), id='seq1')
     seq2 = SeqRecord(Seq('cgaatcg'), id='seq2')
     align = LocalAlignment(seq1, seq2)
     result = align.createAlignment()
     alignment = ("\nCigar string of aligned region: 2=1D1=\n"
                  "seq1 Match start: 7 Match end: 10\n"
                  "seq2 Match start: 5 Match end: 7\n"
                  "seq1 7 TCAG 10\n"
                  "       || |\n"
                  "seq2 5 TC-G 7")
     self.assertEqual(result, alignment)
예제 #13
0
 def testGapAtStartOfSeq2(self):
     seq1 = SeqRecord(Seq('cgaatcg'), id='seq1')
     seq2 = SeqRecord(Seq('gaatcg'), id='seq2')
     align = LocalAlignment(seq1, seq2)
     result = align.createAlignment()
     alignment = ("\nCigar string of aligned region: 6=\n"
                  "seq1 Match start: 2 Match end: 7\n"
                  "seq2 Match start: 1 Match end: 6\n"
                  "seq1 2 GAATCG 7\n"
                  "       ||||||\n"
                  "seq2 1 GAATCG 6")
     self.assertEqual(result, alignment)
예제 #14
0
 def testGapAtBothEndsOfSeq1(self):
     seq1 = SeqRecord(Seq('gaatc'), id='seq1')
     seq2 = SeqRecord(Seq('cgaatcg'), id='seq2')
     align = LocalAlignment(seq1, seq2)
     result = align.createAlignment()
     alignment = ("\nCigar string of aligned region: 5=\n"
                  "seq1 Match start: 1 Match end: 5\n"
                  "seq2 Match start: 2 Match end: 6\n"
                  "seq1 1 GAATC 5\n"
                  "       |||||\n"
                  "seq2 2 GAATC 6")
     self.assertEqual(result, alignment)
예제 #15
0
 def testAlignmentWithGapInMiddle(self):
     seq1 = SeqRecord(Seq('agtcagtcagtc'), id='seq1')
     seq2 = SeqRecord(Seq('cgaatcg'), id='seq2')
     align = LocalAlignment(seq1, seq2)
     result = align.createAlignment()
     alignment = ("\nCigar string of aligned region: 2=1D1=\n"
                  "seq1 Match start: 7 Match end: 10\n"
                  "seq2 Match start: 5 Match end: 7\n"
                  "seq1 7 TCAG 10\n"
                  "       || |\n"
                  "seq2 5 TC-G 7")
     self.assertEqual(result, alignment)
예제 #16
0
 def testGapAtStartOfSeq2(self):
     seq1 = Read('seq1', 'cgaatcg')
     seq2 = Read('seq2', 'gaatcg')
     align = LocalAlignment(seq1, seq2)
     result = align.createAlignment(resultFormat=str)
     alignment = ('\nCigar string of aligned region: 6=\n'
                  'seq1 Match start: 2 Match end: 7\n'
                  'seq2 Match start: 1 Match end: 6\n'
                  'seq1 2 GAATCG 7\n'
                  '       ||||||\n'
                  'seq2 1 GAATCG 6')
     self.assertEqual(result, alignment)
예제 #17
0
 def testGapAtStartOfSeq2(self):
     seq1 = SeqRecord(Seq('cgaatcg'), id='seq1')
     seq2 = SeqRecord(Seq('gaatcg'), id='seq2')
     align = LocalAlignment(seq1, seq2)
     result = align.createAlignment()
     alignment = ("\nCigar string of aligned region: 6=\n"
                  "seq1 Match start: 2 Match end: 7\n"
                  "seq2 Match start: 1 Match end: 6\n"
                  "seq1 2 GAATCG 7\n"
                  "       ||||||\n"
                  "seq2 1 GAATCG 6")
     self.assertEqual(result, alignment)
예제 #18
0
 def testGapAtBothEndsOfSeq1(self):
     seq1 = SeqRecord(Seq('gaatc'), id='seq1')
     seq2 = SeqRecord(Seq('cgaatcg'), id='seq2')
     align = LocalAlignment(seq1, seq2)
     result = align.createAlignment()
     alignment = ("\nCigar string of aligned region: 5=\n"
                  "seq1 Match start: 1 Match end: 5\n"
                  "seq2 Match start: 2 Match end: 6\n"
                  "seq1 1 GAATC 5\n"
                  "       |||||\n"
                  "seq2 2 GAATC 6")
     self.assertEqual(result, alignment)
예제 #19
0
 def testGapAtBothEndsOfSeq1(self):
     seq1 = Read('seq1', 'gaatc')
     seq2 = Read('seq2', 'cgaatcg')
     align = LocalAlignment(seq1, seq2)
     result = align.createAlignment(resultFormat=str)
     alignment = ('\nCigar string of aligned region: 5=\n'
                  'seq1 Match start: 1 Match end: 5\n'
                  'seq2 Match start: 2 Match end: 6\n'
                  'seq1 1 GAATC 5\n'
                  '       |||||\n'
                  'seq2 2 GAATC 6')
     self.assertEqual(result, alignment)
예제 #20
0
 def testAlignmentWithGapInMiddle(self):
     seq1 = Read('seq1', 'agtcagtcagtc')
     seq2 = Read('seq2', 'cgaatcg')
     align = LocalAlignment(seq1, seq2)
     result = align.createAlignment(resultFormat=str)
     alignment = ('\nCigar string of aligned region: 2=1D1=\n'
                  'seq1 Match start: 7 Match end: 10\n'
                  'seq2 Match start: 5 Match end: 7\n'
                  'seq1 7 TCAG 10\n'
                  '       || |\n'
                  'seq2 5 TC-G 7')
     self.assertEqual(result, alignment)
예제 #21
0
 def testTwoEqualSequences(self):
     """
     When two identical sequences are given, the result should
     show that the sequences completely match.
     """
     seq1 = SeqRecord(Seq('cgaatcg'), id='seq1')
     seq2 = SeqRecord(Seq('cgaatcg'), id='seq2')
     align = LocalAlignment(seq1, seq2)
     result = align.createAlignment()
     alignment = ("\nCigar string of aligned region: 7=\n"
                  "seq1 Match start: 1 Match end: 7\n"
                  "seq2 Match start: 1 Match end: 7\n"
                  "seq1 1 CGAATCG 7\n"
                  "       |||||||\n"
                  "seq2 1 CGAATCG 7")
     self.assertEqual(result, alignment)
예제 #22
0
 def testWikiAnswer(self):
     """
     Test the example given in Wikipedia:
     http://en.wikipedia.org/wiki/Smith%E2%80%93Waterman_algorithm
     """
     seq1 = SeqRecord(Seq('ACACACTA'), id='seq1')
     seq2 = SeqRecord(Seq('AGCACACA'), id='seq2')
     align = LocalAlignment(seq1, seq2, match=2)
     result = align.createAlignment()
     alignment = ("\nCigar string of aligned region: 1=1I5=1D1=\n"
                  "seq1 Match start: 1 Match end: 8\n"
                  "seq2 Match start: 1 Match end: 8\n"
                  "seq1 1 A-CACACTA 8\n"
                  "       | ||||| |\n"
                  "seq2 1 AGCACAC-A 8")
     self.assertEqual(result, alignment)
예제 #23
0
 def testTwoEqualSequences(self):
     """
     When two identical sequences are given, the result should
     show that the sequences completely match.
     """
     seq1 = Read('seq1', 'cgaatcg')
     seq2 = Read('seq2', 'cgaatcg')
     align = LocalAlignment(seq1, seq2)
     result = align.createAlignment(resultFormat=str)
     alignment = ('\nCigar string of aligned region: 7=\n'
                  'seq1 Match start: 1 Match end: 7\n'
                  'seq2 Match start: 1 Match end: 7\n'
                  'seq1 1 CGAATCG 7\n'
                  '       |||||||\n'
                  'seq2 1 CGAATCG 7')
     self.assertEqual(result, alignment)
예제 #24
0
 def testWikiAnswer(self):
     """
     Test the example given in Wikipedia:
     http://en.wikipedia.org/wiki/Smith%E2%80%93Waterman_algorithm
     """
     seq1 = SeqRecord(Seq('ACACACTA'), id='seq1')
     seq2 = SeqRecord(Seq('AGCACACA'), id='seq2')
     align = LocalAlignment(seq1, seq2, match=2)
     result = align.createAlignment()
     alignment = ("\nCigar string of aligned region: 1=1I5=1D1=\n"
                  "seq1 Match start: 1 Match end: 8\n"
                  "seq2 Match start: 1 Match end: 8\n"
                  "seq1 1 A-CACACTA 8\n"
                  "       | ||||| |\n"
                  "seq2 1 AGCACAC-A 8")
     self.assertEqual(result, alignment)
예제 #25
0
 def testTwoEqualSequences(self):
     """
     When two identical sequences are given, the result should
     show that the sequences completely match.
     """
     seq1 = SeqRecord(Seq('cgaatcg'), id='seq1')
     seq2 = SeqRecord(Seq('cgaatcg'), id='seq2')
     align = LocalAlignment(seq1, seq2)
     result = align.createAlignment()
     alignment = ("\nCigar string of aligned region: 7=\n"
                  "seq1 Match start: 1 Match end: 7\n"
                  "seq2 Match start: 1 Match end: 7\n"
                  "seq1 1 CGAATCG 7\n"
                  "       |||||||\n"
                  "seq2 1 CGAATCG 7")
     self.assertEqual(result, alignment)
예제 #26
0
 def testWikiAnswer(self):
     """
     Test the example given in Wikipedia:
     http://en.wikipedia.org/wiki/Smith%E2%80%93Waterman_algorithm
     """
     seq1 = Read('seq1', 'ACACACTA')
     seq2 = Read('seq2', 'AGCACACA')
     align = LocalAlignment(seq1, seq2, match=2)
     result = align.createAlignment(resultFormat=str)
     alignment = ('\nCigar string of aligned region: 1=1I5=1D1=\n'
                  'seq1 Match start: 1 Match end: 8\n'
                  'seq2 Match start: 1 Match end: 8\n'
                  'seq1 1 A-CACACTA 8\n'
                  '       | ||||| |\n'
                  'seq2 1 AGCACAC-A 8')
     self.assertEqual(result, alignment)
예제 #27
0
 def testWikiAnswer(self):
     """
     Test the example given in Wikipedia:
     http://en.wikipedia.org/wiki/Smith%E2%80%93Waterman_algorithm
     """
     seq1 = Read('seq1', 'ACACACTA')
     seq2 = Read('seq2', 'AGCACACA')
     align = LocalAlignment(seq1, seq2, match=2)
     result = align.createAlignment(resultFormat=str)
     alignment = ('\nCigar string of aligned region: 1=1I5=1D1=\n'
                  'seq1 Match start: 1 Match end: 8\n'
                  'seq2 Match start: 1 Match end: 8\n'
                  'seq1 1 A-CACACTA 8\n'
                  '       | ||||| |\n'
                  'seq2 1 AGCACAC-A 8')
     self.assertEqual(result, alignment)
예제 #28
0
 def testTwoEqualSequences(self):
     """
     When two identical sequences are given, the result should
     show that the sequences completely match.
     """
     seq1 = Read('seq1', 'cgaatcg')
     seq2 = Read('seq2', 'cgaatcg')
     align = LocalAlignment(seq1, seq2)
     result = align.createAlignment(resultFormat=str)
     alignment = ('\nCigar string of aligned region: 7=\n'
                  'seq1 Match start: 1 Match end: 7\n'
                  'seq2 Match start: 1 Match end: 7\n'
                  'seq1 1 CGAATCG 7\n'
                  '       |||||||\n'
                  'seq2 1 CGAATCG 7')
     self.assertEqual(result, alignment)
예제 #29
0
 def testWikiAnswerWithMatchOne(self):
     """
     Test the example given in Wikipedia
     http://en.wikipedia.org/wiki/Smith%E2%80%93Waterman_algorithm
     Wikipedia uses a match score of two, here we use a score of one.
     """
     seq1 = Read('seq1', 'ACACACTA')
     seq2 = Read('seq2', 'AGCACACA')
     align = LocalAlignment(seq1, seq2, match=1)
     result = align.createAlignment(resultFormat=str)
     alignment = ('\nCigar string of aligned region: 5=1D1=\n'
                  'seq1 Match start: 2 Match end: 8\n'
                  'seq2 Match start: 3 Match end: 8\n'
                  'seq1 2 CACACTA 8\n'
                  '       ||||| |\n'
                  'seq2 3 CACAC-A 8')
     self.assertEqual(result, alignment)
예제 #30
0
 def testWikiAnswerWithMatchOne(self):
     """
     Test the example given in Wikipedia
     http://en.wikipedia.org/wiki/Smith%E2%80%93Waterman_algorithm
     Wikipedia uses a match score of two, here we use a score of one.
     """
     seq1 = SeqRecord(Seq('ACACACTA'), id='seq1')
     seq2 = SeqRecord(Seq('AGCACACA'), id='seq2')
     align = LocalAlignment(seq1, seq2, match=1)
     result = align.createAlignment()
     alignment = ("\nCigar string of aligned region: 5=1D1=\n"
                  "seq1 Match start: 2 Match end: 8\n"
                  "seq2 Match start: 3 Match end: 8\n"
                  "seq1 2 CACACTA 8\n"
                  "       ||||| |\n"
                  "seq2 3 CACAC-A 8")
     self.assertEqual(result, alignment)
예제 #31
0
                    help='The mismatch score.')

parser.add_argument('--gapOpenScore',
                    type=int,
                    default=-1,
                    help='The gap open score.')

parser.add_argument('--gapExtendScore',
                    type=int,
                    default=-1,
                    help='The gap extend score.')

parser.add_argument('--gapExtendDecay',
                    type=float,
                    default=0.0,
                    help='The gap extend decay.')

args = parser.parse_args()

for seq1 in FastaReads(args.fastaFile1):
    for seq2 in FastaReads(args.fastaFile2):
        alignment = LocalAlignment(seq1,
                                   seq2,
                                   match=args.matchScore,
                                   mismatch=args.mismatchScore,
                                   gap=args.gapOpenScore,
                                   gapExtend=args.gapExtendScore,
                                   gapExtendDecay=args.gapExtendDecay)

        print(alignment.createAlignment(resultFormat=str))
예제 #32
0
    '--fastaFile2', required=True, help='The second FASTA file.')

parser.add_argument(
    '--matchScore', type=int, default=1, help='The match score.')

parser.add_argument(
    '--mismatchScore', type=int, default=-1, help='The mismatch score.')

parser.add_argument(
    '--gapOpenScore', type=int, default=-1, help='The gap open score.')

parser.add_argument(
    '--gapExtendScore', type=int, default=-1, help='The gap extend score.')

parser.add_argument(
    '--gapExtendDecay', type=float, default=0.0, help='The gap extend decay.')

args = parser.parse_args()

for seq1 in FastaReads(args.fastaFile1):
    for seq2 in FastaReads(args.fastaFile2):
        alignment = LocalAlignment(
            seq1, seq2,
            match=args.matchScore,
            mismatch=args.mismatchScore,
            gap=args.gapOpenScore,
            gapExtend=args.gapExtendScore,
            gapExtendDecay=args.gapExtendDecay)

        print(alignment.createAlignment(resultFormat=str))
예제 #33
0
    sys.exit(1)
else:
    fileHandle1 = sys.argv[1]
    fileHandle2 = sys.argv[2]
    if len(sys.argv) == 3:
        matchScore = 1
        mismatchScore = -1
        gapOpenScore = -1
        gapExtendScore = -1
        gapExtendDecay = 0.0
    else:
        matchScore = int(sys.argv[3])
        mismatchScore = int(sys.argv[4])
        gapOpenScore = int(sys.argv[5])
        gapExtendScore = int(sys.argv[6])
        gapExtendDecay = float(sys.argv[7])
    for record in SeqIO.parse(fileHandle1, "fasta"):
        input1 = record
        for record in SeqIO.parse(fileHandle2, "fasta"):
            input2 = record
            alignment = LocalAlignment(
                input1,
                input2,
                match=matchScore,
                mismatch=mismatchScore,
                gap=gapOpenScore,
                gapExtend=gapExtendScore,
                gapDecay=gapExtendDecay,
            )
            print(alignment.createAlignment())
예제 #34
0
          'gapExtendDecay)' % sys.argv[0],
          file=sys.stderr)
    sys.exit(1)
else:
    fileHandle1 = sys.argv[1]
    fileHandle2 = sys.argv[2]
    if len(sys.argv) == 3:
        matchScore = 1
        mismatchScore = -1
        gapOpenScore = -1
        gapExtendScore = -1
        gapExtendDecay = 0.0
    else:
        matchScore = int(sys.argv[3])
        mismatchScore = int(sys.argv[4])
        gapOpenScore = int(sys.argv[5])
        gapExtendScore = int(sys.argv[6])
        gapExtendDecay = float(sys.argv[7])
    for record in SeqIO.parse(fileHandle1, 'fasta'):
        input1 = record
        for record in SeqIO.parse(fileHandle2, 'fasta'):
            input2 = record
            alignment = LocalAlignment(input1,
                                       input2,
                                       match=matchScore,
                                       mismatch=mismatchScore,
                                       gap=gapOpenScore,
                                       gapExtend=gapExtendScore,
                                       gapDecay=gapExtendDecay)
            print(alignment.createAlignment())
예제 #35
0
    print >>sys.stderr, ("Usage: %s filename1, filename2, (matchScore, "
                         "mismatchScore, gapOpenScore, gapExtendScore, "
                         "gapExtendDecay)"
                         % sys.argv[0])
    sys.exit(1)
else:
    fileHandle1 = sys.argv[1]
    fileHandle2 = sys.argv[2]
    if len(sys.argv) == 3:
        matchScore = 1
        mismatchScore = -1
        gapOpenScore = -1
        gapExtendScore = -1
        gapExtendDecay = 0.0
    else:
        matchScore = int(sys.argv[3])
        mismatchScore = int(sys.argv[4])
        gapOpenScore = int(sys.argv[5])
        gapExtendScore = int(sys.argv[6])
        gapExtendDecay = float(sys.argv[7])
    for record in SeqIO.parse(fileHandle1, "fasta"):
        input1 = record
        for record in SeqIO.parse(fileHandle2, "fasta"):
            input2 = record
            alignment = LocalAlignment(input1, input2, match=matchScore,
                                       mismatch=mismatchScore,
                                       gap=gapOpenScore,
                                       gapExtend=gapExtendScore,
                                       gapDecay=gapExtendDecay)
            print alignment.createAlignment()