Skip to content

Instantly share code, notes, and snippets.

@ktym
Created October 1, 2012 09:19
Show Gist options
  • Save ktym/3810509 to your computer and use it in GitHub Desktop.
Save ktym/3810509 to your computer and use it in GitHub Desktop.
Example of refseq2rdf_urn.rb (PfCRT gene in NC_004328.2)
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
# SO:chromosome, SO:linear
<urn:uuid:63a091c1-1409-4a91-9f46-db9b04bce8f6>
<http://genome.db/sw/feature_chromosome> 7 ;
<http://genome.db/sw/feature_isolate> "3D7" ;
<http://genome.db/sw/length> 1501717 ;
<http://genome.db/sw/location> "1..1501717" ;
<http://genome.db/sw/molecularType> "genomic DNA" ;
<http://genome.db/sw/organism> "Plasmodium falciparum 3D7" ;
<http://genome.db/sw/sequence> <urn:uuid:63a091c1-1409-4a91-9f46-db9b04bce8f6.fasta> ;
<http://genome.db/sw/start> 1 ;
<http://genome.db/sw/stop> 1501717 ;
<http://genome.db/sw/version> "NC_004328.2" ;
<http://genome.db/sw/xref> <urn:xref:bioproject:148>, <urn:xref:gi:296004920>, <urn:xref:refseq:NC_004328.2>, <urn:xref:taxon:36329> ;
<http://purl.org/dc/terms/modified> "2010-07-29"^^<http://www.w3.org/2001/XMLSchema#date> ;
a <http://purl.obolibrary.org/obo/SO_0000340>, <http://purl.obolibrary.org/obo/SO_0000987> ;
<http://www.w3.org/2000/01/rdf-schema#comment> "Plasmodium falciparum 3D7 chromosome 7." ;
<http://www.w3.org/2000/01/rdf-schema#label> "Chromosome 7" .
# SO:gene
<urn:uuid:5c3a336b-8d9c-4c88-a514-b390859d53e9>
<http://genome.db/sw/feature_gene> "PfCRT" ;
<http://genome.db/sw/feature_gene_synonym> "CRT; digestive vacuole transmembrane protein" ;
<http://genome.db/sw/feature_locus_tag> "MAL7P1.27" ;
<http://genome.db/sw/location> <urn:uuid:88af6bf4-1696-4c16-bd88-54ed8f32a77b> ;
<http://genome.db/sw/xref> <urn:xref:geneid:2655199> ;
<http://purl.org/dc/terms/isPartOf> <urn:uuid:63a091c1-1409-4a91-9f46-db9b04bce8f6> ;
a <http://purl.obolibrary.org/obo/SO_0000704> ;
<http://www.w3.org/2000/01/rdf-schema#label> "MAL7P1.27" .
# SO:STS
<urn:uuid:e3841e58-1a11-4bd2-b67a-5736604fa065>
<http://genome.db/sw/feature_gene> "PfCRT" ;
<http://genome.db/sw/feature_gene_synonym> "CRT; digestive vacuole transmembrane protein" ;
<http://genome.db/sw/feature_locus_tag> "MAL7P1.27" ;
<http://genome.db/sw/feature_standard_name> "B5M47" ;
<http://genome.db/sw/location> <urn:uuid:a2de1405-719c-4c17-98a9-262b323bff1a> ;
<http://genome.db/sw/xref> <urn:xref:UniSTS:105285> ;
<http://purl.org/dc/terms/isPartOf> <urn:uuid:63a091c1-1409-4a91-9f46-db9b04bce8f6> ;
a <http://purl.obolibrary.org/obo/SO_0000331> ;
<http://www.w3.org/2000/01/rdf-schema#label> "STS" .
# location of STS
<urn:uuid:a2de1405-719c-4c17-98a9-262b323bff1a>
<http://biohackathon.org/faldo/end> <urn:uuid:d1fb8f71-f7cc-47cf-a3a4-e2fca59f9968> ;
<http://biohackathon.org/faldo/start> <urn:uuid:fa2ce3b5-8114-4888-8169-61063312efcd> ;
<http://genome.db/sw/position> "458646..458807" .
<urn:uuid:fa2ce3b5-8114-4888-8169-61063312efcd>
<http://biohackathon.org/faldo/position> 458646 ;
<http://biohackathon.org/faldo/reference> <urn:uuid:63a091c1-1409-4a91-9f46-db9b04bce8f6> ;
a <http://biohackathon.org/faldo/ExactlyKnownPosition>, <http://biohackathon.org/faldo/ForwardStrandPosition> .
<urn:uuid:d1fb8f71-f7cc-47cf-a3a4-e2fca59f9968>
<http://biohackathon.org/faldo/position> 458807 ;
<http://biohackathon.org/faldo/reference> <urn:uuid:63a091c1-1409-4a91-9f46-db9b04bce8f6> ;
a <http://biohackathon.org/faldo/ExactlyKnownPosition>, <http://biohackathon.org/faldo/ForwardStrandPosition> .
# SO:mRNA
<urn:uuid:e4c305db-611c-478f-b3e7-9f0397a603f9>
<http://genome.db/sw/feature_gene> "PfCRT" ;
<http://genome.db/sw/feature_gene_synonym> "CRT; digestive vacuole transmembrane protein" ;
<http://genome.db/sw/feature_locus_tag> "MAL7P1.27" ;
<http://genome.db/sw/feature_transcript_id> "XM_001348968.1" ;
<http://genome.db/sw/location> <urn:uuid:6b155c2f-69a7-4405-8648-aceed0e4fb7e> ;
<http://genome.db/sw/xref> <urn:xref:geneid:2655199>, <urn:xref:gi:124511741> ;
<http://purl.org/dc/terms/isPartOf> <urn:uuid:63a091c1-1409-4a91-9f46-db9b04bce8f6> ;
a <http://purl.obolibrary.org/obo/SO_0000234> ;
<http://www.w3.org/2000/01/rdf-schema#label> "mRNA" .
# SO:CDS (parent -> "gene"; should be changed to "mRNA"?; how to make it consistent with Prokaryote RefSeq records?)
<urn:uuid:e5d162dd-b4c0-4b82-94be-c252e49aa091>
<http://genome.db/sw/exons> (<urn:uuid:b404b2d3-3642-4803-8523-76570cf846be>
<urn:uuid:d925c5bf-ec45-4542-82c8-c59f6ea6ddf4>
<urn:uuid:57202a72-4b79-4901-9a15-21daeb467274>
<urn:uuid:7eb80305-e087-40cb-bf3f-afea6eedb127>
<urn:uuid:e3bfa90d-26fb-44cd-8989-b11aff549b1d>
<urn:uuid:78027e45-4223-4e14-a0d7-b8db2002bf30>
<urn:uuid:a64773a4-a26c-4a44-be58-3977dbeade0d>
<urn:uuid:4e683dc2-60b8-4647-8fbc-99c0755a8eb2>
<urn:uuid:155d3345-511d-41fa-b477-d67bcb8471c0>
<urn:uuid:0bb4fcf5-cbfc-404a-bb1c-b9dc94444665>
<urn:uuid:65be2ca5-e962-4a43-ad9e-66c783c6c382>
<urn:uuid:27eff893-726e-4bde-b9f6-56b37929610c>
<urn:uuid:03b70581-d98b-4c76-8cb3-e6cd32ef7700>
) ;
<http://genome.db/sw/feature_codon_start> 1 ;
<http://genome.db/sw/feature_gene> "PfCRT" ;
<http://genome.db/sw/feature_gene_synonym> "CRT; digestive vacuole transmembrane protein" ;
<http://genome.db/sw/feature_locus_tag> "MAL7P1.27" ;
<http://genome.db/sw/location> <urn:uuid:99d11132-6cab-44cd-b651-56549491325a> ;
<http://genome.db/sw/xref> <urn:xref:InterPro:IPR017258>, <urn:xref:UniProtKB%2FTrEMBL:Q8IBZ9>, <urn:xref:geneid:2655199>, <urn:xref:gi:124511742>, <urn:xref:protein:XP_001349004.1> ;
<http://purl.org/dc/terms/isPartOf> <urn:uuid:5c3a336b-8d9c-4c88-a514-b390859d53e9> ;
a <http://purl.obolibrary.org/obo/SO_0000316> ;
<http://www.w3.org/2000/01/rdf-schema#label> "MAL7P1.27" .
# location of CDS
<urn:uuid:99d11132-6cab-44cd-b651-56549491325a>
<http://biohackathon.org/faldo/start> <urn:uuid:88bd57e0-960b-409d-a211-54f179a93884> ;
<http://biohackathon.org/faldo/end> <urn:uuid:dc966d60-5e01-421b-913a-8378f48a0b8b> ;
<http://genome.db/sw/position> "join(458600..458690,458868..459136,459316..459488,459661..459793,459947..460018,460142..460217,460314..460396,460524..460574,460712..460768,460917..461009,461203..461247,461395..461449,461619..461695)" .
# location start
<urn:uuid:88bd57e0-960b-409d-a211-54f179a93884>
<http://biohackathon.org/faldo/position> 458600 ;
<http://biohackathon.org/faldo/reference> <urn:uuid:63a091c1-1409-4a91-9f46-db9b04bce8f6> ;
a <http://biohackathon.org/faldo/ExactlyKnownPosition>, <http://biohackathon.org/faldo/ForwardStrandPosition> .
# location end
<urn:uuid:dc966d60-5e01-421b-913a-8378f48a0b8b>
<http://biohackathon.org/faldo/position> 461695 ;
<http://biohackathon.org/faldo/reference> <urn:uuid:63a091c1-1409-4a91-9f46-db9b04bce8f6> ;
a <http://biohackathon.org/faldo/ExactlyKnownPosition>, <http://biohackathon.org/faldo/ForwardStrandPosition> .
# exon1
<urn:uuid:b404b2d3-3642-4803-8523-76570cf846be>
<http://biohackathon.org/faldo/start> <urn:uuid:6e1fe409-7879-4a68-bf21-33398c79e50d> ;
<http://biohackathon.org/faldo/end> <urn:uuid:90256c52-22aa-4852-90eb-32809c3bbc68> ;
<http://purl.org/dc/terms/isPartOf> <urn:uuid:99d11132-6cab-44cd-b651-56549491325a> ;
<http://www.w3.org/2000/01/rdf-schema#type> <http://purl.obolibrary.org/obo/SO_0000147> .
# exon1 start
<urn:uuid:6e1fe409-7879-4a68-bf21-33398c79e50d>
<http://biohackathon.org/faldo/position> 458600 ;
<http://biohackathon.org/faldo/reference> <urn:uuid:63a091c1-1409-4a91-9f46-db9b04bce8f6> ;
a <http://biohackathon.org/faldo/ExactlyKnownPosition>, <http://biohackathon.org/faldo/ForwardStrandPosition> .
# exon1 end
<urn:uuid:90256c52-22aa-4852-90eb-32809c3bbc68>
<http://biohackathon.org/faldo/position> 458690 ;
<http://biohackathon.org/faldo/reference> <urn:uuid:63a091c1-1409-4a91-9f46-db9b04bce8f6> ;
a <http://biohackathon.org/faldo/ExactlyKnownPosition>, <http://biohackathon.org/faldo/ForwardStrandPosition> .
# exon2
<urn:uuid:d925c5bf-ec45-4542-82c8-c59f6ea6ddf4>
<http://biohackathon.org/faldo/start> <urn:uuid:2f3b1a61-0a1e-4c4b-b2e9-5604780de5ed> ;
<http://biohackathon.org/faldo/end> <urn:uuid:fdb47c15-f585-4393-a94d-1dcd42d5d60b> ;
<http://purl.org/dc/terms/isPartOf> <urn:uuid:99d11132-6cab-44cd-b651-56549491325a> ;
<http://www.w3.org/2000/01/rdf-schema#type> <http://purl.obolibrary.org/obo/SO_0000147> .
:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment