32
|
1 from galaxy.datatypes.data import Text
|
31
|
2 from galaxy.datatypes.tabular import Tabular
|
4
|
3
|
9
|
4 class FlapjackFormat(Text):
|
|
5 file_ext = "flapjack"
|
|
6
|
28
|
7 class FlapjackMapFormat(Tabular):
|
4
|
8 file_ext = "fjmap"
|
|
9
|
|
10 def sniff( self, filename ):
|
|
11 h = open(filename)
|
|
12 line = h.readline()
|
|
13 if line.rstrip() != "# fjFile = MAP":
|
|
14 h.close()
|
|
15 return False
|
|
16 return True
|
|
17
|
28
|
18 class FlapjackGenotypeFormat(Tabular):
|
4
|
19 file_ext = "fjgenotype"
|
|
20
|
|
21 def sniff( self, filename ):
|
|
22 h = open(filename)
|
|
23 line = h.readline()
|
|
24 if line.rstrip() != "# fjFile = GENOTYPE":
|
|
25 h.close()
|
|
26 return False
|
|
27 return True
|
|
28
|
28
|
29 class FlapjackPhenotypeFormat(Tabular):
|
4
|
30 file_ext = "fjphenotye"
|
|
31
|
|
32 def sniff( self, filename ):
|
|
33 h = open(filename)
|
|
34 line = h.readline()
|
|
35 if line.rstrip() != "# fjFile = PHENOTYPE":
|
|
36 h.close()
|
|
37 return False
|
|
38 return True
|
|
39
|
28
|
40 class FlapjackQtlFormat(Tabular):
|
4
|
41 file_ext = "fjqtl"
|
|
42
|
|
43 def sniff( self, filename ):
|
|
44 h = open(filename)
|
|
45 line = h.readline()
|
|
46 if line.rstrip() != "# fjFile = QTL":
|
|
47 h.close()
|
|
48 return False
|
|
49 return True
|
|
50
|
28
|
51 class FlapjackGraphFormat(Tabular):
|
4
|
52 file_ext = "fjgraph"
|
|
53
|
|
54 def sniff( self, filename ):
|
|
55 h = open(filename)
|
|
56 line = h.readline()
|
|
57 if line.rstrip() != "# fjFile = GRAPH":
|
|
58 h.close()
|
|
59 return False
|
|
60 return True |