RunPairwiseAlignSequences Method |
Namespace: Biolomics.BioCallback
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 )
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