Mercurial > repos > cropgeeks > flapjack
view flapjack.py @ 34:c8d80417e902 draft
Uploaded
| author | cropgeeks |
|---|---|
| date | Tue, 28 Feb 2017 05:01:03 -0500 |
| parents | 591567e072f1 |
| children | 414aa590a1de |
line wrap: on
line source
from galaxy.datatypes.data import Text from galaxy.datatypes.tabular import Tabular class FlapjackFormat(Text): file_ext = "flapjack" class FlapjackMapFormat(Tabular): file_ext = "fjmap" def sniff( self, filename ): h = open(filename) line = h.readline() if line.rstrip() != "# fjFile = MAP": h.close() return False return True class FlapjackGenotypeFormat(Tabular): file_ext = "fjgenotype" def sniff( self, filename ): h = open(filename) line = h.readline() if line.rstrip() != "# fjFile = GENOTYPE": h.close() return False return True class FlapjackPhenotypeFormat(Tabular): file_ext = "fjphenotye" def sniff( self, filename ): h = open(filename) line = h.readline() if line.rstrip() != "# fjFile = PHENOTYPE": h.close() return False return True class FlapjackQtlFormat(Tabular): file_ext = "fjqtl" def sniff( self, filename ): h = open(filename) line = h.readline() if line.rstrip() != "# fjFile = QTL": h.close() return False return True class FlapjackGraphFormat(Tabular): file_ext = "fjgraph" def sniff( self, filename ): h = open(filename) line = h.readline() if line.rstrip() != "# fjFile = GRAPH": h.close() return False return True
