Skip to content

Commit 865899b

Browse files
revised gene family related triples
1 parent 791eaf6 commit 865899b

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

hgnc/hgnc.php

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -324,19 +324,30 @@ function process(){
324324
}
325325
}
326326
if(!empty($r[$h['gene_family_id']])){
327-
$s = $r[$h['gene_family_id']];
328-
parent::AddRDF(
329-
parent::triplifyString($id_res, $this->getVoc()."gene-family-tag", utf8_encode(htmlspecialchars($s))).
330-
parent::describeProperty($this->getVoc()."gene-family-tag", "Gene Family Tag","Tag used to designate a gene family or group the gene has been assigned to, according to either sequence similarity or information from publications, specialist advisors for that family or other databases. Families/groups may be either structural or functional, therefore a gene may belong to more than one family/group. These tags are used to generate gene family or grouping specific pages at genenames.org and do not necessarily reflect an official nomenclature. Each gene family has an associated gene family tag and gene family description. If a particular gene is a member of more than one gene family, the tags and the descriptions will be shown in the same order.")
327+
parent::addRDF(
328+
parent::describeProperty($this->getVoc()."gene-family", "gene family",null,null, "Used to designate a gene family or group the gene has been assigned to, according to either sequence similarity or information from publications, specialist advisors for that family or other databases. Families/groups may be either structural or functional, therefore a gene may belong to more than one family/group. These tags are used to generate gene family or grouping specific pages at genenames.org and do not necessarily reflect an official nomenclature. Each gene family has an associated gene family tag and gene family description. If a particular gene is a member of more than one gene family, the tags and the descriptions will be shown in the same order.").
329+
parent::describeClass($this->getVoc()."Gene-Family", "gene family", null,null,"Name given to a particular gene family. The gene family description has an associated gene family tag. Gene families are used to group genes according to either sequence similarity or information from publications, specialist advisors for that family or other databases. Families/groups may be either structural or functional, therefore a gene may belong to more than one family/group.")
331330
);
332-
}
333331

334-
if(!empty($r[$h['gene_family']])){
335-
$s = $r[$h['gene_family']];
336-
parent::AddRDF(
337-
parent::triplifyString($id_res, $this->getVoc()."gene-family-description", utf8_encode(htmlspecialchars($s))).
338-
parent::describeProperty($this->getVoc()."gene-family-description", "gene family name","Name given to a particular gene family. The gene family description has an associated gene family tag. Gene families are used to group genes according to either sequence similarity or information from publications, specialist advisors for that family or other databases. Families/groups may be either structural or functional, therefore a gene may belong to more than one family/group.")
339-
);
332+
$gf_ids = $r[$h['gene_family_id']];
333+
$gf_des = $r[$h['gene_family']];
334+
335+
$_gf_ids = explode("|", $gf_ids);
336+
$_gf_des = explode("|", $gf_des);
337+
foreach ($_gf_ids as $i => $gf_id) {
338+
$gf_res = $this->getRes().$uid."_gf_res_$gf_id";
339+
#print_r($_gf_des);
340+
if(isset($_gf_des[$i])) {
341+
$gf_description = utf8_encode(htmlspecialchars($_gf_des[$i]));
342+
} else $gf_description = "";
343+
parent::addRDF(
344+
parent::triplifyString($id, $this->getVoc()."gene-family", $gf_res).
345+
parent::describeIndividual($gf_res, $gf_description, parent::getVoc()."Gene-Family" ))
346+
;
347+
}
348+
349+
#echo parent::getRDF();exit;
350+
340351
}
341352
//write RDF to file
342353
$this->WriteRDFBufferToWriteFile();

0 commit comments

Comments
 (0)