úÎH‰C<      !"#$%&'()*+,-./0123456789:; Safe-Infered;Read names encode various information, as per this struct.  <= >?@ABCDE <= >?@ABCDE  <= >?@ABCDE Safe-Infered 5This contains the actual flowgram for a single read. CEach Read has a fixed read header, containing various information.  SFF has a 31-byte common header ?The format is open to having the index anywhere between reads, I we should really keep count and check for each read. In practice, it ' seems to be places after the reads. CThe following two fields are considered part of the header, but as < they are static, they are not part of the data structure  8 magic :: Word32 -- 0x2e736666, i.e. the string ".sff" ' version :: Word32 -- 0x00000001 Points to a text(?) section &JThe data structure storing the contents of an SFF file (modulo the index) )The type of flowgram value *Read an SFF file. +Trim a  . limiting the number of flows. If writing to ) an SFF file, make sure you update the  accordingly.  See examples/Flx.hs for how to use this. ,=Trim a read to specific sequence position, inclusive bounds. -.Trim a read according to clipping information .?Convert a flow position to the corresponding sequence position /?Convert a sequence position to the corresponding flow position 03Read an SFF file, but be resilient against errors. 1 Write an & to the specified file name 2 Write an &- to the specified file name, but go back and ? update the read count. Useful if you want to output a lazy  stream of  )s. Returns the number of reads written. 3test serialization by output'$ing the header and first two reads : in an SFF, and the same after a decode + encode cycle. 41Convert a file by decoding it and re-encoding it & This will lose the index (which isn't really necessary) 5Helper function for decoding a  . 6A ReadBlock can'9t be an instance of Binary directly, since it depends on & information from the CommonHeader. 76Unpack the flow_data field into a list of flow values 8SPack a list of flows into the corresponding binary structure (the flow_data field) 9'Helper function to access the flowgram :5Extract the sequence with masked bases in lower case ;9Extract the index as absolute coordinates, not relative. F>Wrapper for ReadBlocks since they need additional information <  !"#$%&'()*+,-./0123456789:;GHIJKLMNOFPQ<  !"#$%&'()*+,-./0123456789:;<&' !"#$% *120-,/.+349:;87)( 65$    !"#$%&'()*+,-./0123456789:;GHIJKLMNOFPQ Safe-InferedR?TrimFilters modify the read, typically trimming it for quality SGDiscardFilters determine whether a read is to be retained or discarded T&This filter discards empty sequences. UDiscard sequences that don'7t have the given key tag (typically TCAG) at the start  of the read. V  2.2.1.2 The dots< filter discards sequences where the last positive flow is Q before flow 84, and flows with >5% dots (i.e. three successive noise values) P before the last postitive flow. The percentage can be given as a parameter. W  2.2.1.3 The mixed@ filter discards sequences with more than 70% positive flows.  Also, discard with  30% noise, 20% middle (0.45..0.75) or <30% positive. XTDiscard a read if the number of untrimmed flows is less than n (n=186 for Titanium) Y 02.2.1.4 Signal intensity trim - trim back until < 3% borderline flows (0.5..0.7). D Then trim borderline values or dots from the end (use a window). Z 2.2.1.5 Primer filter Q This looks for the B-adaptor at the end of the read. The 454 implementation isn't very ( effective at finding mutated adaptors. [ Z2.2.1.7 Quality score trimming trims using a 10-base window until a Q20 average is found. \DList length as a double (eliminates many instances of fromIntegral) ]Calculate average of a list ^ZTranslate a number of flows to position in sequence, and update clipping data accordingly _:Update clip_qual_right if more severe than previous value RSTUVWXY`Za[b\]^_cdefghiRSTUVWXY`Za[b\]^_cdefghiRSTUVWXY`Za[b\]^_cdefghij       !"#$%&'(()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijk biosff-0.2Bio.Sequence.SFFBio.Sequence.SFF_nameBio.Sequence.SFF_filters biocore-0.2Bio.Core.SequenceSeqDataQualQualDataReadNamedatetimeregionx_locy_locdecodeReadNameencodeReadName ReadBlock read_header flow_data flow_indexbasesquality ReadHeader name_length num_basesclip_qual_leftclip_qual_rightclip_adapter_leftclip_adapter_right read_name CommonHeader index_offset index_length num_reads key_length flow_length flowgram_fmtflowkeySFFIndexFlowreadSFF trimFlows trimFromTotrim flowToBasePos baseToFlowPos recoverSFFwriteSFF writeSFF'testconvertgetRBputRB unpackFlows packFlowsflowgram masked_basescumulative_indexdecodeLocation decodeDateencodeLocation encodeRegion encodeDatedivModsdecode36decChencode36b36 $fBinaryRBI$fBinaryPartialReadHeader $fBinaryRSFF$fShowReadBlock$fBinaryReadHeader$fShowReadHeader$fBinaryCommonHeader$fShowCommonHeader $fBinarySFF $fShowSFF$fBioSeqQualReadBlock$fBioSeqReadBlock TrimFilter DiscardFilter discard_empty discard_key discard_dots discard_mixeddiscard_length trim_sigint trim_primer trim_qual20dlengthavg clipFlowsclipSeqsigint find_primerqual20 flx_linker ti_linker rna_adapter rna_adapter2 rna_adapter3 rapid_adapter ti_adapter_b