I'm parsing a pileup file using the Tie:Text:CSV
input file:
chr1 58961 C M 1 1 60 2 .A XC
chr1 611593 A M 19 19 42 11 ,$.C,,C,,.., V7?[[VMZ8-"
my $fileParser = Text::CSV_XS->new( {binary=> 1, sep_char => "\t" }, eol => $/, allow_loose_quotes =>1);
my $inputHandle = Tie::Handle::CSV->new( $input, header => $headerRef, csv_parser => $fileParser );
while (my $line = <$inputHandle>) {
...
...
}
it parse the firstline fine but failed at the 2nd. i notice if i take out the double quote in the base quality string, then the 2nd line parses fine. How do make it to accept the ascii characters?
input file:
chr1 58961 C M 1 1 60 2 .A XC
chr1 611593 A M 19 19 42 11 ,$.C,,C,,.., V7?[[VMZ8-"
my $fileParser = Text::CSV_XS->new( {binary=> 1, sep_char => "\t" }, eol => $/, allow_loose_quotes =>1);
my $inputHandle = Tie::Handle::CSV->new( $input, header => $headerRef, csv_parser => $fileParser );
while (my $line = <$inputHandle>) {
...
...
}
it parse the firstline fine but failed at the 2nd. i notice if i take out the double quote in the base quality string, then the 2nd line parses fine. How do make it to accept the ascii characters?