Click or drag to resize
RunPairwiseAlignSequences Method
Execute a Pairwise alignement for sequences.

Namespace:  Biolomics.BioCallback
Assembly:  Biolomics.BioCallback (in Biolomics.BioCallback.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static int PairwiseAlignSequences(
	ref string p_AlignmentResult,
	string p_SequenceOne,
	string p_SequenceTwo,
	bool p_SequenceOneIsdna = true,
	bool p_SequenceTwoIsdna = true,
	bool p_BlastAlgorithm = true,
	int p_GapCreationPenalty = 12,
	int p_GapExtentionPenalty = 2,
	int p_PenaltyMissmatch = -2,
	int p_RewardMatch = 1,
	int p_WordSize = 11,
	int p_MaxSequencesDisplayed = 100
)

Parameters

p_AlignmentResult
Type: SystemString
The alignment result.
p_SequenceOne
Type: SystemString
The first sequence.
p_SequenceTwo
Type: SystemString
The second sequence.
p_SequenceOneIsdna (Optional)
Type: SystemBoolean
[Optional] if set to true the first sequence is nucleotides, else proteins.
p_SequenceTwoIsdna (Optional)
Type: SystemBoolean
[Optional] if set to true the second sequence is nucleotides, else proteins.
p_BlastAlgorithm (Optional)
Type: SystemBoolean
[Optional] if set to true use BLAST algorithm, else FASTA .
p_GapCreationPenalty (Optional)
Type: SystemInt32
[Optional] The gap creation penalty, must be between 2 and 100.
p_GapExtentionPenalty (Optional)
Type: SystemInt32
[Optional] The gap extention penalty, must be between 2 and 10.
p_PenaltyMissmatch (Optional)
Type: SystemInt32
[Optional] The penalty missmatch, must be between -5 and -2.
p_RewardMatch (Optional)
Type: SystemInt32
[Optional] The reward match, must be between 1 and 4.
p_WordSize (Optional)
Type: SystemInt32
[Optional] Size of the word, must be between 7 and 20.
p_MaxSequencesDisplayed (Optional)
Type: SystemInt32
[Optional] The maximum number of displayed sequences, should be 1.

Return Value

Type: Int32
Error code
Examples
Code sample below is a demonstration of how to align two sequences using the Blast algorithm.
Example VB.Net
Imports System
Imports BioloMICS.BioCallback
Imports BioloMICS.SharedClasses
Imports System.Collections

Public Class Program

    <STAThread()>
    Shared Sub Main()
        '    Create an instance of class Program and call its functions
        Dim c As New Program
        c.BlastAlign()
    End Sub

    Public Sub BlastAlign()
        '    Blast aligment
        Dim Results As String = ""
        Dim SequenceOne As String = "agtcatatgcttgtctcaaagattaagccatgcatagtctaagtttaagcaataaacagtgaaactgcgaatggctcattaaatcagtccatagtctatttgatggtaccttactacatggaaataactgtggtaattctagagctaatacatgctgaaaaatcccgacttctggaagggatgtatttattagatccaaaaccaacggccttcgggtctccttggtgaatcatgataactgctcgaatcgcatggccttgcgccggcgatgcttcattcgaatatctgccctatcaactttcgatggtaggatagaggcctaccatggtgatgacgggtaacggggaataagggttcgattccggagagagggcctgagaaacggccctcaggtctaaggacacgcagcaggcgcgcaaattatcccctggcaacactttgccgagatagtgacaataaataaca"
        Dim SequenceTwo As String = "agtcatatgcttgtctcaaagattaagccatgcatgtctaagtttaagcaataaacagcctgaaactgcgaatggctcattaaatcagtcatagtctatttgatggtaccttactacatggataactgtggtaatgtctagagctaatacatgctgaaaaatcccgacttctggaagggatgtatttattagatccaaaaccaacggccttcgggtctccttggtgaatcatgataactgctcgaatcgcatggccttgcgccggcgatgcttcattcgaatatctgccctatcaactttcgatggtaggatagaggcctaccatggtgatgacgggtaacggggaataagggttcgattccggagagagggcctgagaaacggccctcaggtctaaggacacgcagcaggcgcgcaaattatcccctggcaacactttgccgagatagtgacaataaataaca"

        '    the most simple call is this one:
        Run.PairwiseAlignSequences(Results, SequenceOne, SequenceTwo)
        Console.Write(Results)

        '    but you can specify more parameters for a fine tuning of the alignment
        Dim SequenceOneIsDNA As Boolean = True 'true for nucleotides, false for proteins
        Dim SequenceTwoIsDNA As Boolean = True 'true for nucleotides, false for proteins
        Dim UseBlastToAlign As Boolean = True 'true for BLAST, false for FASTA
        Dim GapCreationPenalty As Integer = 12 'must be between 2 and 100
        Dim GapExtentionPenalty As Integer = 2 'must be between 2 and 10
        Dim PenaltyMissmatch As Integer = -2 'must be between -5 and -2
        Dim RewardMatch As Integer = 1 'must be between 1 and 4
        Dim WordSize As Integer = 11  'must be between 7 and 20
        Dim MaximumSequencesDisplayed As Integer = 1 'should be one

        Run.PairwiseAlignSequences(Results, SequenceOne, SequenceTwo, SequenceOneIsDNA, SequenceTwoIsDNA, UseBlastToAlign, GapCreationPenalty, GapExtentionPenalty, PenaltyMissmatch, RewardMatch, WordSize, MaximumSequencesDisplayed)

        Console.Write("Second result:")
        Console.Write(Results)
    End Sub

End Class
See Also