烟草核酸管理系统源程序Word下载.doc

上传人:wj 文档编号:8430890 上传时间:2023-05-11 格式:DOC 页数:76 大小:501KB
下载 相关 举报
烟草核酸管理系统源程序Word下载.doc_第1页
第1页 / 共76页
烟草核酸管理系统源程序Word下载.doc_第2页
第2页 / 共76页
烟草核酸管理系统源程序Word下载.doc_第3页
第3页 / 共76页
烟草核酸管理系统源程序Word下载.doc_第4页
第4页 / 共76页
烟草核酸管理系统源程序Word下载.doc_第5页
第5页 / 共76页
烟草核酸管理系统源程序Word下载.doc_第6页
第6页 / 共76页
烟草核酸管理系统源程序Word下载.doc_第7页
第7页 / 共76页
烟草核酸管理系统源程序Word下载.doc_第8页
第8页 / 共76页
烟草核酸管理系统源程序Word下载.doc_第9页
第9页 / 共76页
烟草核酸管理系统源程序Word下载.doc_第10页
第10页 / 共76页
烟草核酸管理系统源程序Word下载.doc_第11页
第11页 / 共76页
烟草核酸管理系统源程序Word下载.doc_第12页
第12页 / 共76页
烟草核酸管理系统源程序Word下载.doc_第13页
第13页 / 共76页
烟草核酸管理系统源程序Word下载.doc_第14页
第14页 / 共76页
烟草核酸管理系统源程序Word下载.doc_第15页
第15页 / 共76页
烟草核酸管理系统源程序Word下载.doc_第16页
第16页 / 共76页
烟草核酸管理系统源程序Word下载.doc_第17页
第17页 / 共76页
烟草核酸管理系统源程序Word下载.doc_第18页
第18页 / 共76页
烟草核酸管理系统源程序Word下载.doc_第19页
第19页 / 共76页
烟草核酸管理系统源程序Word下载.doc_第20页
第20页 / 共76页
亲,该文档总共76页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

烟草核酸管理系统源程序Word下载.doc

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

烟草核酸管理系统源程序Word下载.doc

//allowsABITracetohandlethatinawaythat

//isinvisibletotheuser.

PrivateSharedAbsIndexBaseAsInteger=26'

//ThefilelocationoftheIndexpointer

PrivateIndexBase,PLOCAsInteger

PrivateATraceStart,CTraceStart,GTraceStart,TTraceStartAsInteger

//thenextdeclarationisfortheactualfilepointers

PrivateDATA9,DATA10,DATA11,DATA12,PBAS2,FWOAsInteger

PrivatestremtempfileAsString="

stream"

DimBasecalls()AsInteger

DimacolorAsColor=Color.DarkGreen

DimccolorAsColor=Color.Blue

DimgcolorAsColor=Color.Black

DimtcolorAsColor=Color.Red

DimncolorAsColor=Color.Pink

DimabrushAsBrush=Brushes.Blue

DimcbrushAsBrush=Brushes.Red

DimgbrushAsBrush=Brushes.DarkGreen

DimtbrushAsBrush=Brushes.Black

DimnbrushAsBrush=Brushes.Pink

DimbackcolorAsColor=Color.White

DimdffontAsFont=NewFont("

TimesNewRoman"

10)

PrivatemyRund,mydate,myDYEP,myMACH,myMODL,myBCALAsString

PubliclableAsString

Privateerrstring

PublicFunctionABITrace(ByValABIFile()AsByte)AsBoolean

initData(ABIFile)

Iferrstring<

>

"

"

Then

ReturnFalse

Else

ReturnTrue

EndIf

EndFunction

PublicFunctionABITrace(ByValABIFileAsString)AsBoolean

IfABIFile="

errstring="

请输入文件!

ExitFunction

Dimbytes()AsByte

DimfsAsFileStream

DimreaderAsBinaryReader

Try

fs=NewFileStream(ABIFile,FileMode.Open)

reader=NewBinaryReader(fs)

bytes=reader.ReadBytes(fs.Length)

reader.Close()

fs.Close()

fs=Nothing

CatchexAsException

errstring=ex.ToString

EndTry

IfIsNothing(bytes)Then

无效文件!

errstring="

initData(bytes)

PrivateSubinitData(ByValfileData()AsByte)

TraceData=fileData

IfisABI()Then

setIndex()

setBasecalls()

setSeq()

setTraces()

EndSub

PublicSubgetImage(ByRefoutAsPictureBox,ByValwidthScaleAsInteger)

out.Image=CType(getImage(out.Height,widthScale),Image)

PublicFunctiongetImage(ByValheightAsInteger,ByValwidthScaleAsDouble)AsBitmap

DimoutAsBitmap

out=NewBitmap(CInt(TraceLength*2*widthScale),height)

'

out.Width

out.Width=TraceLength*widthScale

DimimageHeightAsInteger=out.Height

