//get the parameter
$dsname=$_GET["ds"];
trim($dsname);
$dsname=preg_replace("/'/",'',$dsname);
// marker1
$m1=$_GET["m1"];
trim($m1);
$m1=preg_replace("/'/",'',$m1);
$sqlds="select * from Linkage_markers where DS_name='".$dsname."' and Marker1='".$m1."'";
$re_ds=mysql_query($sqlds,$conn);
$fdsm=mysql_fetch_row($re_ds);
for ($i=0;$i
Your select this linkage region:
";
echo "";
echo "Dataset name (PMID) | Species | Chr | Marker1 | Marker1 LOD | Marker1 P value | Marker1 location (bp) | Marker2 | Marker2 LOD | Marker2 P value | Marker2 location (bp) | Genomic region (bp) | Phenotype |
";
echo "
$fdsm[0] | $fdsm[1] | $fdsm[2] | $fdsm[3] | $fdsm[4] | $fdsm[5] | $fdsm[6] | $fdsm[7] | $fdsm[8] | $fdsm[9] | $fdsm[10] | $fdsm[11] | $fdsm[12] |
";
$sqlm="select * from Linkage_DS_Genes where DS_name='".$dsname."' and Marker1='".$m1."' order by OriginalID";
$rem=mysql_query($sqlm,$conn);
$num=mysql_num_rows($rem);
echo "There are $num genes in the linkage region.
";
?>
// if list all or not
if( isset($_GET['listall']) ){
$listall = intval( $_GET['listall'] );
}
else{
$listall = 1;
}
// obtain the current page
if( isset($_GET['page']) ){
$page = intval( $_GET['page'] );
}
else{
$page = 1;
}
// list all genes in one page
if ($listall==0){
echo "
GeneID | Symbol | Name | Genetic location | Original ID |
";
while($rowf=mysql_fetch_row($rem)){
// no geneID, just print the original ID
if ($rowf[1]==""){
echo " | | | | ";
echo "$rowf[2] |
";
}
else {
Get_GeneInfo($rowf[1],$conn);
echo "$rowf[2] | ";
}
}
echo "
";
include("footer.php");
exit();
}
// don't list all
// if the entry less than 50,list on the page.else list on several pages
// $num is total gene number of this dataset
$page_size=50; // if more than 50 genes, list 50 gene each page
$page_count=Count_Pages($num,$page_size);
// page_count >1 ,need list the page number
if($page_count>1){
$link="ds=$dsname&m1=$m1";
List_Pages($page_count,$page,$link);
}
echo "GeneID | Symbol | Name | Genetic location | Original ID |
";
$sqlf="select * from Linkage_DS_Genes where DS_name='".$dsname."' and Marker1='".$m1."' order by OriginalID limit ".($page-1)*$page_size.", $page_size";
$ref=mysql_query($sqlf,$conn);
while($rowf=mysql_fetch_row($ref)){
// no geneID, just print the original ID
if ($rowf[1]==""){
echo " | | | | ";
echo "$rowf[2] |
";
}
else {
Get_GeneInfo($rowf[1],$conn);
echo "$rowf[2] | ";
}
}
echo "
";
// page_count >1 ,need list the page number
if($page_count>1){
$link="ds=$dsname&m1=$m1";
List_Pages($page_count,$page,$link);
}
?>