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