Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
from __future__ import print_function, absolute_import, division
import logging
import os
from errno import EACCES
from os.path import realpath
from threading import Lock
from threading import Thread
from time import sleep
# Support for background execution
alive_flag = True
def alive_msg_task ():
while alive_flag:
sleep ( 30 )
print ( "Still working, please wait...", end = " ", flush = True )
print ( "\nDownload completed" )
PREFIX bk: <http://knetminer.org/data/rdf/terms/biokno/> PREFIX bkr: <http://knetminer.org/data/rdf/resources/>
PREFIX bka: <http://knetminer.org/data/rdf/terms/biokno/attributes/> PREFIX bkg: <http://knetminer.org/data/rdf/resources/graphs/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX agri: <http://agrischemas.org/>
PREFIX bioschema: <http://bioschemas.org/> PREFIX schema: <http://schema.org/>
SELECT ?pubTitle ?geneName ?scoreStr ?condLabel ?condTerm
{
?pub a agri:ScholarlyPublication;
@marco-brandizi
marco-brandizi / swat4l-2022-knetminer-ex.txt
Created January 10, 2022 12:38
Sample investigation for knetminer
Go here: https://knetminer.com/Triticum_aestivum/
Search keywords:
“slow growth” OR “dwarf stature” OR “SUMO Activating Enzyme Complex” OR “after 281 spraying mutant plants” OR “coleoptile length” OR “growth” OR “cell division” OR “cell 282 proliferation” OR “inflorescence” OR “carbohydrate metabolism” OR “photosynthesis” 283 OR “grain number” OR “grain weight” OR “grain hardness” OR “spikelets” OR “tillers” 284 OR “photoperiod” OR “vernalization” OR “vernalisation”
Gene List:
TraesCS3B02G319000
TraesCS3D02G284900
TraesCS7A02G356100
TraesCS7A02G356200
#!/usr/bin/env bash
# Downloads multiple files available from an HTML URL, typically the web listing of a directory,
# as it is rendered by many web servers.
# ==> Requires lftp
#
set -e
# Example:
#  ./files-from-url.sh https://knetminer.com/downloads/agri-schemas/gxa/v202110/ gxa
package info.marcobrandizi.test.jdk11;
/*
* These deps are needed:
* org.apache.commons:commons-lang3:3.9
* com.machinezoo.noexception:noexception:1.3.2
*/
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

Counts the data sources used in the wheat dataset. Try it [here][10].

PREFIX bk: <http://knetminer.org/data/rdf/terms/biokno/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bkg: <http://knetminer.org/data/rdf/resources/graphs/>

SELECT DISTINCT ?dataSource (COUNT (DISTINCT ?e) AS ?resources)
FROM bkg:wheat
{
var o = new Foo ("one");
map.put ( o, o )
...
var o1 = new Foo ( "one" )
...
var o2 = map.get ( o1 ) // fetches o if .equals()/.hashCode() tells that they're equal
// Notice the static imports, these makes the syntax below so compact
// (and the IDE will auto-define this section)
import ondex.fluent.EntityFilter.FluentGraphWrapper
import static ondex.fluent.EntityFilter.byType;
import static ondex.fluent.EntityFilter.byDoubleAttribute;
import static ondex.fluent.ConceptFilter.byAccession;
import static ondex.fluent.Filter.byRegEx;
import static ondex.fluent.EntityComparator;
import static ondex.fluent.ConceptMapper.fromRelations;
import static ondex.fluent.RelationMapper.toConcepts;
MATCH (pway:Path{prefName:"chlorophyll a biosynthesis I"}) - [po:part_of] - (comp)
RETURN *
LIMIT 20