diff options
author | Munyoki Kilyungi | 2023-08-21 14:54:21 +0300 |
---|---|---|
committer | Munyoki Kilyungi | 2023-08-21 14:56:57 +0300 |
commit | 51b3c0548c98e0bc05e11a89cbf6b75d31b9f8d5 (patch) | |
tree | ab3d7c6f589ed8480f0a9d451566681bcfd8eaaf /examples/dump-probeset-data.scm | |
parent | 849874fdfe11003f05abe5f82efde974a8c8a388 (diff) | |
download | gn-transform-databases-51b3c0548c98e0bc05e11a89cbf6b75d31b9f8d5.tar.gz |
Remove "dump-" prefix
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'examples/dump-probeset-data.scm')
-rwxr-xr-x | examples/dump-probeset-data.scm | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/examples/dump-probeset-data.scm b/examples/dump-probeset-data.scm deleted file mode 100755 index 55f3f4b..0000000 --- a/examples/dump-probeset-data.scm +++ /dev/null @@ -1,106 +0,0 @@ -#! /usr/bin/env guile -!# - -(use-modules (srfi srfi-1) - (srfi srfi-26) - (ice-9 match) - (ice-9 regex) - (dump strings) - (dump sql) - (dump triples) - (dump special-forms)) - - - -(define %connection-settings - (call-with-input-file (list-ref (command-line) 1) - read)) - - - -(define-transformer dump-probeset-data - (tables (ProbeSetXRef - (left-join ProbeSet "ON ProbeSetXRef.ProbeSetId = ProbeSet.Id") - (left-join ProbeSetFreeze "ON ProbeSetXRef.ProbeSetFreezeId = ProbeSetFreeze.Id")) - "WHERE ProbeSetFreeze.public > 0 AND ProbeSetFreeze.confidentiality < 1") - (schema-triples - (gnc:probesetStatistics a skos:Concept) - (gnc:probesetStatistics - skos:description - "This is a set of controlled terms that are used to describe a given probeset's statistics") - (gnt:mean rdfs:domain gnc:probeset) - (gnt:locus rdfs:domain gnc:probeset) - (gnt:LRS rdfs:domain gnc:probeset) - (gnt:stdErr rdfs:domain gnc:probeset) - (gnt:stdErr rdfs:range xsd:double) - (gnt:pValue rdfs:domain gnc:probeset) - (gnt:pValue rdfs:range xsd:double) - (gnt:h2 rdfs:domain gnc:probeset) - (gnt:h2 rdfs:range xsd:double)) - (triples - (string->identifier - "" - (regexp-substitute/global - #f "[^A-Za-z0-9:]" - (field - ("CONCAT(ProbeSetFreeze.Name, '_', IF(NULLIF(TRIM(ProbeSet.Name), ProbeSet.Id) IS NULL, '', TRIM(ProbeSet.Name)))" - probesetData)) - 'pre "_" 'post) - #:separator "" - #:proc string-capitalize-first) - (set rdf:type 'gnc:probesetStatistics) - (set gnt:hasProbeSet (let ((id (field ("IF(NULLIF(TRIM(ProbeSet.Name), '') IS NULL, '', TRIM(ProbeSet.Name))" - ProbeSetIdName))) - (probeset-id (field ProbeSet Id))) - (string->identifier - "probeset" - (if (string-null? id) - (number->string probeset-id) - (regexp-substitute/global - #f "[^A-Za-z0-9:]" - id - 'pre "_" 'post))))) - (set gnt:mean (annotate-field (field ("IFNULL(ProbeSetXRef.mean, '')" mean)) - '^^xsd:double)) - (set gnt:locus (field ProbeSetXRef Locus)) - (set gnt:LRS (annotate-field - (field ("IFNULL(ProbeSetXRef.LRS, '')" lrs)) - '^^xsd:double)) - (set gnt:additive - (annotate-field (field ("IFNULL(ProbeSetXRef.additive, '')" additive)) - '^^xsd:double)) - (set gnt:stdErr (annotate-field (field ("IFNULL(ProbeSetXRef.se, '')" stdErr)) - '^^xsd:double)) - (set gnt:pValue (annotate-field (field ("IFNULL(ProbeSetXRef.pValue, '')" pValue)) - '^^xsd:double)) - (set gnt:h2 (annotate-field (field ("IFNULL(ProbeSetXRef.h2, '')" h2)) - '^^xsd:double)) - (set gnt:belongsToDataset - (string->identifier - "" - (regexp-substitute/global #f "[^A-Za-z0-9:]" - (field ProbeSetFreeze Name) - 'pre "_" 'post) - #:separator "" - #:proc string-capitalize-first)))) - - - -(dump-with-documentation - (name "Probeset Summary Statistics") - (connection %connection-settings) - (table-metadata? #f) - (prefixes - '(("gn:" "<http://genenetwork.org/id/>") - ("gnc:" "<http://genenetwork.org/category/>") - ("gnt:" "<http://genenetwork.org/id/>") - ("skos:" "<http://www.w3.org/2004/02/skos/core#>") - ("owl:" "<http://www.w3.org/2002/07/owl#>") - ("rdf:" "<http://www.w3.org/1999/02/22-rdf-syntax-ns#>") - ("rdfs:" "<http://www.w3.org/2000/01/rdf-schema#>") - ("xsd:" "<http://www.w3.org/2001/XMLSchema#>"))) - (inputs - (list dump-probeset-data)) - (outputs - '(#:documentation "./docs/dump-probeset-summary-stats.md" - #:rdf "./verified-data/dump-probeset-summary-stats.ttl"))) |