$class_id = "rs" . $rs_id; $owl .= "Class: " . $class_id . "\n"; // Create subclasses of Polymorphism->(1)rsid; (2)rdfs:label; (3)can_be_tested_with; (4)relevant_for; (5)rdfs:seeAlso; (6)dbsnp_orientation_on_reference_genome; $owl .= " SubClassOf: polymorphism" . "\n"; $owl .= " Annotations: rsid \"rs" . $rs_id . "\"\n"; $owl .= " Annotations: rdfs:label \"rs" . $rs_id . "\"\n"; if (in_array($class_id, $list_genes_and_snps_in_rules)) { $rank_pos = array_search($class_id, $list_genes_and_snps_in_rules); $genotype_rank = $rank_pos + 1; $owl .= "\tAnnotations: rank \"" . $genotype_rank . "\"\n"; $snp_group_info_rank = $genotype_rank . "\t"; //Add rank element. } else { $owl .= "\tAnnotations: rank \"-1\"\n"; } $owl .= generate_assay_annotations($class_id); $snp_group_info_listgenomictest = generate_assay_annotations_semicolon_separated($class_id) . "\t"; //Add the listgenomictest element. $fxn_symbols = null; foreach ($fxn_sets as $fxn_set) { if (isset($fxn_set["symbol"])) { $fxn_symbols[] = make_valid_id($fxn_set["symbol"]); } } if (isset($fxn_symbols)) { $fxn_symbols = array_unique($fxn_symbols); foreach ($fxn_symbols as $fxn_symbol) { $owl .= " Annotations: relevant_for " . $fxn_symbol . "\n"; } } $owl .= " Annotations: rdfs:seeAlso <http://bio2rdf.org/dbsnp:rs" . $rs_id . "> \n";
$observed_alleles[$j] = flipOrientationOfStringRepresentation($observed_alleles[$j]); } } sort($observed_alleles, SORT_STRING); // Create OWL classes for all possible genotype variants $class_id = "rs" . $rs_id; $polymorphisms .= "Class: " . $class_id . "\n"; // Create subclasses of Polymorphism->(1)rsid; (2)rdfs:label; (3)can_be_tested_with; (4)relevant_for; (5)rdfs:seeAlso; (6)dbsnp_orientation_on_reference_genome; $polymorphisms .= " SubClassOf: polymorphism" . "\n"; $polymorphisms .= " Annotations: rsid \"rs" . $rs_id . "\"\n"; $polymorphisms .= " Annotations: rdfs:label \"rs" . $rs_id . "\"\n"; if (rankSNPInGenotype($class_id)) { $polymorphisms .= "\tAnnotations: rank \"" . $genotype_rank . "\"\n"; $genotype_rank++; } $polymorphisms .= generate_assay_annotations($class_id); $fxn_symbols = null; foreach ($fxn_sets as $fxn_set) { if (isset($fxn_set["symbol"])) { $fxn_symbols[] = make_valid_id($fxn_set["symbol"]); } } if (isset($fxn_symbols)) { $fxn_symbols = array_unique($fxn_symbols); foreach ($fxn_symbols as $fxn_symbol) { $polymorphisms .= " Annotations: relevant_for " . $fxn_symbol . "\n"; } } $polymorphisms .= " Annotations: rdfs:seeAlso <http://bio2rdf.org/dbsnp:rs" . $rs_id . "> \n"; $polymorphisms .= " Annotations: dbsnp_orientation_on_reference_genome \"" . $orient . "\" \n\n"; $polymorphism_disjoint_list[] = $class_id;