comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:d901c9f41a6a
1 This tool comes with io_lib (from Staden package) version 1.12.2
2 io_lib is necessary as you will need srf2fastq executable; if you alread have the binary, skip the io_lib installation.
3 You may find a more recent version here http://sourceforge.net/projects/staden/files/
4
5 1- Install io_lib
6 cd io_lib-1.12.2
7 ./configure --prefix=PREFIX
8 make
9 make install #assuming you have already superuser permissions granted
10
11 2- Edit srf2fastq.sh
12 You will need to change the path of srf2fastq executable if
13 PREFIX has been defined different from /usr/local:wq
14
15 3- Add support for SRF files in galaxy (if galaxy team hasn't added yet)
16 Here comes a series of diffs you may want to integrate. lib/galaxy/datatypes/binary.py and lib/galaxy/datatypes/registry.py
17 are part of galaxy distribution so a hg diff output is given. datatype_conf.xml is not in
18 galaxy repository (the sample is), so a unified diff is given (well, it's the same...)
19
20 diff -r 60448575467f lib/galaxy/datatypes/binary.py
21 --- a/lib/galaxy/datatypes/binary.py Mon Aug 23 10:15:17 2010 -0400
22 +++ b/lib/galaxy/datatypes/binary.py Wed Aug 25 10:26:38 2010 +0200
23 @@ -222,3 +222,31 @@
24 Binary.__init__( self, **kwd )
25 self._magic = 0x8789F2EB
26 self._name = "BigBed"
27 +
28 +class Srf( Binary ):
29 + """ Illumina Sequence Archive (SRF) """
30 + file_ext = "srf"
31 +
32 + def __init__( self, **kwd ):
33 + Binary.__init__( self, **kwd )
34 + def sniff( self, filename ):
35 + try:
36 + header = open( filename ).read(4)
37 + if binascii.b2a_hex( header ) == binascii.hexlify( 'SSRF' ):
38 + return True
39 + return False
40 + except:
41 + return False
42 + def set_peek( self, dataset, is_multi_byte=False ):
43 + if not dataset.dataset.purged:
44 + dataset.peek = "Binary srf file"
45 + dataset.blurb = data.nice_size( dataset.get_size() )
46 + else:
47 + dataset.peek = 'file does not exist'
48 + dataset.blurb = 'file purged from disk'
49 + def display_peek( self, dataset ):
50 + try:
51 + return dataset.peek
52 + except:
53 + return "Binary srf file (%s)" % ( data.nice_size( dataset.get_size() ) )
54 +
55
56 diff -r 60448575467f lib/galaxy/datatypes/registry.py
57 --- a/lib/galaxy/datatypes/registry.py Mon Aug 23 10:15:17 2010 -0400
58 +++ b/lib/galaxy/datatypes/registry.py Wed Aug 25 10:28:01 2010 +0200
59 @@ -173,6 +173,7 @@
60 'sam' : tabular.Sam(),
61 'scf' : binary.Scf(),
62 'sff' : binary.Sff(),
63 + 'srf' : binary.Srf(),
64 'tabular' : tabular.Tabular(),
65 'taxonomy' : tabular.Taxonomy(),
66 'txt' : data.Text(),
67 @@ -213,6 +214,7 @@
68 if len(self.sniff_order) < 1:
69 self.sniff_order = [
70 binary.Bam(),
71 + binary.Srf(),
72 binary.Sff(),
73 xml.BlastXml(),
74 sequence.Maf(),
75
76 diff -u datatypes_conf.xml datatypes_conf.xml.sample
77 --- datatypes_conf.xml 2010-08-25 10:32:46.778959931 +0200
78 +++ datatypes_conf.xml.sample 2010-08-25 07:20:34.190956591 +0200
79 @@ -105,7 +105,6 @@
80 <datatype extension="scf" type="galaxy.datatypes.binary:Scf" mimetype="application/octet-stream" display_in_upload="true"/>
81 <datatype extension="Sequences" type="galaxy.datatypes.assembly:Sequences" display_in_upload="false"/>
82 <datatype extension="sff" type="galaxy.datatypes.binary:Sff" mimetype="application/octet-stream" display_in_upload="true"/>
83 - <datatype extension="srf" type="galaxy.datatypes.binary:Srf" mimetype="application/octet-stream" display_in_upload="true"/>
84 <datatype extension="taxonomy" type="galaxy.datatypes.tabular:Taxonomy" display_in_upload="true"/>
85 <datatype extension="tabular" type="galaxy.datatypes.tabular:Tabular" display_in_upload="true"/>
86 <datatype extension="txt" type="galaxy.datatypes.data:Text" display_in_upload="true"/>
87 @@ -264,7 +263,6 @@
88 and so on.
89 -->
90 <sniffer type="galaxy.datatypes.binary:Bam"/>
91 - <sniffer type="galaxy.datatypes.binary:Srf"/>
92 <sniffer type="galaxy.datatypes.binary:Sff"/>
93 <sniffer type="galaxy.datatypes.xml:BlastXml"/>
94 <sniffer type="galaxy.datatypes.sequence:Maf"/>