Optimization of retention time prediction
Created: 2013-08-13 16:39:50
Last updated: 2013-09-04 07:20:45
The workflow uses RTCalc from the TPP toolbox to perform two different retention time predictions. The third branch uses a linear retention time predictor (Palmblad et al., 2002). The workflow has a flag that switches on a specific branch.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (0)
Titles (0)
Descriptions (0)
Dependencies (0)
Inputs (6)
Name |
Description |
min_probability |
|
flag |
|
k_fold |
|
numbers |
|
peptides |
|
probabilities |
|
Processors (5)
Name |
Type |
Description |
Create_CV_Data |
beanshell |
Scriptpublic int[][] cv(int length, int k ) {
Random r = new Random();
int[] inds = new int[length];
// initialize indicies
for (int i = 0; i < length; i++)
{
inds[i] = i;
}
// now shuffle indicies for 2 times
for (int st = 0; st < 2; st++)
{
for (int i = 0; i < length - 1; i++)
{
// r is in [i + 1, length)
int re = i + 1 + r.nextInt( length - i - 1);
int temp = inds[i];
inds[i] = inds[re];
inds[re] = temp;
}
}
// now divide the shuffled indices into folds
int[][] folds = new int[k][];
int foldLength = length / k;
int lastFoldLength = length - ((k - 1) * foldLength);
for (int ki = 0; ki < k; ki++)
{
if (ki < k - 1)
{
folds[ki] = new int[foldLength];
System.arraycopy(inds, ki * foldLength, folds[ki], 0, foldLength);
// Array.Copy(inds, ki * foldLength, folds[ki], 0, foldLength);
}
else
{
folds[ki] = new int[lastFoldLength];
System.arraycopy(inds, ki * foldLength, folds[ki], 0, lastFoldLength);
// Array.Copy(inds, ki * foldLength, folds[ki], 0, lastFoldLength);
}
java.util.Arrays.sort(folds[ki]);
}
return folds;
}
//-----------------------------------------------------------------------------------------
String[] probabilities1 = probability_number.split("\n");
String[] peptides1 = peptide_list.split("\n");
String[] numbers1 = scan_numbers.split("\n");
ArrayList probabilities = new ArrayList(Arrays.asList(probabilities1));
ArrayList peptides = new ArrayList(Arrays.asList(peptides1));
ArrayList numbers = new ArrayList(Arrays.asList(numbers1));
Double rem =new Double(min_probability);
Integer k_fold =new Integer(k_fold);
int removed=0;
probabilities_new =probabilities;
for (i=0; i rem)){
peptides.remove(i-removed);
numbers.remove(i-removed);
probabilities_new.remove(i-removed);
removed++;
}
}
int fla= new Integer(flag);
flag_rt= new ArrayList();
flag_RT_Calc= new ArrayList();
flag_ANN= new ArrayList();
double min= Double.parseDouble(numbers.get(0));
double max=0;
HashMap map = new HashMap();
for (int a=0; amax){max=num;}
if(num max) {
max = num;
}
if (num < min) {
min = num;
}
if ((c != k_fold - 1)) {
out1 = out1 + pep + "\t" + num + "\n";
} else {
out2 = out2 + pep + "\t" + num + "\n";
out4 = out4 + pep + " ";
}
}
if ((c == k_fold - 1)) {
val_flat_string =val_flat_string +out4;
val_string=val_string+out2;
} else {
outtrain = outtrain + out1;
}
}
validation_flat.add(val_flat_string);
out_validation.add(val_string);
out_train.add(outtrain);
} |
Retention_Time_ANN |
workflow |
|
Retention_Time_rt |
workflow |
|
Retention_Time_RTCalc |
workflow |
|
Measure_RMSD |
beanshell |
ScriptArrayList list = new ArrayList();
if (in1.size()!=0){
list=in1;
}
if (in2.size()!=0){
list=in2;
}
if (in3.size()!=0){
list=in3;
}
Double sum=0;
Double mean=0;
for(i=0;i |
Beanshells (2)
Name |
Description |
Inputs |
Outputs |
Create_CV_Data |
|
min_probability
probability_number
peptide_list
scan_numbers
flag
k_fold
|
out_train
out_validation
validation_flat
min
max
flag_rt
flag_RT_Calc
flag_ANN
|
Measure_RMSD |
|
in1
in2
in3
|
rmsd
|
Datalinks (21)
Source |
Sink |
min_probability |
Create_CV_Data:min_probability |
flag |
Create_CV_Data:flag |
k_fold |
Create_CV_Data:k_fold |
probabilities |
Create_CV_Data:probability_number |
peptides |
Create_CV_Data:peptide_list |
numbers |
Create_CV_Data:scan_numbers |
Create_CV_Data:flag_ANN |
Retention_Time_ANN:ANN_flag |
Create_CV_Data:out_train |
Retention_Time_ANN:ANN_train_set |
Create_CV_Data:out_validation |
Retention_Time_ANN:ANN_validation |
Create_CV_Data:validation_flat |
Retention_Time_ANN:ANN_validation_flat |
Create_CV_Data:out_validation |
Retention_Time_rt:rt_validation |
Create_CV_Data:out_train |
Retention_Time_rt:rt_train_set |
Create_CV_Data:flag_rt |
Retention_Time_rt:rt_flag |
Create_CV_Data:validation_flat |
Retention_Time_RTCalc:validation_flat |
Create_CV_Data:out_train |
Retention_Time_RTCalc:train_set |
Create_CV_Data:out_validation |
Retention_Time_RTCalc:validation |
Create_CV_Data:flag_RT_Calc |
Retention_Time_RTCalc:flag |
Retention_Time_ANN:RTCalc_ANN_RMSD |
Measure_RMSD:in1 |
Retention_Time_rt:rt_RMSD |
Measure_RMSD:in2 |
Retention_Time_RTCalc:RTCalc_RMSD |
Measure_RMSD:in3 |
Measure_RMSD:rmsd |
RMSD |
Uploader
License
All versions of this Workflow are
licensed under:
Version 1
(of 1)
Credits (3)
(People/Groups)
Attributions (1)
(Workflows/Files)
Shared with Groups (0)
None
Featured In Packs (0)
None
Log in to add to one of your Packs
Attributed By (0)
(Workflows/Files)
None
Favourited By (0)
No one
Statistics
Other workflows that use similar services
(0)
There are no workflows in myExperiment that use similar services to this Workflow.
Comments (0)
No comments yet
Log in to make a comment