openLogFile(LOGFILE,$log_level); //フォント設定 $utgd->setFontFile(FONTFILE); //ここから個別データ作成 //drawGene ////テスト用Geneデータ作成 $exons = array(); for($i=-1000;$iopenBufferFile($bufferfile); //category設定 $utgd->insertCategory('GRAPH'); //SCALE描画 $utgd->drawScale(NULL,0,20000,0,100,1,2000,'lightgrey'); $utgd->drawScale(NULL,0,20000,0,100,1,10000,'gray'); //操作XML $operation = 'mouse(menu=menu1(item=item1(link=www.google.co.jp)|item=item2(link=www.google.co.jp)|item=item3(sub=subop.cgi)))'; $comment = ''; ////Gene描画テスト for($i=0;$idrawGene($exons[$i],1,10,NULL,'blue',"Gene Number$i",10,'LEFT','black',4,'black',1,'',$rand,1,$operation,$comment); } //INDEX //category設定 $utgd->insertCategory('INDEX'); $index = 'Gene index'; //操作XML $operation = 'mouse(link=www.google.co.jp?q=exon)'; $comment = ''; for($i=1;$i<=5;$i++){ ////public function drawIndex($string,$rownum,$strcolor='black',$fontsize=3,$id='',$alignx='CENTER',$aligny='CENTER',$marginx=0,$marginy=0,$operation='',$comment=''){ $utgd->drawIndex($index."$i",1,'black',10,NULL,'CENTER','CENTER',0,0,$operation,$comment); } //中間ファイルクローズ $utgd->closeBufferFile(); //drawLOCUS ////テスト用Locusデータ作成 $loci = array(); for($i=-1000;$i 500){ $strand = 1; }else{ $strand = -1; } //geneデータ作成 array_push($loci,array($i+$rand0,$i+$rand1,$strand)); } ////中間ファイルセット $bufferfile = '../data/divide/buffer_locus.txt'; $utgd->openBufferFile($bufferfile);; //category設定 // $utgd->writeStringToBuffer("==GRAPH\n"); $utgd->insertCategory('GRAPH'); //SCALE //Scale描画テスト $utgd->drawScale(NULL,0,20000,0,100,1,2000,'lightgrey'); ////Locus描画テスト $operation = 'mouse(link=www.google.co.jp?q=locus)'; $comment = ''; for($i=0;$idrawLocus($loci[$i][0],$loci[$i][1],1,$loci[$i][2],15,NULL,'red','BoxSharp',45,"Locus$i",'black','LEFT',10,'black',$operation,$comment); } //INDEX //category設定 $utgd->insertCategory('INDEX'); $index = 'Locus index'; $operation = 'mouse(link=www.google.co.jp?q=locusindex)'; $comment = ''; for($i=1;$i<=5;$i++){ $utgd->drawIndex($index."$i",1,'black',10,NULL,'CENTER','CENTER',0,0,$operation,$comment); } //中間ファイルクローズ $utgd->closeBufferFile(); //drawEST ////テスト用ESTデータ作成 $ESTs = array(); $start = -1000; for($i=0;$start < BASES;$i+=1000){ //乱数 $rand0 = mt_rand(0,10); $rand2 = mt_rand(100,1000); $start += $rand2; $pos = $start; $positions = array($start); for($j=0;$j<$rand0;$j++){ $rand1 = mt_rand(100,300); $pos += $rand1; array_push($positions,$pos); } array_push($ESTs,$positions); } ////中間ファイルセット $bufferfile = '../data/divide/buffer_est.txt'; $utgd->openBufferFile($bufferfile); //category設定 $utgd->insertCategory('GRAPH'); //Scale描画テスト $utgd->drawScale(NULL,0,20000,0,100,1,2000,'lightgrey'); $operation = 'mouse(link=www.google.co.jp?q=est)'; $comment = ''; ////EST描画テスト for($i=0;$i50){ $strand = 1; }else{ $strand = -1; } //$ESTs[$i] = array(500,1000); $utgd->drawEST($ESTs[$i],10,1,$strand,NULL,'black',3,'black',1,0,10,"EST$i",'black','LEFT',8,$operation,$index); } //INDEX //category設定 $utgd->insertCategory('INDEX'); $index = 'EST index'; $operation = 'mouse(link=www.google.co.jp?q=estindex)'; $comment = ''; for($i=1;$i<=5;$i++){ $utgd->drawIndex($index."$i",1,'black',10,NULL,'CENTER','CENTER',0,0,$operation,$comment); } //中間ファイルクローズ $utgd->closeBufferFile(); //drawContents ////テスト用contentsデータ作成 $content_setnum = 100; $contents = array(); for($i=0;$i<=BASES;$i+=$content_setnum){ $value = mt_rand(0,100); array_push($contents,$value); } ////中間ファイルセット $bufferfile = '../data/divide/buffer_content.txt'; $utgd->openBufferFile($bufferfile); //category設定 $utgd->insertCategory('GRAPH'); //SCALE //Scale描画テスト $utgd->drawScale(NULL,0,20000,0,100,1,2000,'lightgrey'); ////Contents描画テスト ////$contents = array(50,10,20,30,40,80,70,5,0,4,80,15); $operation = 'mouse(link=www.google.co.jp?q=content)'; $comment = ''; $utgd->drawContents($contents,0,$content_setnum,1,1,NULL,'purple',100,0,2,$operation,$comment); //INDEX //category設定 $utgd->insertCategory('INDEX'); $index = 'Content index'; $operation = 'mouse(link=www.google.co.jp?q=contentindex)'; $comment = ''; for($i=1;$i<=5;$i++){ //public function drawIndex($string,$rownum,$strcolor='black',$fontsize=3,$id='',$alignx='center',$aligny='center',$marginx=0,$marginy=0){ $utgd->drawIndex($index."$i",1,'black',10,NULL,'CENTER','CENTER',0,0,$operation,$comment); } //中間ファイルクローズ $utgd->closeBufferFile(); //drawSequence //テスト用Sequenceデータ作成 $seq_origin = 'ATGC'; $rep_num = 40; $seq_repeated = str_repeat($seq_origin,$rep_num); $seq = str_shuffle($seq_repeated); $width_base = 20000/(strlen($seq)); $split_num = 1; $box_colors = array( 'A'=>'red', 'T'=>'yellow', 'G'=>'green', 'C'=>'blue' ); // $base_colors = array('A'=>'black','T'=>'black','G'=>'yellow','C'=>'white'); ////中間ファイルセット $bufferfile = '../data/divide/buffer_sequence.txt'; $utgd->openBufferFile($bufferfile); //category設定 $utgd->insertCategory('GRAPH'); ////Sequence描画テスト //// public function drawSequence($start,$rownum,$width_base,$height,$colors='red',$string='',$split_num=1,$id='',$dispstring=TRUE,$strcolors='', $fontsize=3){ ////$seq = 'AGCGCCGAGACGAGCGAGACAGCGCCGAGACGAGCGAGAC'; $operation = 'mouse(link=www.google.co.jp?q=sequence)'; $comment = ''; //public function drawSequence($start,$rownum,$width_base,$height,$colors='red',$string='',$split_num=1,$id='',$dispstring=TRUE,$strcolors='', $fontsize=3,$operation='',$comment=''){ $utgd->drawSequence(0,1,$width_base,15,$box_colors,$seq,1,NULL,TRUE,NULL,10,$operation,$comment); //INDEX //category設定 $utgd->insertCategory('INDEX'); $index = 'Sequence index'; $operation = 'mouse(link=www.google.co.jp?q=sequenceindex)'; $comment = ''; // public function drawIndex($string,$rownum,$strcolor='black',$fontsize=3,$id='',$alignx='center',$aligny='center',$marginx=0,$marginy=0){ for($i=1;$i<=5;$i++){ $utgd->drawIndex($index."$i",1,'black',10,NULL,'CENTER','CENTER',0,0,$operation,$comment); } //中間ファイルクローズ $utgd->closeBufferFile(); //BASE ////テスト用Baseデータ作成 $base1 = 'A'; $base2 = 'ATG'; ////中間ファイルセット(テスト用共通) $bufferfile = '../data/divide/buffer_test.txt'; $utgd->openBufferFile($bufferfile); //category設定 $utgd->insertCategory('GRAPH'); //SCALE //Scale描画テスト $utgd->drawScale(NULL,0,20000,0,100,1,2000,'lightgrey'); $operation = 'mouse(link=www.google.co.jp?q=base)'; $comment = ''; //描画テスト $utgd->drawBase(1200,1,200,15,NULL,'red',$base1,NULL,10,$operation,$comment); $utgd->drawBase(1200,1,400,15,NULL,'green',$base2,NULL,12,$operation,$comment); //中間ファイルクローズ $utgd->closeBufferFile(); //基本図形描画テスト ////中間ファイルセット(テスト用共通) $bufferfile = '../data/divide/buffer_test.txt'; $utgd->openBufferFile($bufferfile,'a'); //category設定 $utgd->insertCategory('GRAPH'); $operation = 'mouse(link=www.google.co.jp?q=base)'; $comment = ''; //描画テスト $utgd->drawLine(1,5000,5,6000,-5,'black',2,'','','line test',FALSE); $utgd->drawLineAlpha(1,5000,'%-10',6000,'%10','black',2,'','','line test',FALSE); $utgd->drawLineX(1,5000,6000,5,'black',2,'','','line test',FALSE); $utgd->drawLineY(1,7000,-5,5,'black',2,'','','line test',FALSE); $utgd->drawLineYFolded(1,7000,8000,0,10,1,'black',2,'','','line test',FALSE); // public function drawLineArrow($rownum,$start_x,$start_y,$end_x,$end_y,$color='black',$size=1,$start_flg=FALSE,$end_flg=TRUE,$height=10,$arrowcolor='',$style=1,$angle1=45,$angle2=45,$id='',$operation='',$comment='',$direct=TRUE){ $utgd->drawLineArrow(1,8000,0,9000,0,'black',2,TRUE,TRUE,10,'black',1,45,45,'','','line test',FALSE); $utgd->drawLineArrowMulti(1,8000,0,9000,0,'black',2,10,10,10,'black',1,45,45,'','','line test',FALSE); $utgd->drawBox(1,8500,9000,10,'blue','black','','','',FALSE); $utgd->drawBox(1,8500,9000,10,'','black','','','',FALSE); $utgd->drawBoxGraph(1,8500,9000,15,0,'blue','black','','','',FALSE); $utgd->drawBoxAlpha(1,8500,9000,15,'blue',75,'','','',FALSE); $utgd->drawBoxSharp(1,8500,9000,15,'blue',-1,45,'black','','','',FALSE); $utgd->drawBoxSharp(1,8500,9000,15,'',-1,45,'black','','','',FALSE); $ary = array(array(8000,0),array(8500,100),array(9000,0)); $utgd->drawPolygon(1,$ary,count($ary),'red','','','',FALSE); // public function drawStringTTF($rownum,$string,$start,$fontsize=10,$color='black',$strpos='RIGHT',$margin=0,$posy=0,$operation='',$comment='',$id='',$direct=TRUE){ $utgd->drawString(1,'ABCDE',10000,3,'black','RIGHT',10,0,'','line test','',FALSE); $utgd->drawStringTTF(1,'ABCDE',10000,10,'black','RIGHT',10,0,'','line test','',FALSE); //中間ファイルクローズ $utgd->closeBufferFile(); //Picture ////テスト用Pictureデータ作成 $picture_path = '../data/Medaka_hd_rR.jpg'; $pos = 1000; $height = 0; $pos1 = mt_rand(0,5000); $pos2 = mt_rand(5000,10000); $pos3 = mt_rand(15000,19000); $size1 = ''; $size2 = mt_rand(20,50); $size3 = 2; ////中間ファイルセット(テスト用共通) $bufferfile = '../data/divide/buffer_test.txt'; $utgd->openBufferFile($bufferfile,'a'); //category設定 $utgd->insertCategory('GRAPH'); ////Picture描画テスト $operation = 'mouse(link=www.google.co.jp?q=picture)'; $comment = ''; ////public function insertPicture($filepath,$pos,$height,$size,$mode,$rownum=1,$id='',$string='',$strcolor='black',$strpos='RIGHT',$fontsize=2){ $utgd->insertPicture($picture_path,$pos1,$height,$size1,'WITHIN',1,NULL,NULL,NULL,NULL,$operation,$comment); $utgd->insertPicture($picture_path,$pos2,$height,$size2,'WITHIN',1,NULL,'MEDAKA!','black','LEFT',10,$operation,$comment); $utgd->insertPicture($picture_path,$pos3,$height,$size3,'WITHIN',1,NULL,'MEDAKA!','black','RIGHT',10,$operation,$comment); //中間ファイルクローズ $utgd->closeBufferFile(); //テスト用TilingArrayデータ作成 ////$tile = array(1000,1500,400,'blue'); $tile = array(); $rand0 = mt_rand(-1000,-500); $exp_max = 1500; $exp_min = -1500; for($i=$rand0;$i<=BASES;$i+=20){ $rand1 = mt_rand(150,200); if($i%2 == 0){ $rand2 = mt_rand(-1000,1000); }else{ $rand2 = mt_rand(0,1000); } array_push($tile,array($i,$i+$rand1,$rand2)); $rand3 = mt_rand(20,50); $i += $rand3; } $operation = 'mouse(link=www.google.co.jp?q=tiling)'; $comment = ''; ////TilingArray1 $bufferfile = '../data/divide/buffer_tiling.txt'; $utgd->openBufferFile($bufferfile); //category設定 $utgd->insertCategory('GRAPH'); ////$start,$end,$signal,$rownum,$height,$id='',$color='yellow',$type='Box' // $utgd->drawTilingArray($tile[0],$tile[1],$tile[2],1,'100%',NULL,$tile[3]); $bodycolor = 'darkorange'; $frame = 'black'; $type = 'BoxAlpha'; for($i=0;$idrawTilingArray($tile[$i][0],$tile[$i][1],$tile[$i][2],$bodycolor,0,$frame,$exp_max,$exp_min,1,'100%',NULL,$type,$operation,$comment); } //INDEX //category設定 $utgd->insertCategory('INDEX'); $index = 'tiling1 index'; $operation = 'mouse(link=www.google.co.jp?q=tiling1index)'; $comment = ''; // public function drawIndex($string,$rownum,$strcolor='black',$fontsize=3,$id='',$alignx='center',$aligny='center',$marginx=0,$marginy=0){ for($i=1;$i<=5;$i++){ $utgd->drawIndex($index."$i",1,'black',10,NULL,'CENTER','CENTER',0,0,$operation,$comment); } //中間ファイルクローズ $utgd->closeBufferFile(); ////TilingArray2 $bufferfile = '../data/divide/buffer_tiling2.txt'; $utgd->openBufferFile($bufferfile); //category設定 $utgd->insertCategory('GRAPH'); ////$start,$end,$signal,$rownum,$height,$id='',$color='yellow',$type='Box' ////$utgd->drawTilingArray($tile[0],$tile[1],$tile[2],1,'100%',NULL,$tile[3]); $bodycolor = 'blue'; $frame = 'black'; $type = 'Graph'; for($i=0;$idrawTilingArray($tile[$i][0],$tile[$i][1],$tile[$i][2],$bodycolor,0,$frame,$exp_max,$exp_min,1,'100%',NULL,$type,$operation,$comment); } //INDEX //category設定 $utgd->insertCategory('INDEX'); $index = 'tiling2 index'; $operation = 'mouse(link=www.google.co.jp?q=tiling2index)'; $comment = ''; // public function drawIndex($string,$rownum,$strcolor='black',$fontsize=3,$id='',$alignx='center',$aligny='center',$marginx=0,$marginy=0){ for($i=1;$i<=5;$i++){ $utgd->drawIndex($index."$i",1,'black',10,NULL,'CENTER','CENTER',0,0,$operation,$comment); } //中間ファイルクローズ $utgd->closeBufferFile(); ////TilingArray3 $bufferfile = '../data/divide/buffer_tiling3.txt'; $utgd->openBufferFile($bufferfile); //category設定 $utgd->insertCategory('GRAPH'); ////$start,$end,$signal,$rownum,$height,$id='',$color='yellow',$type='Box' ////$utgd->drawTilingArray($tile[0],$tile[1],$tile[2],1,'100%',NULL,$tile[3]); $bodycolor = ''; $frame = 'black'; $type = 'Tile'; for($i=0;$idrawTilingArray($tile[$i][0],$tile[$i][1],$tile[$i][2],$bodycolor,0,$frame,$exp_max,$exp_min,1,'100%',NULL,$type,$operation,$comment); } //INDEX //category設定 $utgd->insertCategory('INDEX'); $index = 'tiling3 index'; $operation = 'mouse(link=www.google.co.jp?q=tiling3index)'; $comment = ''; // public function drawIndex($string,$rownum,$strcolor='black',$fontsize=3,$id='',$alignx='center',$aligny='center',$marginx=0,$marginy=0){ for($i=1;$i<=5;$i++){ $utgd->drawIndex($index."$i",1,'black',10,NULL,'CENTER','CENTER',0,0,$operation,$comment); } //中間ファイルクローズ $utgd->closeBufferFile(); //drawMarker //テスト用MARKERデータ作成 $markers = array(); for($i=-1000;$iopenBufferFile($bufferfile); //category設定 $utgd->insertCategory('GRAPH'); //SCALE //Scale描画テスト $utgd->drawScale(NULL,0,20000,0,100,1,2000,'lightgrey'); $operation = 'mouse(link=www.google.co.jp?q=marker)'; $comment = ''; for($i=0;$idrawMarker($markers[$i],1,"marker$i",'red',NULL,'red',1,5,8,'LEFT',$operation,$comment); } //INDEX //category設定 $utgd->insertCategory('INDEX'); $index = 'Marker index'; $operation = 'mouse(link=www.google.co.jp?q=markerindex)'; $comment = ''; for($i=1;$i<=5;$i++){ $utgd->drawIndex($index."$i",1,'black',10,NULL,'CENTER','CENTER',0,0,$operation,$comment); } //中間ファイルクローズ $utgd->closeBufferFile(); //drawEnzyme ////テスト用Enzymeデータ作成 $enzymes = array(); for($i=-1000;$iopenBufferFile($bufferfile); //category設定 $utgd->insertCategory('GRAPH'); //SCALE //Scale描画テスト $utgd->drawScale(NULL,0,20000,0,100,1,2000,'lightgrey'); $operation = 'mouse(link=www.google.co.jp?q=enzyme)'; $comment = ''; for($i=0;$idrawEnzyme($enzymes[$i][0],$enzymes[$i][1],$enzymes[$i][2],$enzymes[$i][3],'red','#A4D3EE',"enzyme$i",10,NULL,1,16,1,'LEFT','black',$operation,$comment); } //INDEX //category設定 $utgd->insertCategory('INDEX'); $index = 'Enzyme index'; $operation = 'mouse(link=www.google.co.jp?q=enzymeindex)'; $comment = ''; // public function drawIndex($string,$rownum,$strcolor='black',$fontsize=3,$id='',$alignx='center',$aligny='center',$marginx=0,$marginy=0){ for($i=1;$i<=5;$i++){ $utgd->drawIndex($index."$i",1,'black',10,NULL,'CENTER','CENTER',0,0,$operation,$comment); } //中間ファイルクローズ $utgd->closeBufferFile(); //INDEX $bufferfile = '../data/divide/buffer_test.txt'; $utgd->openBufferFile($bufferfile,'a'); //category設定 $utgd->insertCategory('INDEX'); $index = 'Test index'; $operation = 'mouse(link=www.google.co.jp?q=testindex)'; $comment = ''; for($i=1;$i<=4;$i++){ $utgd->drawIndex($index."$i",1,'black',10,NULL,'CENTER','CENTER',0,0,$operation,$comment); } $utgd->closeBufferFile(); //テスト用Geneデータ作成2(横マージ) $exons2 = array(); $exons2_1end_num = -1; $exons2_2start_num= -1; for($i=-1000;$iBASES){ $exons2_1end_num = count($exons2); } if($exons2_2start_num ==-1 && $i+$rand1*2+$rand2*2+$rand3 > BASES){ $exons2_2start_num = count($exons2); } } //EXON2 20000 & 40000 //0 - 20000 //中間ファイルセット $bufferfile = '../data/divide/buffer_gene20000.txt'; //バッファファイルオープン $utgd->openBufferFile($bufferfile); //category設定 $utgd->insertCategory('GRAPH'); //SCALE //Scale描画テスト $utgd->drawScale(NULL,0,40000,0,100,1,2000,'lightgrey'); $operation = 'mouse(link=www.google.co.jp?q=gene20000)'; $comment = ''; //EXON描画テスト for($i=0;$i<$exons2_1end_num;$i++){ $utgd->drawGene($exons2[$i],1,10,"Gene Number$i",'blue',"Gene Number$i",3,'black',1,'blue',1,$operation,$comment); } //中間ファイルクローズ $utgd->closeBufferFile(); //20000 - 40000 //中間ファイルセット $bufferfile = '../data/divide/buffer_gene40000.txt'; //バッファファイルオープン $utgd->openBufferFile($bufferfile,'w'); //category設定 $utgd->insertCategory('GRAPH'); $operation = 'mouse(link=www.google.co.jp?q=gene40000)'; $comment = ''; //EXON描画テスト //EXON描画テスト for($i=$exons2_2start_num;$idrawGene($exons2[$i],1,10,"Gene Number$i",'blue',"Gene Number$i",3,'black',1,'blue',1,$operation,$comment); } //INDEX //category設定 $utgd->insertCategory('INDEX'); $index = 'genes index'; $operation = 'mouse(link=www.google.co.jp?q=genes index)'; $comment = ''; // public function drawIndex($string,$rownum,$strcolor='black',$fontsize=3,$id='',$alignx='center',$aligny='center',$marginx=0,$marginy=0){ for($i=1;$i<=5;$i++){ $utgd->drawIndex($index."$i",1,'black',3,NULL,'CENTER','CENTER',0,0,$operation,$comment); } //中間ファイルクローズ $utgd->closeBufferFile(); //drawRuler //テスト用Rulerデータ作成 ////Ruler描画テスト $bufferfile = '../data/divide/buffer_ruler.txt'; $utgd->openBufferFile($bufferfile); //category設定 $utgd->insertCategory('GRAPH'); // public function drawRuler($uppoint,$dispspace,$unitname,$fontsize,$startx,$endx,$rulerspace,$id='',$rownum=1,$rulertype=1,$linewidth=1,$rulerheight=1,$startpoint=0,$rulercolor='white',$delimitercol='black',$stringcol='red',$strpos='right'){ $utgd->drawRuler(2,2000,'k',8,0,20000,NULL,NULL,1,1,1,10,0,'dodgerblue','black','darkorange','right');//RulerType1 // $utgd->drawRuler(10,'%10','M',1,'0','200000','%2',NULL,1,2,1,4,0,'black','black','black','right');//RulerType2 //中間ファイルクローズ $utgd->closeBufferFile(); //CHROMOSOME $bufferfile = '../data/divide/buffer_chr.txt'; $utgd->openBufferFile($bufferfile); //category設定 $utgd->insertCategory('GRAPH'); //Chromosome描画テスト // public function drawChromosome($chrostartx,$chroendx,$dispstartx,$dispendx,$stringleft,$stringright,$id='',$rownum=1,$chrotype='UTGB',$chroheight=10,$fontsize=1,$strposleft='LEFT',$strposright='RIGHT',$chrocolor='yellow',$dispcolor='steelblue',$stringcol='cornflowerblue',$operation='',$comment=''){ $utgd->drawChromosome(2000,18000,7000,9000,'left_string','right_string',NULL,1,'UTGB',10,10,'LEFT','RIGHT',NULL,NULL,NULL,'#0072B2','#F0E442','black','',''); //INDEX //category設定 $utgd->insertCategory('INDEX'); $index = 'chr index'; $operation = 'mouse(link=www.google.co.jp?q=chr index)'; $comment = ''; // public function drawIndex($string,$rownum,$strcolor='black',$fontsize=3,$id='',$alignx='center',$aligny='center',$marginx=0,$marginy=0){ for($i=1;$i<=5;$i++){ $utgd->drawIndex($index."$i",1,'black',10,NULL,'CENTER','CENTER',0,0,$operation,$comment); } //中間ファイルクローズ $utgd->closeBufferFile(); //LEGEND $bufferfile = '../data/divide/buffer_legend.txt'; $utgd->openBufferFile($bufferfile); //category設定 $utgd->insertCategory('GRAPH'); //legend描画テスト // public function drawLegend($string,$stringcol,$id='',$rownum=1,$fontsize=1,$legstartx=0,$legstarty=0,$boxendx=NULL,$boxcolor='black',$operation='',$comment=''){ //Legend描画テスト $utgd->drawLegend('legend string no box version','red',NULL,1,10,15000,0,'RIGHT',NULL,'blue'); $utgd->drawLegend('gene','black',NULL,1,10,2000,0,600,'red'); $utgd->drawLegend('locus','black',NULL,1,10,2000,0,600,'blue'); $utgd->drawLegend('enzyme','black',NULL,1,10,2000,0,600,'#A4D3EE'); //INDEX //category設定 $utgd->insertCategory('INDEX'); $index = 'legend index'; $operation = 'mouse(link=www.google.co.jp?q=legend index)'; $comment = ''; // public function drawIndex($string,$rownum,$strcolor='black',$fontsize=3,$id='',$alignx='center',$aligny='center',$marginx=0,$marginy=0){ for($i=1;$i<=5;$i++){ $utgd->drawIndex($index."$i",1,'black',10,NULL,'CENTER','CENTER',0,0,$operation,$comment); } //中間ファイルクローズ $utgd->closeBufferFile(); //Chromosome描画テスト //CHROMOSOME $bufferfile = '../data/divide/buffer_chr2.txt'; $utgd->openBufferFile($bufferfile); //category設定 $utgd->insertCategory('GRAPH'); //Chromosome描画テスト $utgd->drawChromosome(0, 20000, 3000, 6000, 'left_string','right_string',NULL,1,'GBROWSE',10,10,'RIGHT','LEFT',0.1,200,'M','black','red','black'); // $utgd->drawChromosome(9000, 12000,10000,10500,'left_string',NULL,NULL,1,'GBROWSE',10,2,'LEFT','RIGHT',0.1,200,'M','black','red','black'); // $utgd->drawChromosome(15000,18000,16000,17000,'left_string',NULL,NULL,1,'GBROWSE',10,2,'LEFT','RIGHT',0.1,200,'M','black','red','black'); //INDEX //category設定 $utgd->insertCategory('INDEX'); $index = 'chr2 index'; $operation = 'mouse(link=www.google.co.jp?q=chr2 index)'; $comment = ''; // public function drawIndex($string,$rownum,$strcolor='black',$fontsize=3,$id='',$alignx='center',$aligny='center',$marginx=0,$marginy=0){ for($i=1;$i<=5;$i++){ $utgd->drawIndex($index."$i",1,'black',10,NULL,'CENTER','CENTER',0,0,$operation,$comment); } //中間ファイルクローズ $utgd->closeBufferFile(); //legend描画テスト $bufferfile = '../data/divide/buffer_length.txt'; $utgd->openBufferFile($bufferfile); //category設定 $utgd->insertCategory('GRAPH'); //LENGTH //Length描画テスト // $utgd->drawLength(1000,5000,'length test',2,'black',NULL,1,1, 1,1000,5,'RIGHT'); $utgd->drawLength(1000,18000,'length test',10,'black',NULL,1,1,-1,1000,5,'RIGHT'); //INDEX //category設定 $utgd->insertCategory('INDEX'); $index = 'length index'; $operation = 'mouse(link=www.google.co.jp?q=length index)'; $comment = ''; // public function drawIndex($string,$rownum,$strcolor='black',$fontsize=3,$id='',$alignx='center',$aligny='center',$marginx=0,$marginy=0){ for($i=1;$i<=5;$i++){ $utgd->drawIndex($index."$i",1,'black',10,NULL,'CENTER','CENTER',0,0,$operation,$comment); } //中間ファイルクローズ $utgd->closeBufferFile(); //終了処理 //ログファイルクローズ $utgd->closeLogFile(); ?>