mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
add ICM datatype for glimmer
This commit is contained in:
@@ -491,6 +491,7 @@
|
||||
<!-- Annotation Datatypes -->
|
||||
<datatype extension="snaphmm" type="galaxy.datatypes.annotation:SnapHmm" display_in_upload="true" />
|
||||
<datatype extension="augustus" type="galaxy.datatypes.annotation:Augustus" display_in_upload="true" />
|
||||
<datatype extension="icm" type="galaxy.datatypes.binary:ICM" display_in_upload="true"/>
|
||||
<!-- MSA Datatypes -->
|
||||
<datatype extension="hmm2" type="galaxy.datatypes.msa:Hmmer2" display_in_upload="true" />
|
||||
<datatype extension="hmm3" type="galaxy.datatypes.msa:Hmmer3" display_in_upload="true" />
|
||||
@@ -682,6 +683,7 @@
|
||||
<sniffer type="galaxy.datatypes.binary:Fast5ArchiveGz" />
|
||||
<sniffer type="galaxy.datatypes.binary:Fast5ArchiveBz2" />
|
||||
<sniffer type="galaxy.datatypes.binary:Fast5Archive" />
|
||||
<sniffer type="galaxy.datatypes.annotation:ICM" />
|
||||
<sniffer type="galaxy.datatypes.annotation:Augustus" />
|
||||
<sniffer type="galaxy.datatypes.triples:Rdf"/>
|
||||
<sniffer type="galaxy.datatypes.blast:BlastXml"/>
|
||||
|
||||
@@ -1792,6 +1792,32 @@ class DMND(Binary):
|
||||
Binary.register_sniffable_binary_format("dmnd", "dmnd", DMND)
|
||||
|
||||
|
||||
class ICM(Binary):
|
||||
"""
|
||||
Class describing an ICM (interpolated context model) file, used by Glimmer
|
||||
"""
|
||||
file_ext = "icm"
|
||||
edam_data = "data_0950"
|
||||
|
||||
def set_peek(self, dataset, is_multi_byte=False):
|
||||
if not dataset.dataset.purged:
|
||||
dataset.peek = "Binary ICM (interpolated context model) file"
|
||||
dataset.blurb = nice_size(dataset.get_size())
|
||||
else:
|
||||
dataset.peek = 'file does not exist'
|
||||
dataset.blurb = 'file purged from disk'
|
||||
|
||||
def sniff(self, dataset):
|
||||
line = open(dataset).readline()
|
||||
if '>ver = ' in line and 'len = ' in line and 'depth = ' in line and 'periodicity =' in line and 'nodes = ' in line:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_ext("icm", "icm", ICM)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
import doctest
|
||||
doctest.testmod(sys.modules[__name__])
|
||||
|
||||
Reference in New Issue
Block a user