out.Height=imageHeight

DimgdAsSystem.Drawing.Graphics

DimmypenAsPen

DimscaleAsDouble

scale=calculateScale(out.Height)

Dimbc()AsInteger=Basecalls'

bc可能是定义nt所在的坐标位置

Dimseq()AsChar

DimdfcolorAsColor=Color.Black

Dimdfbrush=Brushes.Black

DimaaAsBrush

seq=sequence.ToCharArray

gd=Graphics.FromImage(out)

gd.Clear(backcolor)

Dimhere,basenumAsInteger

here=0

basenum=0

ForqAsInteger=1To5

ForxAsInteger=0To2*TraceLength-2

Ifq=1Then'

画A的轨迹

'

g.setColor(acolor)

gd.DrawLine(NewPen(acolor),2*x,transmute(A(x),imageHeight,scale),_

2*(x+1),transmute(A(x+1),imageHeight,scale))

EndIf

Ifq=2Then

gd.DrawLine(NewPen(ccolor),2*x,transmute(C(x),imageHeight,scale),_

2*(x+1),transmute(C(x+1),imageHeight,scale))

Ifq=3Then

gd.DrawLine(NewPen(tcolor),2*x,transmute(T(x),imageHeight,scale),_

2*(x+1),transmute(T(x+1),imageHeight,scale))

Ifq=4Then

gd.DrawLine(NewPen(gcolor),2*x,transmute(G(x),imageHeight,scale),_

2*(x+1),transmute(G(x+1),imageHeight,scale))

Ifq=5Then'

画其他内容的

If((here>

bc.Length-1)Or(basenum>

seq.Length-1))ThenExitFor

IfxMod30=0Then

'

gd.DrawString(2*x,dffont,Brushes.Black,_

(2*x-3),transmute(-27,imageHeight,1.0))

EndIf

If(bc(here)=x)Then

gd.DrawLine(NewPen(dfcolor),2*x,transmute(-2,imageHeight,1.0),_

2*x,transmute(-7,imageHeight,1.0))

If((basenum+1)Mod10=0)Then'

//ifthebasecountisdivisiblebyten//addanumber

gd.DrawLine(NewPen(dfcolor),2*x,transmute(-20,imageHeight,1.0),_

2*x,transmute(-25,imageHeight,1.0))

gd.DrawString(basenum+1,dffont,Brushes.Black,_

(2*x-3),transmute(-36,imageHeight,1.0))

EndIf

SelectCaseseq(basenum)

Case"

A"

"

a"

dfbrush=abrush

C"

c"

dfbrush=cbrush

G"

g"

dfbrush=gbrush

T"

t"

dfbrush=tbrush

CaseElse

dfbrush=nbrush

EndSelect

gd.DrawString(seq(basenum),dffont,dfbrush,(2*x-3),transmute(-18,imageHeight,1.0))

dfbrush=Brushes.Black

here+=1

basenum+=1

Next

Next

Returnout

PublicFunctiongetabasebyid(ByValxAsInteger)AsChar

输入一个位图坐标,得到相应的一个base

Ifx>

sequence.Length-1Then

Return"

R"

ReturnCType(sequence.Chars(x),Char)

PublicFunctiongetsiglebase(ByValxAsInteger)AsChar

DimbasenumAsInteger=getbaseX(x)

MsgBox(basenum)

Ifbasenum>

ReturnCType(sequence.Chars(basenum),Char)

PublicFunctiongetbaseX(ByValxAsInteger)AsInteger

根据输入的坐标得到最近base的索引(x方向)

Dimxidx,xs,xsminAsInteger

2*TraceLengthThen

坐标越界!

Return-1

Dimbc()AsInteger=Basecalls

xsmin=2*TraceLength-2

ForiAsInteger=0Tobc.Length-1

xs=(x-bc(i)*2)^2

Ifxs<

xsminThen

xsmin=xs

xidx=i

EndIf

MsgBox(xsmin)

MsgBox(bc(xidx))

bc=Nothing

Returnxidx

PublicFunctiongetbaseLX(ByValseqAsString,ByValcountAsInteger,ByValislastAsBoolean)AsInteger

得到要查找询列的

DimidxAsInteger

idx=getbaseX(seq,count,islast)

Ifidx=-1ThenReturn-1

ReturnBasecalls(idx)*2

PublicFunctiongetbaseLX(ByValidxAsInteger)AsInteger

得到要查找询列的坐标

Ifidx<

=-1ThenReturn-1

Ifidx>

=Basecalls.LengthThenReturn-1

PublicFunctiongetbaseY_cf(ByValidxAsInteger)AsInteger

得到该序列的置信度

transmute(A(x+1),imageHeight,scale)

DimbaseAsChar=sequence.Chars(idx)

DimYYAsInteger()

SelectCasebase

Case"

YY=A

lable="

YY=T

YY=C

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 高等教育 > 军事

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2