Mercurial > repos > matthias > dada2_removebimeradenovo
comparison dada2_datatype.py @ 0:01159d734fc9 draft
planemo upload for repository https://github.com/bernt-matthias/mb-galaxy-tools/tree/topic/dada2/tools/dada2 commit d63c84012410608b3b5d23e130f0beff475ce1f8-dirty
author | matthias |
---|---|
date | Fri, 08 Mar 2019 06:38:25 -0500 |
parents | |
children | 8b1355f37137 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:01159d734fc9 |
---|---|
1 # -*- coding: utf-8 -*- | |
2 """ | |
3 dada2 datatypes | |
4 | |
5 Author: m.bernt@ufz.de | |
6 """ | |
7 | |
8 import logging | |
9 import os,os.path,re | |
10 from galaxy.datatypes.binary import RData | |
11 from galaxy.datatypes.tabular import Tabular | |
12 | |
13 log = logging.getLogger(__name__) | |
14 | |
15 | |
16 class dada_derep( Tabular ): | |
17 """ | |
18 datatype for dada2's derep-class | |
19 | |
20 - table shows the $uniques member of the list | |
21 - additional file contains the Rdata | |
22 """ | |
23 file_ext = "dada2_derep" | |
24 composite_type = 'basic' | |
25 allow_datatype_change = False | |
26 blurb = "dereplicated sequences" | |
27 | |
28 def __init__(self, **kwd): | |
29 """Initialize derep datatype""" | |
30 super(dada_derep, self).__init__(**kwd) | |
31 self.add_composite_file( 'Rdata', is_binary = True, optional = False ) | |
32 self.column_names = ['unique sequence', 'abundance'] | |
33 | |
34 class dada_dada( RData ): | |
35 """ | |
36 datatype for dada2's dada-class | |
37 """ | |
38 file_ext = "dada2_dada" | |
39 blurb = "result of dada" | |
40 | |
41 class dada_errorrates( Tabular ): | |
42 """ | |
43 datatype for dada2's result of learnErrors | |
44 | |
45 - table shows the $err_out member of the list | |
46 - additional file contains the Rdata | |
47 """ | |
48 file_ext = "dada2_errorrates" | |
49 blurb = "learned error rates" | |
50 def __init__(self, **kwd): | |
51 """Initialize derep datatype""" | |
52 super(dada_errorrates, self).__init__(**kwd) | |
53 self.add_composite_file( 'Rdata', is_binary = True, optional = False ) | |
54 self.column_names = ['transition'] + [ str(_) for _ in range(0,41) ] | |
55 | |
56 class dada_mergepairs( Tabular ): | |
57 """ | |
58 datatype for dada2's result of mergePairs (a data frame) | |
59 | |
60 - the data is stored as table (wo additional Rdata) | |
61 """ | |
62 file_ext = "dada2_mergepairs" | |
63 blurb = "merged reads" | |
64 def __init__(self, **kwd): | |
65 """Initialize derep datatype""" | |
66 super(dada_mergepairs, self).__init__(**kwd) | |
67 self.column_names = ['abundance', 'sequence', 'forward', 'reverse', 'nmatch', 'nmismatch', 'nindel', 'prefer', 'accept'] | |
68 | |
69 class dada_sequencetable( Tabular ): | |
70 """ | |
71 datatype for dada2's result of makeSequencetable (a named integer matrix col=sequences, rows=samples) | |
72 """ | |
73 | |
74 file_ext = "dada2_sequencetable" | |
75 blurb = "merged reads" | |
76 | |
77 | |
78 class dada_uniques( Tabular ): | |
79 """ | |
80 datatype for dada2's result of makeSequencetable (a named integer matrix col=sequences, rows=samples) | |
81 """ | |
82 | |
83 file_ext = "dada2_uniques" | |
84 blurb = "uniques" |