Parsing FASTA

1
2
3
4
5
6
7
import Data.Fasta.String.Parse

foo fasta modeMin = do
  fa <- readFile fasta
  print $ parseFasta fa

[FastaSequence {fastaHeader = "DG94KKQ1:279:C7KR1ACXX:3:1101:16517:2134 2:N:0:CGATGT", fastaSeq = "000000000000000000000000000000000000000000000000000151610665383636140031612290262347318231132211985350818410100000000000"},FastaSequence {fastaHeader = "DG94KKQ1:279:C7KR1ACXX:3:1101:18454:2159 2:N:0:CGATGT", fastaSeq = "133132136138139139141141140143141141139110106105106111111111111111111111501491521551561591561561571581521521551551541571581591611581551551592123232222222221202222222222212021202121162161"},FastaSequence {fastaHeader = "DG94KKQ1:279:C7KR1ACXX:3:1101:19877:2206 2:N:0:CGATGT", fastaSeq = "0000000000000000000000000000000000000000000000000001516106653836361400361400361400361400361400361400316122902623473373928676424942657223940000000"},FastaSequence {fastaHeader = "DG94KKQ1:279:C7KR1ACXX:3:1101:5883:2365 2:N:0:CGATGT", fastaSeq = "00000000000000000000000000000000000000000000000000015161066538363614003161229026234731823127904191165420400000000000000"},FastaSequence {fastaHeader = "DG94KKQ1:279:C7KR1ACXX:3:1101:3064:2589 2:N:0:CGATGT", fastaSeq = "00000000000000000000000000000000000000000000000000015161066538363614003614003614003614003614008147012554231926516399486211000000000"}]