blastxml 0.3.1 → 0.3.2
raw patch · 3 files changed
+9/−23 lines, 3 files
Files
- blastxml.cabal +1/−1
- src/Bio/BlastData.hs +6/−2
- src/Bio/BlastXML.hs +2/−20
blastxml.cabal view
@@ -1,5 +1,5 @@ Name: blastxml-Version: 0.3.1+Version: 0.3.2 Synopsis: Library for reading Blast XML output Description: This library contains a data structure and functions for reading output from the BLAST sequence alignment program.
src/Bio/BlastData.hs view
@@ -42,8 +42,12 @@ -- | Each match between a query and a target sequence (or subject) -- is a 'BlastHit'.-data BlastHit = BlastHit { subject :: !SeqLabel, slength :: !Int - , matches :: [BlastMatch] } deriving Show+data BlastHit = BlastHit + { hitId :: !ByteString+ , subject :: !SeqLabel+ , slength :: !Int+ , matches :: [BlastMatch] } deriving Show+ -- | A 'BlastHit' may contain multiple separate matches (typcially when -- an indel causes a frameshift that blastx is unable to bridge). data BlastMatch = BlastMatch { bits :: !Double, e_val :: !Double
src/Bio/BlastXML.hs view
@@ -90,7 +90,8 @@ hit2hit :: [STag] -> BlastHit hit2hit hs = BlastHit - { subject = SeqLabel $ get "Hit_def"+ { hitId = get "Hit_id"+ , subject = SeqLabel $ get "Hit_def" , slength = readI $ get "Hit_len" , matches = map hsp2match $ partitions (isTagOpenName "Hsp") hs }@@ -134,22 +135,3 @@ -- ignore frame also for tblastx hits (it can be reconstructed from location) strand' :: Int -> Strand strand' s = if s > 0 then Plus else Minus--fields :: [String]-fields = [ "Hsp_bit-score"- , "Hsp_evalue"- , "Hsp_query-from"- , "Hsp_query-to"- , "Hsp_hit-from"- , "Hsp_identity"- , "Hsp_align-len"- , "Hsp_qseq"- , "Hsp_hseq"- , "Hsp_hit-frame" - , "Hsp_query-frame" - , "Iteration_query-def"- , "Iteration_query-len"- , "Hit_def"- , "Hit_len" - , "Hsp"- ]