Mercurial > repos > dawe > srf2fastq
diff srf2fastq/README @ 0:d901c9f41a6a default tip
Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
author | dawe |
---|---|
date | Tue, 07 Jun 2011 17:48:05 -0400 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/srf2fastq/README Tue Jun 07 17:48:05 2011 -0400 @@ -0,0 +1,94 @@ +This tool comes with io_lib (from Staden package) version 1.12.2 +io_lib is necessary as you will need srf2fastq executable; if you alread have the binary, skip the io_lib installation. +You may find a more recent version here http://sourceforge.net/projects/staden/files/ + +1- Install io_lib +cd io_lib-1.12.2 +./configure --prefix=PREFIX +make +make install #assuming you have already superuser permissions granted + +2- Edit srf2fastq.sh +You will need to change the path of srf2fastq executable if +PREFIX has been defined different from /usr/local:wq + +3- Add support for SRF files in galaxy (if galaxy team hasn't added yet) +Here comes a series of diffs you may want to integrate. lib/galaxy/datatypes/binary.py and lib/galaxy/datatypes/registry.py +are part of galaxy distribution so a hg diff output is given. datatype_conf.xml is not in +galaxy repository (the sample is), so a unified diff is given (well, it's the same...) + +diff -r 60448575467f lib/galaxy/datatypes/binary.py +--- a/lib/galaxy/datatypes/binary.py Mon Aug 23 10:15:17 2010 -0400 ++++ b/lib/galaxy/datatypes/binary.py Wed Aug 25 10:26:38 2010 +0200 +@@ -222,3 +222,31 @@ + Binary.__init__( self, **kwd ) + self._magic = 0x8789F2EB + self._name = "BigBed" ++ ++class Srf( Binary ): ++ """ Illumina Sequence Archive (SRF) """ ++ file_ext = "srf" ++ ++ def __init__( self, **kwd ): ++ Binary.__init__( self, **kwd ) ++ def sniff( self, filename ): ++ try: ++ header = open( filename ).read(4) ++ if binascii.b2a_hex( header ) == binascii.hexlify( 'SSRF' ): ++ return True ++ return False ++ except: ++ return False ++ def set_peek( self, dataset, is_multi_byte=False ): ++ if not dataset.dataset.purged: ++ dataset.peek = "Binary srf file" ++ dataset.blurb = data.nice_size( dataset.get_size() ) ++ else: ++ dataset.peek = 'file does not exist' ++ dataset.blurb = 'file purged from disk' ++ def display_peek( self, dataset ): ++ try: ++ return dataset.peek ++ except: ++ return "Binary srf file (%s)" % ( data.nice_size( dataset.get_size() ) ) ++ + +diff -r 60448575467f lib/galaxy/datatypes/registry.py +--- a/lib/galaxy/datatypes/registry.py Mon Aug 23 10:15:17 2010 -0400 ++++ b/lib/galaxy/datatypes/registry.py Wed Aug 25 10:28:01 2010 +0200 +@@ -173,6 +173,7 @@ + 'sam' : tabular.Sam(), + 'scf' : binary.Scf(), + 'sff' : binary.Sff(), ++ 'srf' : binary.Srf(), + 'tabular' : tabular.Tabular(), + 'taxonomy' : tabular.Taxonomy(), + 'txt' : data.Text(), +@@ -213,6 +214,7 @@ + if len(self.sniff_order) < 1: + self.sniff_order = [ + binary.Bam(), ++ binary.Srf(), + binary.Sff(), + xml.BlastXml(), + sequence.Maf(), + +diff -u datatypes_conf.xml datatypes_conf.xml.sample +--- datatypes_conf.xml 2010-08-25 10:32:46.778959931 +0200 ++++ datatypes_conf.xml.sample 2010-08-25 07:20:34.190956591 +0200 +@@ -105,7 +105,6 @@ + <datatype extension="scf" type="galaxy.datatypes.binary:Scf" mimetype="application/octet-stream" display_in_upload="true"/> + <datatype extension="Sequences" type="galaxy.datatypes.assembly:Sequences" display_in_upload="false"/> + <datatype extension="sff" type="galaxy.datatypes.binary:Sff" mimetype="application/octet-stream" display_in_upload="true"/> +- <datatype extension="srf" type="galaxy.datatypes.binary:Srf" mimetype="application/octet-stream" display_in_upload="true"/> + <datatype extension="taxonomy" type="galaxy.datatypes.tabular:Taxonomy" display_in_upload="true"/> + <datatype extension="tabular" type="galaxy.datatypes.tabular:Tabular" display_in_upload="true"/> + <datatype extension="txt" type="galaxy.datatypes.data:Text" display_in_upload="true"/> +@@ -264,7 +263,6 @@ + and so on. + --> + <sniffer type="galaxy.datatypes.binary:Bam"/> +- <sniffer type="galaxy.datatypes.binary:Srf"/> + <sniffer type="galaxy.datatypes.binary:Sff"/> + <sniffer type="galaxy.datatypes.xml:BlastXml"/> + <sniffer type="galaxy.datatypes.sequence:Maf"/>