Unverified Commit 50adae24 authored by Ridwan Amode's avatar Ridwan Amode Committed by GitHub
Browse files

Blast config file update (#720)

* Blast config file update
update blast config file with finalised parameters and values and to deal with wordsize limit for each program
parent d1d0389a
Pipeline #260358 passed with stages
in 6 minutes and 34 seconds
......@@ -43,7 +43,8 @@ import type {
BlastSelectSetting,
BlastBooleanSetting,
BlastParameterName,
BlastSettingsConfig
BlastSettingsConfig,
Option
} from 'src/content/app/tools/blast/types/blastSettings';
import styles from './BlastSettings.scss';
......@@ -236,7 +237,11 @@ const BlastSettings = ({ config }: Props) => {
onBlastParameterChange('match_scores', value)
})}
{buildSelect({
...(config.parameters['wordsize'] as BlastSelectSetting),
options: config.programs_parameters_override.wordsize[blastProgram]
? config.programs_parameters_override.wordsize[blastProgram]
.options
: (config.parameters.wordsize.options as Option[]),
label: config.parameters.wordsize.label,
selectedOption: blastParameters.wordsize as string,
onChange: (value: string) =>
onBlastParameterChange('wordsize', value)
......@@ -284,7 +289,7 @@ const BlastJobName = () => {
// to be replaced with a simple select component
const buildSelect = (setting: {
options: { label: string; value: string }[];
options: Option[];
label: string;
selectedOption: string;
onChange: (value: string) => void;
......
......@@ -42,7 +42,7 @@ export type BlastProgram =
| 'blastp'
| 'blastx';
type Option = {
export type Option = {
label: string;
value: string;
};
......@@ -85,6 +85,14 @@ type ProgramConfiguration = {
programs: BlastProgram[];
};
type ProgramParametersOverride = {
[BlastParameterName: string]: {
[program: string]: {
options: Option[];
};
};
};
type Defaults = {
database: string;
};
......@@ -92,6 +100,7 @@ type Defaults = {
export type BlastSettingsConfig = {
parameters: Record<BlastParameterName, BlastSetting>;
programs_configurator: ProgramConfiguration[];
programs_parameters_override: ProgramParametersOverride;
database_sequence_types: Record<string, SequenceType>;
defaults: Defaults;
presets: Presets;
......
......@@ -51,10 +51,6 @@
"description": "Maximum number of match alignments reported in the result output.",
"type": "select",
"options": [
{
"label": "0",
"value": "0"
},
{
"label": "5",
"value": "5"
......@@ -106,10 +102,6 @@
"description": "Maximum number of match score summaries reported in the result output.",
"type": "select",
"options": [
{
"label": "0",
"value": "0"
},
{
"label": "5",
"value": "5"
......@@ -161,6 +153,26 @@
"description": "Maximum number of HSPs (alignments) to keep for any single query-subject pair.",
"type": "select",
"options": [
{
"label": "1",
"value": "1"
},
{
"label": "2",
"value": "2"
},
{
"label": "5",
"value": "5"
},
{
"label": "10",
"value": "10"
},
{
"label": "50",
"value": "50"
},
{
"label": "100",
"value": "100"
......@@ -308,45 +320,41 @@
"type": "select",
"options": [
{
"label": "1,-4",
"value": "1,-4"
"label": "1,-1",
"value": "1,-1"
},
{
"label": "2,-7",
"value": "2,-7"
"label": "1,-2",
"value": "1,-2"
},
{
"label": "1,-3",
"value": "1,-3"
},
{
"label": "2,-5",
"value": "2,-5"
},
{
"label": "1,-2",
"value": "1,-2"
"label": "1,-4",
"value": "1,-4"
},
{
"label": "2,-3",
"value": "2,-3"
},
{
"label": "1,-1",
"value": "1,-1"
"label": "2,-5",
"value": "2,-5"
},
{
"label": "5,-4",
"value": "5,-4"
"label": "2,-7",
"value": "2,-7"
},
{
"label": "4,-5",
"value": "4,-5"
},
},
{
"label": "N/A",
"value": ""
}
"label": "5,-4",
"value": "5,-4"
}
]
},
"wordsize": {
......@@ -354,17 +362,33 @@
"description": "Word size for wordfinder algorithm",
"type": "select",
"options": [
{
"label": "2",
"value": "2"
},
{
"label": "3",
"value": "3"
},
{
"label": "4",
"value": "4"
},
{
"label": "5",
"value": "5"
},
{
"label": "6",
"value": "6"
},
{
"label": "11",
"value": "11"
"label": "7",
"value": "7"
},
{
"label": "28",
"value": "28"
"label": "8",
"value": "8"
}
]
},
......@@ -508,10 +532,18 @@
"label": "6",
"value": "6"
},
{
"label": "7",
"value": "7"
},
{
"label": "8",
"value": "8"
},
{
"label": "9",
"value": "9"
},
{
"label": "10",
"value": "10"
......@@ -554,10 +586,6 @@
{
"label": "PAM250",
"value": "PAM250"
},
{
"label": "NONE",
"value": "NONE"
}
]
}
......@@ -589,6 +617,92 @@
"programs": ["blastp"]
}
],
"programs_parameters_override": {
"wordsize": {
"blastn" : {
"options": [
{
"label": "2",
"value": "2"
},
{
"label": "3",
"value": "3"
},
{
"label": "4",
"value": "4"
},
{
"label": "5",
"value": "5"
},
{
"label": "6",
"value": "6"
},
{
"label": "7",
"value": "7"
},
{
"label": "8",
"value": "8"
},
{
"label": "9",
"value": "9"
},
{
"label": "10",
"value": "10"
},
{
"label": "11",
"value": "11"
},
{
"label": "12",
"value": "12"
}, {
"label": "13",
"value": "13"
}, {
"label": "14",
"value": "14"
},
{
"label": "15",
"value": "15"
}
]
},
"tblastx": {
"options": [
{
"label": "2",
"value": "2"
},
{
"label": "3",
"value": "3"
},
{
"label": "4",
"value": "4"
},
{
"label": "5",
"value": "5"
},
{
"label": "6",
"value": "6"
}
]
}
}
},
"defaults": {
"program": "blastn",
"database": "dna"
......@@ -773,7 +887,7 @@
"exp": "1e-1",
"gapopen": "2",
"gapext": "2",
"wordsize": "3",
"wordsize": "6",
"match_scores": "1,-1"
},
"near_match": {
......@@ -787,7 +901,7 @@
"exp": "1e-1",
"gapopen": "2",
"gapext": "2",
"wordsize": "3",
"wordsize": "6",
"match_scores": "1,-1"
},
"distant_homologies": {
......@@ -801,7 +915,7 @@
"exp": "1e-1",
"gapopen": "2",
"gapext": "2",
"wordsize": "3",
"wordsize": "6",
"match_scores": "1,-1"
}
},
......@@ -817,7 +931,7 @@
"exp": "1e-1",
"gapopen": "2",
"gapext": "2",
"wordsize": "3",
"wordsize": "6",
"match_scores": "1,-1"
},
"near_match": {
......@@ -831,7 +945,7 @@
"exp": "1e-1",
"gapopen": "2",
"gapext": "2",
"wordsize": "3",
"wordsize": "6",
"match_scores": "1,-1"
},
"distant_homologies": {
......@@ -845,7 +959,7 @@
"exp": "1e-1",
"gapopen": "2",
"gapext": "2",
"wordsize": "3",
"wordsize": "6",
"match_scores": "1,-1"
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment