Click or drag to resize
XBlastHit Class
Class XBlastHit.
Inheritance Hierarchy
SystemObject
  Biolomics.BioCallbackXBlastHit

Namespace:  Biolomics.BioCallback
Assembly:  Biolomics.BioCallback (in Biolomics.BioCallback.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[SerializableAttribute]
public class XBlastHit

The XBlastHit type exposes the following members.

Constructors
  NameDescription
Public methodXBlastHit
Initializes a new instance of the XBlastHit class.
Top
Properties
  NameDescription
Public propertyAccession
Gets the accession.
Public propertyBlastHitHspList
Gets the blast hit HSP list.
Public propertyDef
Gets the definition.
Public propertyId
Gets the Id.
Public propertyLen
Gets the length.
Public propertyNum
Gets the number.
Top
Methods
  NameDescription
Public methodBlastHitType
Gets the BlastHitType .
Public methodDirection
Direction: string representation of the direction 'x/y' with: x = '+' (Forward) or '-' (Backward) for the Query y = '+' (Forward) or '-' (Backward) for the Subject
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGlobalOverlap
calculates the global overlap for all matching hits.
Public methodGlobalProbability
Returns the probability of the best hit segment pair
Public methodGlobalScore
Returns the bit_score of the best hit segment pair.
Public methodGlobalSimilarity
global similarity rate given by : (Total identity / Total length).
Public methodGreatestHitHsp
Returns the bit_score of the best hit segment pair.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a String that represents this instance.
(Overrides ObjectToString.)
Public methodTotalLen
TotalLen: calculates the total length of the alignment segments
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Implements the operator =.
Public operatorStatic memberInequality
Implements the operator <> operator.
Top
Examples
Code sample below is compete and is a demonstration of how to align sequences stored in a given FASTA formatted file against Genbank/NCBI.
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.PairwiseAlignmentAgainstGenbank()
    End Sub
    Public Sub PairwiseAlignmentAgainstGenbank()

        '    **********    Align with Genbank    ********
        Dim QueryFastaFile As String = "Your_Fasta_File_Path\Sequences.fas" 'full path of Fasta formatted file to be aligned with a reference database available from Genbank
        Dim resultFastaFile As String = "Your_ResultFastaFile_Name.fas" 'full path of Fasta formatted file to be aligned with a reference database available from Genbank
        '    Genbank database. Possible options are:
        '"nr", "pat", "pdb", "month", "refseq_rna", "refseq_genomic", "est", "est_human", "est_mouse", "est_others", "gss", "htgs", "dbsts", "chromosome", "wgs", "env_nt"
        Dim MaxTimeMinutesAllowed As Integer = 2 ' maximum allowed time in minutes for a single query to be done. If longer, process will be canceled

        Dim StartTime As System.DateTime = System.DateTime.Now

        Dim Options As New XBlastOptions
        '    for your information, default values are:
        Options.GapCreationPenalty = 12
        Options.GapExtensionPenalty = 2
        Options.PenaltyMisMatch = -2
        Options.RewardMatch = 1
        Options.WordSize = 11
        Options.MaxSequencesDisplayed = 100
        Options.MaxTimeMinutesAllowed = 5
        Options.SortingMode = BlastSortingModeEnum.Rating
        '    you can change these options:
        Options.MaxSequencesDisplayed = 5
        '    make a list for the results
        Dim Results As New Generic.List(Of Generic.List(Of XBlastHit))
        '    query Genbank
        Dim ErrorCode As Integer = Run.BlastAlignWithGenbank(Results, resultFastaFile, QueryFastaFile, Options, GenBankDBNameEnum.nr)

        Dim ElapsedTicks As Long = System.DateTime.Now.Ticks - StartTime.Ticks
        Dim ElapsedSpan As New TimeSpan(ElapsedTicks)

        If ErrorCode = 0 Then
            Console.Write("Job done in " & CStr(ElapsedSpan.TotalSeconds) & " seconds")
            Console.Write("Results can then be viewed using the 'Open previous pairwise alignments (NxM)' menu under the 'Sequences' menu of the main BioloMICS Editor window")
            '    but you can also use the XBlastHit properties directly.
        Else
            For Each Err As String In Run.GetLastErrorMessage()
                Console.Write(Err)
            Next
        End If

    End Sub
End Class
See Also