Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

Version 0.5.0

Tony Bargnesi edited this page Feb 10, 2016 · 3 revisions

Fixes

Fix missing RDF prefixes when converting BEL Script to RDF (Issue #71)

There was an issue where the RDF prefix would not serialize to RDF using either bel translate bel rdf or bel2rdf.rb.
The issue was diagnosed, by @sanea, to be an issue with parsing BEL Script files in chunks. The missing prefix would always occur between the chunks of the file. More details in PR #99.

Error translating to JSON Evidence format using Oj adapter (Issue #93)

Writing JSON Evidence to a string was not supported within the translator when using the Oj adapter to serialize JSON. Now a StringIO is constructed to allow returning a JSON string.

Consistent representation of Annotation and Namespace references in Evidence model and translators (Issue #94)

The translator plugins did not agree on the format of annotation and namespace references. All have been updated to read/write annotations and namespaces as arrays of hashes. This schema further describes the format from the JSON Evidence perspective.

RDF conversion of Parameter does not include encoding type statement (Issue #96)

The encoding type of BEL parameters were not converted to RDF statements. The following example shows a BEL term that includes the encoding type of its BEL parameter:

<ns1:Term rdf:about='http://www.openbel.org/bel/p_HGNC_KRAS'>
    <rdf:type rdf:resource='http://www.openbel.org/vocabulary/ProteinAbundance'></rdf:type>
    <ns0:label>p(HGNC:KRAS)</ns0:label>
    <ns3:hasConcept>
      <ns5:AbundanceConcept rdf:about='http://www.openbel.org/bel/namespace/hgnc-human-genes/KRAS'>
        <rdf:type rdf:resource='http://www.openbel.org/vocabulary/GeneConcept'></rdf:type>
        <rdf:type rdf:resource='http://www.openbel.org/vocabulary/RNAConcept'></rdf:type>
        <rdf:type rdf:resource='http://www.openbel.org/vocabulary/ProteinConcept'></rdf:type>
      </ns5:AbundanceConcept>
    </ns3:hasConcept>
  </ns1:Term>



Additions

Introduced translators for additional RDF formats; split and removed the RDF translator in favor of one translator per RDF format (Issue #95)

The rdf translator was split apart into a translator for each RDF format. This addition supports all of the formatters provided by RDF.rb. The gems provided by RDF.rb are needed as soft dependencies if the translator is created. The following translators are included:

  • JSON-LD
    • id: jsonld
  • N-Quads
    • id: nquads
  • N-Triples
    • id: ntriples
  • RDF/JSON
    • id: rj
  • RDF/XML
    • id: rdfxml
  • RDFa
    • id: rdfa
  • TriG
    • id: trig
  • TriX
    • id: trix
  • Turtle
    • id: turtle

Example conversion from BEL to RDF/XML: bel translator -i file.bel bel rdfxml

Warn when BEL namespace data could not be retrieved (Issue #97)

A warning will be outputted to standard error ff an annotation or namespace URL cannot be retrieved. The error will be similar to:

=====================================================================
Could not retrieve namespace.
Namespace:
    http://resource.belframework.org/belframework/20150611/namespace/hgnc.belns
Error:
    404 Not Found
=====================================================================
/usr/lib/ruby/2.3.0/open-uri.rb:359:in `open_http': 404 Not Found (OpenURI::HTTPError)
	from /usr/lib/ruby/2.3.0/open-uri.rb:737:in `buffer_open'
	from /usr/lib/ruby/2.3.0/open-uri.rb:212:in `block in open_loop'
	from /usr/lib/ruby/2.3.0/open-uri.rb:210:in `catch'
	from /usr/lib/ruby/2.3.0/open-uri.rb:210:in `open_loop'
	from /usr/lib/ruby/2.3.0/open-uri.rb:151:in `open_uri'
	from /usr/lib/ruby/2.3.0/open-uri.rb:717:in `open'
	from /usr/lib/ruby/2.3.0/open-uri.rb:35:in `open'
        ...
        ...
        ...



Added generator for random BEL Nanopubs using the bel generate subcommand (Issue #102)

A facility to generate random BEL Nanopubs was added. This can be accessed in ruby by the following:

require 'bel/gen'
include BEL::Gen::Evidence

# Generate 100 random BEL::Model::Evidence objects
100.times.map {
  evidence
}

You can also write random BEL Nanopubs through a translator plugin using the bel generate subcommand. Here is an example that writes 10 random BEL Nanopubs to RDF/XML format:

bel generate --translator rdfxml --limit 10



Access BEL annotation resource values from external .belanno files (Issue #100)

BEL annotation resources (i.e. .belanno files) can now be retrieved. The available annotation values are also available from a BEL::Annotation::AnnotationDefinition object. Here is an example in ruby:

require 'bel'
include BEL::Annotation

# Access from URL.
BEL::Annotation::AnnotationDefinition.new(
  :Species,
  "http://resource.belframework.org/belframework/latest-release/annotation/species-taxonomy-id.belanno"
).values
# => {:"9606"=>:"Homo sapiens", :"10090"=>:"Mus musculus", :"10116"=>:"Rattus norvegicus"}

# Access published OpenBEL annotations (BEL::Annotation::ANNOTATION_LATEST) as constants.
Species.values
# => {:"9606"=>:"Homo sapiens", :"10090"=>:"Mus musculus", :"10116"=>:"Rattus norvegicus"}

A warning will be outputted to standard error when an annotation URL cannot be retrieved.



Support different types of serialization within the BEL Script translator (Issue #98)

The BEL Script translator did not correctly serialize annotations using the SET and UNSET records. This issue was addressed by include three serialization strategies. An example best describes the three options.

Given the following BEL Script:

##################################################################################
# Statements Section

SET STATEMENT_GROUP = "Group 17079"

SET Anatomy = endometrium
SET Evidence = "The molecular basis for differential P450arom expression in endometriosis and eutopic endometrium stromal cells was studied. Two critical regulatory regions one being the -214/-100 bp (protein binding to a nuclear receptor half-site NRHS, AGGTCA) proximal region and the other a -517/ -214 (an imperfect cAMP response element TGCACGTCA) distal region was identified. COUP-TF (both isoform I and II) transcripts were present in both eutopic endometrial and endometriotic tissues, whereas SF-1 transcripts were detected in all endometriotic tissues. In addition a dose-dependent direct competition between SF-1 and COUP-TF for occupancy of the NRHS was seen, to which SF-1 bound with a higher affinity. Finally, overexpression of SF-1 in eutopic endometrial and endometriotic cells strikingly potentiated baseline and cAMP-induced activities of -517 promoter II construct, whereas overexpression of COUP-TF almost completely abolished these activities. Thus COUP-TF might be one of the factors responsible for the inhibition of P450arom expression in eutopic endometrial stromal cells, which lack SF-1 expression in the majority (80%) of the samples."
SET Species = 9606
SET Citation = {"PubMed","Mol Endocrinol 1999 Feb 13(2) 239-53","9973254","","",""}

p(HGNC:NR2F1) decreases p(HGNC:CYP19A1)

UNSET STATEMENT_GROUP

SET STATEMENT_GROUP = "Group 17080"

SET Evidence = "Activation of Stat5 by cytokines that share a common gamma receptor subunit, IL-2, IL-7, and IL-15"
SET Species = 9606
SET Citation = {"PubMed","J Immunol 1999 Feb 1 162(3) 1261-9","9973378","","",""}

p(HGNC:IL2) increases tscript(p(SFAM:"STAT5 Family"))

SET Evidence = "IL-4 suppressed activation of DNA binding and tyrosine phosphorylation of the transcription factor Stat5 by IL-2, and suppressed the expression of the IL-2-inducible genes CD25, CIS, the PGE2 receptor, and cytokine responsive (CR) genes CR1 and CR8."

p(HGNC:IL4) decreases p(SFAM:"STAT5 Family",pmod(P,Y))

SET Evidence = "proliferative responses to IL-2 were augmented in IL-4-cultured cells, and activation of proliferative pathways leading to activation of mitogen activated protein kinases, induction of expression of Myc, Fos, Pim-1, and cyclin D3, and decreased levels of the cyclin-dependent kinase inhibitor p27 were intact."

p(HGNC:IL2) increases kin(p(SFAM:"MAPK Erk1/2 Family"))

SET Evidence = "was suppressed by preculture in IL-4. Activation of the Jak1 and Jak3 kinases that are proximal to Stat5 in the IL-2-Jak-STAT signaling pathway was suppressed, and this correlated with inhibition of IL-2Rbeta subunit expression"

p(HGNC:IL4) decreases (p(HGNC:IL2) increases tscript(p(SFAM:"STAT5 Family")))

UNSET STATEMENT_GROUP

The discreet serialization isolates each statement using SET and UNSET records. It trades off duplicating annotations for explicit context with each statement:

###############################################
# Statements Section
SET Citation = {"PubMed", "Mol Endocrinol 1999 Feb 13(2) 239-53", "9973254", "", "", ""}
SET Evidence = "The molecular basis for differential P450arom expression in endometriosis and eutopic endometrium stromal cells was studied. Two critical regulatory regions one being the -214/-100 bp (protein binding to a nuclear receptor half-site NRHS, AGGTCA) proximal region and the other a -517/ -214 (an imperfect cAMP response element TGCACGTCA) distal region was identified. COUP-TF (both isoform I and II) transcripts were present in both eutopic endometrial and endometriotic tissues, whereas SF-1 transcripts were detected in all endometriotic tissues. In addition a dose-dependent direct competition between SF-1 and COUP-TF for occupancy of the NRHS was seen, to which SF-1 bound with a higher affinity. Finally, overexpression of SF-1 in eutopic endometrial and endometriotic cells strikingly potentiated baseline and cAMP-induced activities of -517 promoter II construct, whereas overexpression of COUP-TF almost completely abolished these activities. Thus COUP-TF might be one of the factors responsible for the inhibition of P450arom expression in eutopic endometrial stromal cells, which lack SF-1 expression in the majority (80%) of the samples."
SET Anatomy = endometrium
SET Species = 9606
p(HGNC:NR2F1) decreases p(HGNC:CYP19A1)

UNSET Anatomy
SET Citation = {"PubMed", "J Immunol 1999 Feb 1 162(3) 1261-9", "9973378", "", "", ""}
SET Evidence = "Activation of Stat5 by cytokines that share a common gamma receptor subunit, IL-2, IL-7, and IL-15"
SET Species = 9606
p(HGNC:IL2) increases tscript(p(SFAM:"STAT5 Family"))

SET Citation = {"PubMed", "J Immunol 1999 Feb 1 162(3) 1261-9", "9973378", "", "", ""}
SET Evidence = "IL-4 suppressed activation of DNA binding and tyrosine phosphorylation of the transcription factor Stat5 by IL-2, and suppressed the expression of the IL-2-inducible genes CD25, CIS, the PGE2 receptor, and cytokine responsive (CR) genes CR1 and CR8."
SET Species = 9606
p(HGNC:IL4) decreases p(SFAM:"STAT5 Family",pmod(P,Y))

SET Citation = {"PubMed", "J Immunol 1999 Feb 1 162(3) 1261-9", "9973378", "", "", ""}
SET Evidence = "proliferative responses to IL-2 were augmented in IL-4-cultured cells, and activation of proliferative pathways leading to activation of mitogen activated protein kinases, induction of expression of Myc, Fos, Pim-1, and cyclin D3, and decreased levels of the cyclin-dependent kinase inhibitor p27 were intact."
SET Species = 9606
p(HGNC:IL2) increases kin(p(SFAM:"MAPK Erk1/2 Family"))

SET Citation = {"PubMed", "J Immunol 1999 Feb 1 162(3) 1261-9", "9973378", "", "", ""}
SET Evidence = "was suppressed by preculture in IL-4. Activation of the Jak1 and Jak3 kinases that are proximal to Stat5 in the IL-2-Jak-STAT signaling pathway was suppressed, and this correlated with inhibition of IL-2Rbeta subunit expression"
SET Species = 9606
p(HGNC:IL4) decreases (p(HGNC:IL2) increases tscript(p(SFAM:"STAT5 Family")))

The topdown serialization adds SET and UNSET records as necessary to minimize duplication of BEL annotations. This results in the smallest file size:

###############################################
# Statements Section
SET Citation = {"PubMed", "Mol Endocrinol 1999 Feb 13(2) 239-53", "9973254", "", "", ""}
SET Evidence = "The molecular basis for differential P450arom expression in endometriosis and eutopic endometrium stromal cells was studied. Two critical regulatory regions one being the -214/-100 bp (protein binding to a nuclear receptor half-site NRHS, AGGTCA) proximal region and the other a -517/ -214 (an imperfect cAMP response element TGCACGTCA) distal region was identified. COUP-TF (both isoform I and II) transcripts were present in both eutopic endometrial and endometriotic tissues, whereas SF-1 transcripts were detected in all endometriotic tissues. In addition a dose-dependent direct competition between SF-1 and COUP-TF for occupancy of the NRHS was seen, to which SF-1 bound with a higher affinity. Finally, overexpression of SF-1 in eutopic endometrial and endometriotic cells strikingly potentiated baseline and cAMP-induced activities of -517 promoter II construct, whereas overexpression of COUP-TF almost completely abolished these activities. Thus COUP-TF might be one of the factors responsible for the inhibition of P450arom expression in eutopic endometrial stromal cells, which lack SF-1 expression in the majority (80%) of the samples."
SET Anatomy = endometrium
SET Species = 9606
p(HGNC:NR2F1) decreases p(HGNC:CYP19A1)

UNSET Anatomy
SET Citation = {"PubMed", "J Immunol 1999 Feb 1 162(3) 1261-9", "9973378", "", "", ""}
SET Evidence = "Activation of Stat5 by cytokines that share a common gamma receptor subunit, IL-2, IL-7, and IL-15"
p(HGNC:IL2) increases tscript(p(SFAM:"STAT5 Family"))

SET Evidence = "IL-4 suppressed activation of DNA binding and tyrosine phosphorylation of the transcription factor Stat5 by IL-2, and suppressed the expression of the IL-2-inducible genes CD25, CIS, the PGE2 receptor, and cytokine responsive (CR) genes CR1 and CR8."
p(HGNC:IL4) decreases p(SFAM:"STAT5 Family",pmod(P,Y))

SET Evidence = "proliferative responses to IL-2 were augmented in IL-4-cultured cells, and activation of proliferative pathways leading to activation of mitogen activated protein kinases, induction of expression of Myc, Fos, Pim-1, and cyclin D3, and decreased levels of the cyclin-dependent kinase inhibitor p27 were intact."
p(HGNC:IL2) increases kin(p(SFAM:"MAPK Erk1/2 Family"))

SET Evidence = "was suppressed by preculture in IL-4. Activation of the Jak1 and Jak3 kinases that are proximal to Stat5 in the IL-2-Jak-STAT signaling pathway was suppressed, and this correlated with inhibition of IL-2Rbeta subunit expression"
p(HGNC:IL4) decreases (p(HGNC:IL2) increases tscript(p(SFAM:"STAT5 Family")))

The citation serialization groups BEL Nanopubs by citation using SET STATEMENT_GROUP and UNSET STATEMENT_GROUP records. It reduces duplicate BEL annotations within the scope of a STATEMENT_GROUP:

###############################################
# Statements Section
SET STATEMENT_GROUP = 9973254
SET Citation = {"PubMed", "Mol Endocrinol 1999 Feb 13(2) 239-53", "9973254", "", "", ""}
SET Evidence = "The molecular basis for differential P450arom expression in endometriosis and eutopic endometrium stromal cells was studied. Two critical regulatory regions one being the -214/-100 bp (protein binding to a nuclear receptor half-site NRHS, AGGTCA) proximal region and the other a -517/ -214 (an imperfect cAMP response element TGCACGTCA) distal region was identified. COUP-TF (both isoform I and II) transcripts were present in both eutopic endometrial and endometriotic tissues, whereas SF-1 transcripts were detected in all endometriotic tissues. In addition a dose-dependent direct competition between SF-1 and COUP-TF for occupancy of the NRHS was seen, to which SF-1 bound with a higher affinity. Finally, overexpression of SF-1 in eutopic endometrial and endometriotic cells strikingly potentiated baseline and cAMP-induced activities of -517 promoter II construct, whereas overexpression of COUP-TF almost completely abolished these activities. Thus COUP-TF might be one of the factors responsible for the inhibition of P450arom expression in eutopic endometrial stromal cells, which lack SF-1 expression in the majority (80%) of the samples."
SET Anatomy = endometrium
SET Species = 9606
p(HGNC:NR2F1) decreases p(HGNC:CYP19A1)

UNSET STATEMENT_GROUP


SET STATEMENT_GROUP = 9973378
SET Citation = {"PubMed", "J Immunol 1999 Feb 1 162(3) 1261-9", "9973378", "", "", ""}
SET Evidence = "Activation of Stat5 by cytokines that share a common gamma receptor subunit, IL-2, IL-7, and IL-15"
SET Species = 9606
p(HGNC:IL2) increases tscript(p(SFAM:"STAT5 Family"))

SET Evidence = "IL-4 suppressed activation of DNA binding and tyrosine phosphorylation of the transcription factor Stat5 by IL-2, and suppressed the expression of the IL-2-inducible genes CD25, CIS, the PGE2 receptor, and cytokine responsive (CR) genes CR1 and CR8."
p(HGNC:IL4) decreases p(SFAM:"STAT5 Family",pmod(P,Y))

SET Evidence = "proliferative responses to IL-2 were augmented in IL-4-cultured cells, and activation of proliferative pathways leading to activation of mitogen activated protein kinases, induction of expression of Myc, Fos, Pim-1, and cyclin D3, and decreased levels of the cyclin-dependent kinase inhibitor p27 were intact."
p(HGNC:IL2) increases kin(p(SFAM:"MAPK Erk1/2 Family"))

SET Evidence = "was suppressed by preculture in IL-4. Activation of the Jak1 and Jak3 kinases that are proximal to Stat5 in the IL-2-Jak-STAT signaling pathway was suppressed, and this correlated with inhibition of IL-2Rbeta subunit expression"
p(HGNC:IL4) decreases (p(HGNC:IL2) increases tscript(p(SFAM:"STAT5 Family")))

UNSET STATEMENT_GROUP

The default serialization is citation. This option cannot currently be configured from the bel translate subcommand, only by accessing the translator in ruby (passing the :serialization option). This limitation will be addressed soon.