Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
210 changes: 210 additions & 0 deletions python/local/BlastLocalColumnSearch_subset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
id: d35172ce-5e4b-945a-631d-14e47c9a1fc6
name: Blast Local Column Search (subset)
description: Performs a BLAST search of user selected databases using queries from a sequence column. Pre-configured BLAST databases can be downloaded from https://tinyurl.com/3d38p356
category: Biopolymer
version: 1.2.0
serviceName: BlastLocalColumnSearch
serviceUri: glysade.python
executorId: Glysade.CPythonDataFxn
inputFields:
- control:
id: sequenceColumn
label: Select sequence column
type: columnselect
filters:
- dataType: string
contentType:
- chemical/x-sequence
- dataType: binary
contentType: chemical/x-genbank
validationRules:
- type: required
message: Must select column of sequences
limitByControlId: limitByField
request:
id: sequenceColumn
dataType: string
selectorType: column
- control:
id: idColumn
label: ID Column (optional)
type: columnselect
multi: !!bool false
filters:
- dataType:
- string
- int
contentType: []
tooltip: ID column is not required for Genbank encoded sequences
limitByControlId: limitByField
request:
id: idColumn
dataType: string
selectorType: column
- control:
id: method
label: Select method
type: select
options:
- text: 'BLASTP: protein(q)-protein(d)'
value: BLASTP
- text: 'BLASTN: nucleotide(q)-nucleotide(d)'
value: BLASTN
- text: 'BLASTX: nucleotide(q)+translation-protein(d)'
value: BLASTX
- text: 'TBLASTN: protein(q)-nucleotide(d)+translation'
value: TBLASTN
- text: 'TBLASTX: nucleotide(q)+translation-nucleotide(d)+translation'
value: TBLASTX
validationRules:
- type: required
request:
id: method
dataType: string
data: BLASTP
- control:
id: databaseName
label: Select database
type: select
options:
- text: Human NCBI NR
value: human_nr
- text: Human Uniprot SwissProt
value: up_sp_human
- text: Human Uniprot Trembl
value: up_tbl_human
- text: Human PDB
value: human_pdbaa
- text: Human Patented Proteins
value: human_pataa
- text: Human IG Germline (Proteins)
value: human_IG_germline
- text: Human NCBI NT
value: human_nt
- text: Human EBI ENA
value: ena_cd_human
- text: Human Patented Nucleotides
value: human_patnt
- text: Mouse NCBI NR
value: mouse_nr
- text: Mouse PDB
value: mouse_pdbaa
- text: Mouse Patented Proteins
value: mouse_pataa
- text: Mouse NCBI NT
value: mouse_nt
- text: Mouse Patented Nucleotides
value: mouse_patnt
- text: Rat NCBI NR
value: rat_nr
- text: Rat PDB
value: rat_pdbaa
- text: Rat Patented Proteins
value: rat_pataa
- text: Rat NCBI NT
value: rat_nt
- text: Rat Patented Nucleotides
value: rat_patnt
validationRules:
- type: required
request:
id: databaseName
dataType: string
- control:
id: maxHits
label: Max hits
type: text
validationRules:
- type: required
message: Must enter a value between 1 and 5000
- type: range
min: !!int 1
max: !!int 5000
message: Max hits must be a value between 1 and 5000
request:
id: maxHits
dataType: integer
data: !!int 100
- control:
id: blastDbPath
label: Directory containing BLAST databases
type: file
mode: path
pathType: folder
validationRules:
- type: required
message: ''
request:
id: blastDbPath
dataType: string
data: C:\db\ncbi
- control:
id: limitByField
label: Apply data function to
type: limitby
request:
- id: limitByField
dataType: string
field: limitBy
data: none
- id: limitByFieldMarking
dataType: string
field: marking
tags:
- color: '#337abc'
text: sequence
- color: '#f7cb2d'
text: search
ironPython: |
####################################################
# Copyright 2022 Glysade LLC, All Rights Reserved #
####################################################

import sys,clr
from Spotfire.Dxp.Data import DataTable, DataManager
from Spotfire.Dxp.Application import PanelTypeIdentifiers
from Spotfire.Dxp.Application import Panel
import Spotfire.Dxp.Application.PanelCollection

from System import AppDomain
for asm in AppDomain.CurrentDomain.GetAssemblies():
if asm.GetName().Name == 'Charts':
clr.AddReference(asm.FullName)

from Charts import ChartsModel
model_type = ChartsModel

#tableId pass in args
dataTable = ResultTables[0]

if not dataTable:
raise Exception('target table not found')

page = Document.Pages.AddNew('Blast (local) column query Results')
panelsToHide = [PanelTypeIdentifiers.DataPanel, PanelTypeIdentifiers.DetailsOnDemandPanel]

for panel in page.Panels:
if panel.TypeId in panelsToHide:
if panel.Visible:
panel.Visible = False

filteringScheme = Document.FilteringSchemes[0]
page.FilterPanel.FilteringSchemeReference = filteringScheme

tableVis = page.Visuals.AddNew[model_type]()
tableVis.SetKeyValue('visualization','table-visualization')
tableVis.DataTable = dataTable
tableVis.ConfigureColumns()
tableVis.Marking = Document.Data.Markings.DefaultMarkingReference

tableVis.SetActiveVisual()
page.AutoConfigure()
updateBehavior: manual
maximumOutputColumns: !!int 0
maximumOutputTables: !!int 1
chemistryFunction: !!bool false
allowedClients:
- Analyst
demoUrl: https://youtu.be/v7leIlBaiz4
minimumChartsVersion: 4.4.0.0
confirmSubmit: