From 2a09e327ac394da6a8cafdf22ef47a50f13bd2b1 Mon Sep 17 00:00:00 2001 From: Daisuke Satoh Date: Thu, 27 Jun 2024 10:04:25 +0900 Subject: [PATCH] fix prefix --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/models/name_space.rs | 4 ++-- src/models/output/gene.rs | 4 +--- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aaf0142..33fe051 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -169,7 +169,7 @@ checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "mgend-rdf" -version = "1.0.2" +version = "1.0.3" dependencies = [ "csv", "flate2", diff --git a/Cargo.toml b/Cargo.toml index 9296611..cec7bc3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mgend-rdf" -version = "1.0.2" +version = "1.0.3" edition = "2021" [dependencies] diff --git a/src/models/name_space.rs b/src/models/name_space.rs index bf759eb..7c744b6 100644 --- a/src/models/name_space.rs +++ b/src/models/name_space.rs @@ -19,8 +19,8 @@ macro_rules! ns { ns!(FALDO, "faldo", "http://biohackathon.org/resource/faldo#"); ns!(FOAF, "foaf", "http://xmlns.com/foaf/0.1/"); ns!(GVO, "gvo", "http://genome-variation.org/"); -ns!(HCO, "hco", "http://identifiers.org/hco/"); -ns!(HGNC, "hgnc", "http://identifiers.org/hgnc/"); +ns!(HCO, "hco", "http://identifiers.org/hco:"); +ns!(HGNC, "hgnc", "http://identifiers.org/hgnc:"); ns!(OBO, "obo", "http://purl.obolibrary.org/obo/"); ns!(OLO, "olo", "http://purl.org/ontology/olo/core#"); ns!(ORG, "org", "https://www.w3.org/ns/org#"); diff --git a/src/models/output/gene.rs b/src/models/output/gene.rs index 48cb5b2..fa05f02 100644 --- a/src/models/output/gene.rs +++ b/src/models/output/gene.rs @@ -39,9 +39,7 @@ impl Gene { id: symbol.as_ref().to_string(), typ: format!("{}:Gene", MED2RDF.prefix), label: symbol.as_ref().to_string(), - xref: Gene::hgnc(hgnc) - .find(symbol) - .map(|x| format!("{}:{}", HGNC.prefix, x)), + xref: Gene::hgnc(hgnc).find(symbol).map(|x| x.to_owned()), } } }