abreBanco(); verGetPost(array("data")); if (!isset($data)) $data=$FS->data_montagens; $n= $genopar->queryBanco("select sum(if(bp_trim<=1000,1,0)) as t1000, sum(if(bp_trim>1000 and bp_trim<=5000,1,0)) as t5000, sum(if(bp_trim>5000 and bp_trim<=10000,1,0)) as t10000, sum(if(bp_trim>10000 and bp_trim<=20000,1,0)) as t20000, sum(if(bp_trim>20000 and bp_trim<=30000,1,0)) as t30000, sum(if(bp_trim>30000 and bp_trim<=40000,1,0)) as t40000, sum(if(bp_trim>40000,1,0)) as t50000, sum(if(bp_untrim<=1000,1,0)) as u1000, sum(if(bp_untrim>1000 and bp_untrim<=5000,1,0)) as u5000, sum(if(bp_untrim>5000 and bp_untrim<=10000,1,0)) as u10000, sum(if(bp_untrim>10000 and bp_untrim<=20000,1,0)) as u20000, sum(if(bp_untrim>20000 and bp_untrim<=30000,1,0)) as u30000, sum(if(bp_untrim>30000 and bp_untrim<=40000,1,0)) as u40000, sum(if(bp_untrim>40000,1,0)) as u50000 from contigs where data='$data'"); $lin= $genopar->getArray(); $datay= array($lin["t1000"],$lin["t5000"],$lin["t10000"],$lin["t20000"],$lin["t30000"],$lin["t40000"],$lin["t50000"]); $datay2= array($lin["u1000"],$lin["u5000"],$lin["u10000"],$lin["u20000"],$lin["u30000"],$lin["u40000"],$lin["u50000"]); $labelx= array("<1","1-5","5-10","10-20","20-30","30-40",">40"); $graph = new Graph(600,400); $graph->SetScale("textlin"); $graph->xaxis->SetTickLabels($labelx); $graph->xaxis->SetTextTickInterval(1); $graph->xaxis->SetFont(FF_FONT1); $graph->img->SetMargin(45,40,40,40); $graph->yaxis->SetTitlemargin(30); $graph->SetShadow(); $graph->SetGridDepth(DEPTH_BACK); $graph->legend->Pos(0.1,0.11,'right','top'); $graph->title->Set("Distribuicao dos Contigs de acordo com o numero de bases"); $graph->title->SetFont(FF_FONT1,FS_BOLD); $graph->subtitle->Set("Data base: ".arrumaData($data)); $graph->xaxis->title->Set("Numero de Bases x 1.000"); $graph->yaxis->title->Set("Total de Contigs"); $graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); $graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); $bplot1 = new BarPlot($datay); $bplot1->SetWidth(0.6); $bplot1->SetFillColor("lightsteelblue"); $bplot1->SetFillGradient("navy","lightsteelblue",GRAD_WIDE_MIDVER); $bplot1->SetColor("navy"); $bplot1->SetLegend("Trimmed"); $bplot2 = new BarPlot($datay2); $bplot2->SetWidth(0.6); $bplot2->SetFillColor("lightcoral"); $bplot2->SetFillGradient("darkred","lightcoral",GRAD_WIDE_MIDVER); $bplot2->SetColor("darkred"); $bplot2->SetLegend("Untrimmed"); $gbplot = new GroupBarPlot(array($bplot1,$bplot2)); $graph->Add($gbplot); $rede_seq = strtoupper($genopar->rede_seq); $txt=new Text($rede_seq); $txt->SetPos(2,2); $txt->SetColor("snow1"); $txt->SetFont(FF_VERDANA, FS_BOLD, 7); $graph->AddText($txt); $graph->Stroke(); ?>