forked from kbaseattic/KBaseRNASeq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKBaseRNASeq.spec
670 lines (556 loc) · 17.2 KB
/
KBaseRNASeq.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
#include <KBaseAssembly.spec>
#include <KBaseExpression.spec>
module KBaseRNASeq{
/* Importing datatype objects from other modules */
/*
Create an analysis id RNASeq analysis object
@id KBaseRNASeq.RNASeqAnalysis
*/
typedef string ws_rnaseq_analysis_id;
/*
reference genome id for mapping the RNA-Seq fastq file
@id ws KBaseGenomes.Genome
*/
typedef string ws_genome_id;
/*
Id for expression sample
@id ws KBaseExpression.ExpressionSample
*/
typedef string ws_expression_sample_id;
/*
List of Expression sample ids
*/
typedef list<ws_expression_sample_id> ws_expression_sample_ids;
/*
Id for KBaseAssembly.SingleEndLibrary
@id ws KBaseAssembly.SingleEndLibrary
*/
typedef string ws_singleEndLibrary_id;
/*
Id for KBaseGenomes.ContigSet
@id ws KBaseGenomes.ContigSet
*/
typedef string ws_reference_assembly_id;
/*
Id for KBaseAssembly.PairedEndLibrary
@id ws KBaseAssembly.PairedEndLibrary
*/
typedef string ws_pairedEndLibrary_id;
/*
Id for the handle object
*/
typedef string HandleId;
/*
@optional hid file_name type url remote_md5 remote_sha1
*/
typedef structure {
HandleId hid;
string file_name;
string id;
string type;
string url;
string remote_md5;
string remote_sha1;
} Handle;
/*
@optional genome_id genome_scientific_name
@metadata ws handle.file_name
@metadata ws handle.type
@metadata ws genome_scientific_name
@metadata ws genome_id
*/
typedef structure {
Handle handle;
ws_genome_id genome_id;
string genome_scientific_name;
} ReferenceAnnotation;
/*
Id for KBaseRNASeq.ReferenceAnnotation
@id ws KBaseRNASeq.ReferenceAnnotation
*/
typedef string ws_referenceAnnotation_id;
/*
@optional genome_id genome_scientific_name handle ftp_url
@metadata ws handle.file_name
@metadata ws handle.type
@metadata ws genome_id
@metadata ws genome_scientific_name
*/
typedef structure {
Handle handle;
ws_genome_id genome_id;
string ftp_url;
string genome_scientific_name;
}Bowtie2Indexes;
/*
Id for KBaseRNASeq.BowtieIndexes
@id ws KBaseRNASeq.BowtieIndexes
*/
typedef string ws_bowtieIndex_id;
/* Kbase SampleAnnotation ID */
typedef string sample_annotation_id;
/* Kbase OntologyID */
typedef string ontology_id;
/* list of Kbase Ontology IDs */
typedef list<ontology_id> ontology_ids;
/* Kbase OntologyName */
typedef string ontology_name;
/* Kbase OntologyDefinition */
typedef string ontology_definition;
/* Data structure for top level information for sample annotation and ontology */
typedef structure {
sample_annotation_id sample_annotation_id;
ontology_id ontology_id;
ontology_name ontology_name;
ontology_definition ontology_definition;
} SampleAnnotation;
/*
List of KBaseExpression.SampleAnnotation
*/
typedef list<SampleAnnotation> sample_annotations;
/* Specification for the RNASeqFastq Metadata
Object for the RNASeq Metadata
@optional platform source tissue condition source_id ext_source_date sample_desc title sample_annotations genome_id genome_scientific_name custom*/
typedef structure {
string sample_id;
string library_type;
string replicate_id;
string platform;
string sample_desc;
string title;
string source;
string source_id;
string ext_source_date;
string domain;
ws_genome_id genome_id;
string genome_scientific_name;
sample_annotations sample_annotations;
list<string> tissue;
list<string> condition;
string custom;
}RNASeqSampleMetaData;
/*
Complete List of RNASeq MetaData
*/
typedef list<RNASeqSampleMetaData> RNASeqSamplesMetaData;
/*
RNASeq fastq object
@optional singleend_sample pairedend_sample metadata analysis_id analysis_desc
@metadata ws analysis_id
@metadata ws analysis_desc
@metadata ws metadata.sample_id
@metadata ws metadata.replicate_id
@metadata ws metadata.library_type
@metadata ws metadata.platform
@metadata ws metadata.title
@metadata ws metadata.source
@metadata ws metadata.source_id
@metadata ws metadata.sample_desc
@metadata ws length(metadata.tissue)
@metadata ws length(metadata.condition)
@metadata ws metadata.genome_id
@metadata ws metadata.ext_source_date
@metadata ws length(metadata.sample_annotations)
*/
typedef structure {
KBaseAssembly.SingleEndLibrary singleend_sample;
KBaseAssembly.PairedEndLibrary pairedend_sample;
ws_rnaseq_analysis_id analysis_id;
string analysis_desc;
RNASeqSampleMetaData metadata;
}RNASeqSample;
/*
list of RNASeqSamples
*/
typedef list<RNASeqSample> RNASeqSamplesSet;
/*
The workspace id of a RNASeqSample
@id ws KBaseRNASeq.RNASeqSample
*/
typedef string ws_rnaseqSample_id;
/*
Object for the RNASeq Alignment bam file
@metadata ws metadata.sample_id
@metadata ws metadata.replicate_id
@metadata ws metadata.platform
@metadata ws metadata.title
@metadata ws metadata.source
@metadata ws metadata.source_id
@metadata ws metadata.ext_source_date
@metadata ws metadata.sample_desc
@metadata ws metadata.genome_id
@metadata ws length(metadata.tissue)
@metadata ws length(metadata.condition)
@metadata ws aligned_using
@metadata ws aligner_version
*/
typedef structure{
string aligned_using;
string aligner_version;
list<mapping<string opt_name, string opt_value>> aligner_opts;
Handle file;
RNASeqSampleMetaData metadata;
}RNASeqSampleAlignment;
/*
list of RNASeqSampleAlignment
*/
typedef list<RNASeqSampleAlignment> RNASeqSampleAlignmentSet;
/*
The workspace id for a RNASeqSampleAlignment object
@id ws KBaseRNASeq.RNASeqSampleAlignment
*/
typedef string ws_samplealignment_id;
/*
Object type to define replicate group
/*
typedef structure{
ws_rnaseq_analysis_id analysis_id;
string sample_name;
ws_rnaseqSample_ids sample_replicate_group;
}RNASeqSampleReplicateGroup;
/*
Object type to define id to RNASeqSampleReplicateGroup
@id ws KBaseRNASeq.RNASeqSampleReplicateGroup
*/
typedef string ws_RNASeqSampleReplicateGroup_id;
/*
The mapping object for the ws_rnaseqSample_id with the ws_samplealignment_id
*/
typedef mapping<ws_rnaseqSample_id sampleID,ws_samplealignment_id sampleAlignmentID> mapped_sample_alignment;
/*
The mapping object for the ws_rnaseqSample_id with the ws_expression_sample_id
*/
typedef mapping<ws_rnaseqSample_id sampleID,ws_expression_sample_id exp_sampleID> mapped_sample_expression;
/*
Object to Describe the RNASeq analysis
@optional experiment_desc num_replicates title platform genome_id source tissue condition annotation_id publication_id source_ids external_source_date sample_ids alignments expression_values sample_annotations_map genome_scientific_name sample_rep_groups alignments expression_values transcriptome_id cuffdiff_diff_exp_id
@metadata ws experiment_id
@metadata ws title
@metadata ws experiment_desc
@metadata ws experiment_design
@metadata ws platform
@metadata ws genome_id
@metadata ws genome_scientific_name
@metadata ws num_samples
@metadata ws num_replicates
@metadata ws annotation_id
*/
typedef structure {
string experiment_id;
string title;
string experiment_desc;
string experiment_design;
string platform;
ws_genome_id genome_id;
string genome_scientific_name;
int num_samples;
int num_replicates;
list<ws_rnaseqSample_id> sample_ids;
list<ws_RNASeqSampleReplicateGroup_id> sample_rep_groups;
list<mapped_sample_alignment> alignments;
list<mapped_sample_expression> expression_values;
string transcriptome_id;
string cuffdiff_diff_exp_id;
list<string> tissue;
list<string> condition;
list<mapping<string sample_name,sample_annotations>> sample_annotations_map;
ws_referenceAnnotation_id annotation_id;
string source;
string Library_type;
string publication_id;
list<string> source_ids;
string external_source_date;
}RNASeqAnalysis;
/*
Object for RNASeq Merged transcriptome assembly
@metadata ws analysis.experiment_id
@metadata ws analysis.title
@metadata ws analysis.Library_type
@metadata ws analysis.platform
@metadata ws analysis.num_samples
@metadata ws analysis.num_replicates
@metadata ws length(analysis.sample_ids)
@metadata ws length(analysis.tissue)
@metadata ws length(analysis.condition)
/*
typedef structure{
Handle file;
RNASeqAnalysis analysis;
}RNASeqCuffmergetranscriptome;
/*
Object RNASeqDifferentialExpression file structure
*/
typedef structure {
Handle file;
RNASeqAnalysis analysis;
}RNASeqCuffdiffdifferentialExpression;
/* FUNCTIONS used in the service */
/* Function parameters to call fastqc */
typedef structure{
ws_rnaseqSample_id sample_id;
string output_obj_name;
list<mapping<string parameter ,string values>> results;
}fastqcParams;
async funcdef fastqcCall(fastqcParams params)
returns(string job_id) authentication required;
typedef structure{
string ws_id;
ws_singleEndLibrary_id singleend_sample;
ws_pairedEndLibrary_id pairedend_sample;
ws_rnaseq_analysis_id analysis_id;
string sample_id;
string library_type;
string replicate_id;
string platform;
string sample_desc;
string title;
string source;
string source_id;
string ext_source_date;
string domain;
ws_genome_id genome_id;
list<string> tissue;
list<string> condition;
}associateReadsParams;
async funcdef associateReads(associateReadsParams params)
returns(UnspecifiedObject) authentication required;
typedef structure{
string ws_id;
string experiment_id;
string title;
string experiment_desc;
string experiment_design;
string platform;
ws_genome_id genome_id;
int num_samples;
int num_replicates;
list<ws_rnaseqSample_id> sample_ids;
list<string> tissue;
list<string> condition;
ws_referenceAnnotation_id annotation_id;
string source;
string Library_type;
string publication_id;
string source_id;
string external_source_date;
}SetupRNASeqAnalysisParams;
async funcdef SetupRNASeqAnalysis(SetupRNASeqAnalysisParams params)
returns(UnspecifiedObject) authentication required;
typedef structure{
string ws_id;
ws_reference_assembly_id reference;
string output_obj_name;
}Bowtie2IndexParams;
async funcdef BuildBowtie2Index(Bowtie2IndexParams params)
returns(UnspecifiedObject) authentication required;
typedef structure{
int skip;
int upto;
int trim5;
int trim3;
string phred33;
string phred64;
string int-quals;
string local;
string end-to-end;
string very-fast;
string fast;
string very-sensitive;
string sensitive;
string very-fast-local;
string very-sensitive-local;
string fast-local;
string fast-sensitive;
int N;
int L;
int dpad;
int gbar;
int ma;
int mp;
int np;
int threads;
int offrate;
string qc-filter;
string seed;
string non-deterministic;
}b_opts;
typedef mapping<string Bowtie2_opts,b_opts opts_bowtie2> b_opts_str;
typedef structure{
string ws_id;
ws_rnaseqSample_id sample_id;
ws_bowtieIndex_id bowtie2_index;
string output_obj_name;
b_opts_str opts_dict;
}Bowtie2Params;
async funcdef Bowtie2Call(Bowtie2Params params)
returns(string job_id) authentication required;
typedef structure{
string read-mismatches;
string read-gap-length;
int read-edit-dist;
int read-realign-edit-dist;
string bowtie1;
string output-dir;
int mate-inner-dist;
int mate-std-dev;
int min-anchor-length;
int splice-mismatches;
int min-intron-length;
int max-intron-length;
int max-insertion-length;
int num-threads;
int max-multihits;
string report-secondary-alignments;
string no-discordant;
string no-mixed;
string no-coverage-search;
string coverage-search;
string microexon-search;
string library-type;
int segment-mismatches;
int segment-length;
int min-segment-intron;
int max-segment-intron;
int min-coverage-intron;
int max-coverage-intron;
string b2-very-fast;
string b2-fast;
string b2-sensitive;
string b2-very-sensitive;
string fusion-search;
int fusion-anchor-length;
int fusion-min-dist;
int fusion-read-mismatches;
int fusion-multireads;
int fusion-multipairs;
string fusion-ignore-chromosomes;
}t_opts;
typedef mapping<string Tophat_opts,t_opts opts_tophat> t_opts_str;
typedef structure{
string ws_id;
ws_rnaseqSample_id sample_id;
string output_obj_name;
ws_reference_assembly_id reference;
ws_bowtieIndex_id bowtie_index;
/* t_opts_str opts_dict; */
int read_mismatches;
int read_gap_length;
int read_edit_dist;
int min_intron_length;
int max_intron_length;
int num_threads;
string report_secondary_alignments;
string no_coverage_search;
string library_type;
ws_referenceAnnotation_id annotation_gtf;
}TophatParams;
async funcdef TophatCall(TophatParams params)
returns (UnspecifiedObject) authentication required;
typedef structure{
int num_threads;
string library-type;
string library-norm-method;
int frag-len-mean;
int frag-len-std-dev;
string upper-quartile-norm;
string total-hits-norm;
string compatible-hits-norm;
int max-mle-iterations;
int max-bundle-frags;
string no-effective-length-correction;
string no-length-correction;
float min-isoform-fraction;
float pre-mrna-fraction;
int max-intron-length;
float junc-alpha;
string small-anchor-fraction;
int min-frags-per-transfrag;
int overhang-tolerance;
int max-bundle-length;
int min-intron-length;
int trim-3-avgcov-thresh;
int trim-3-dropoff-frac;
float max-multiread-fraction;
}opts_cufflinks;
typedef mapping <string Cufflinks_opts,opts_cufflinks> cuff_opts;
typedef structure{
string ws_id;
ws_samplealignment_id alignment_sample_id;
string output_obj_name;
ws_referenceAnnotation_id annotation_gtf;
cuff_opts opts_dict;
}CufflinksParams;
async funcdef CufflinksCall(CufflinksParams params)
returns (UnspecifiedObject) authentication required;
typedef structure{
string ws_id;
RNASeqAnalysis analysis;
string output_obj_name;
mapping <string Cuffmerge_opts, int num_threads> opts_dict;
}CuffmergeParams;
async funcdef CuffmergeCall(CuffmergeParams params)
returns (UnspecifiedObject) authentication required;
typedef structure{
int num-threads;
string time-series;
string total-hits-norm;
string compatible-hits-norm;
string multi-read-correct;
string min-alignment-count;
float FDR;
string library-type;
string library-norm-method;
string dispersion-method;
int frag-len-mean;
int frag-len-std-dev;
int max-mle-iterations;
string poisson-dispersion;
}opts_cuffdiff;
typedef mapping <string diff_opts,opts_cuffdiff> cuffdiff_opts;
typedef structure{
string ws_id;
RNASeqAnalysis rnaseq_exp_details;
string output_obj_name;
ws_referenceAnnotation_id annotation_gtf;
cuffdiff_opts opts_dict;
}CuffdiffParams;
async funcdef CuffdiffCall(CuffdiffParams params)
returns (UnspecifiedObject) authentication required;
typedef structure{
string ws_id;
/*ws_samplealignment_id alignment_sample_id;*/
string alignment_sample_id;
string output_obj_name;
}AlignmentStatsParams;
async funcdef getAlignmentStats(AlignmentStatsParams params)
returns (UnspecifiedObject) authentication required;
typedef structure{
string ws_id;
ws_expression_sample_id expression_sample;
int number_of_bins;
string output_obj_name;
}ExpressionHistogramParams;
async funcdef createExpressionHistogram(ExpressionHistogramParams params)
returns (UnspecifiedObject) authentication required;
typedef structure{
string ws_id;
RNASeqAnalysis analysis;
string out_obj_name;
}ExpressionSeriesParams;
typedef structure{
string ws_id;
RNASeqAnalysis analysis;
string out_obj_name;
}CummeRbundParams;
async funcdef cummeRbundCall(CummeRbundParams params)
returns (UnspecifiedObject) authentication required;
async funcdef createExpressionSeries(ExpressionSeriesParams params)
returns (UnspecifiedObject) authentication required;
typedef structure{
string ws_id;
RNASeqAnalysis rnaseq_exp_details;
string out_obj_name; /* final expression matrix name */
}ExpressionMatrixParams;
funcdef createExpressionMatrix(ExpressionMatrixParams params)
returns (UnspecifiedObject) authentication required;
};