From a002190cd1b9b3676e824837c7645169a1544e6f Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Wed, 30 Aug 2023 18:10:07 +0300 Subject: Delete this probeset-data tranform * examples/probeset-data.scm: Delete. Signed-off-by: Munyoki Kilyungi --- examples/probeset-data.scm | 98 ---------------------------------------------- 1 file changed, 98 deletions(-) delete mode 100755 examples/probeset-data.scm (limited to 'examples') diff --git a/examples/probeset-data.scm b/examples/probeset-data.scm deleted file mode 100755 index ebb6a92..0000000 --- a/examples/probeset-data.scm +++ /dev/null @@ -1,98 +0,0 @@ -#! /usr/bin/env guile -!# - -(use-modules (srfi srfi-1) - (srfi srfi-26) - (ice-9 match) - (ice-9 regex) - (transform strings) - (transform sql) - (transform triples) - (transform special-forms)) - - - -(define %connection-settings - (call-with-input-file (list-ref (command-line) 1) - read)) - - - -(define-transformer 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)))) - - - -(with-documentation - (name "Probeset Summary Statistics") - (connection %connection-settings) - (table-metadata? #f) - (prefixes - '(("gn:" "") - ("gnc:" "") - ("gnt:" "") - ("skos:" "") - ("owl:" "") - ("rdf:" "") - ("rdfs:" "") - ("xsd:" ""))) - (inputs - (list probeset-data)) - (outputs - '(#:documentation "./docs/probeset-summary-stats.md" - #:rdf "./verified-data/probeset-summary-stats.ttl"))) -- cgit v1.2.3