烟草核酸管理系统源程序

上传人:飞****9 文档编号:132382730 上传时间:2020-05-15 格式:DOC 页数:76 大小:501KB
返回 下载 相关 举报
烟草核酸管理系统源程序_第1页
第1页 / 共76页
烟草核酸管理系统源程序_第2页
第2页 / 共76页
烟草核酸管理系统源程序_第3页
第3页 / 共76页
烟草核酸管理系统源程序_第4页
第4页 / 共76页
烟草核酸管理系统源程序_第5页
第5页 / 共76页
点击查看更多>>
资源描述

《烟草核酸管理系统源程序》由会员分享,可在线阅读,更多相关《烟草核酸管理系统源程序(76页珍藏版)》请在金锄头文库上搜索。

1、烟草核酸数据库管理系统源程序云南省烟草科学研究所2006-12-18源程序的前10页Imports SystemImports System.ioImports System.TextPublic Class Abitracer 解析一个abi文件 /the next three lines are the important persistent data Private sequence As String Private A(), G(), C(), T(), Basecalls() As Integer Private TraceLength, SeqLength As Integer

2、 /This is the actual file data. Private TraceData() As Byte Private maximum As Integer = 0 /the next four declaration lines comprise the file index information Private MacJunk As Integer = 0 /sometimes when macintosh files are /FTPed in binary form, they have 128 bytes /of crap pre-pended to them. T

3、his constant /allows ABITrace to handle that in a way that /is invisible to the user. Private Shared AbsIndexBase As Integer = 26 /The file location of the Index pointer Private IndexBase, PLOC As Integer Private ATraceStart, CTraceStart, GTraceStart, TTraceStart As Integer /the next declaration is

4、for the actual file pointers Private DATA9, DATA10, DATA11, DATA12, PBAS2, FWO As Integer Private stremtempfile As String = stream Dim Basecalls() As Integer Dim acolor As Color = Color.DarkGreen Dim ccolor As Color = Color.Blue Dim gcolor As Color = Color.Black Dim tcolor As Color = Color.Red Dim n

5、color As Color = Color.Pink Dim abrush As Brush = Brushes.Blue Dim cbrush As Brush = Brushes.Red Dim gbrush As Brush = Brushes.DarkGreen Dim tbrush As Brush = Brushes.Black Dim nbrush As Brush = Brushes.Pink Dim backcolor As Color = Color.White Dim dffont As Font = New Font(Times New Roman, 10) Priv

6、ate myRund, mydate, myDYEP, myMACH, myMODL, myBCAL As String Public lable As String Private errstring Public Function ABITrace(ByVal ABIFile() As Byte) As Boolean initData(ABIFile) If errstring Then Return False Else Return True End If End Function Public Function ABITrace(ByVal ABIFile As String) A

7、s Boolean If ABIFile = Then errstring = 请输入文件! Return False Exit Function End If Dim bytes() As Byte Dim fs As FileStream Dim reader As BinaryReader Try fs = New FileStream(ABIFile, FileMode.Open) reader = New BinaryReader(fs) bytes = reader.ReadBytes(fs.Length) reader.Close() fs.Close() fs = Nothin

8、g Catch ex As Exception errstring = ex.ToString Return False Exit Function End Try If IsNothing(bytes) Then errstring = 无效文件! Return False Exit Function End If errstring = initData(bytes) If errstring Then Return False Else Return True End If End Function Private Sub initData(ByVal fileData() As Byt

9、e) TraceData = fileData If isABI() Then setIndex() setBasecalls() setSeq() setTraces() End If End Sub Public Sub getImage(ByRef out As PictureBox, ByVal widthScale As Integer) out.Image = CType(getImage(out.Height, widthScale), Image) End Sub Public Function getImage(ByVal height As Integer, ByVal w

10、idthScale As Double) As Bitmap Dim out As Bitmap out = New Bitmap(CInt(TraceLength * 2 * widthScale), height) out.Width out.Width = TraceLength * widthScale Dim imageHeight As Integer = out.Height out.Height = imageHeight Dim gd As System.Drawing.Graphics Dim mypen As Pen Dim scale As Double scale =

11、 calculateScale(out.Height) Dim bc() As Integer = Basecalls bc可能是定义nt所在的坐标位置 Dim seq() As Char Dim dfcolor As Color = Color.Black Dim dfbrush = Brushes.Black Dim aa As Brush seq = sequence.ToCharArray gd = Graphics.FromImage(out) gd.Clear(backcolor) Dim here, basenum As Integer here = 0 basenum = 0

12、For q As Integer = 1 To 5 For x As Integer = 0 To 2 * TraceLength - 2 If q = 1 Then 画A的轨迹 g.setColor(acolor) gd.DrawLine(New Pen(acolor), 2 * x, transmute(A(x), imageHeight, scale), _ 2 * (x + 1), transmute(A(x + 1), imageHeight, scale) End If If q = 2 Then gd.DrawLine(New Pen(ccolor), 2 * x, transmute(C(x), imageHeight, scale), _ 2 * (x + 1), transmute(C(x + 1), imageHei

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 经营企划

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号