Category:ZINC15:Shell: Difference between revisions

From DISI
Jump to navigation Jump to search
(adsf)
 
No edit summary
 
Line 21: Line 21:
                                   ~Genes.notes.any(ActivityObservation.substance.has(Substance.purchasable >= 10)))
                                   ~Genes.notes.any(ActivityObservation.substance.has(Substance.purchasable >= 10)))
    
    
[[Category:ZINC]]
[[Category:ZINC15]]
[[Category:Idioms]]
[[Category:Idioms]]

Latest revision as of 22:24, 4 January 2019

ZINC Shell Idioms

Starting the ZINC shell (from an environment with ZINC15 installed)

   >>> python -m zinc.management shell

Examples

Querying for substances

   >>> subs = Substance.query.filter(Substance.mwt < 500).all()

==== Querying for eukaryotic genes with strong activity observations (notes)

   >>> genes = Gene.query.filter(Genes.organism.has(Organism.code == 'E'), Genes.notes.any(ActivityObservation.affinity > 6))

==== Quering for eukaryotic Genes with strong activities and also no purchasable compounds

   >>> genes = Gene.query.filter(Genes.organism.has(Organism.code == 'E'), \
                                 Genes.notes.any(ActivityObservation.affinity > 6), \
                                 ~Genes.notes.any(ActivityObservation.substance.has(Substance.purchasable >= 10)))

This category currently contains no pages or media.