Hello,
I was wondering if there were any plans for IO file handle support for
bgzipped VCF files.
When using VCF.pm I would like to do something like this:
$fh = new IO::Uncompress::Gunzip $filename or warn "## File handle
didn't work for gzipped file ".$filename."\n\n";
$vcf = Vcf->new(fh => $fh);
$vcf->parse_header();
At some point this breaks and I end up getting lines that are truncated.
So I will get an error that says a line is only "chr1 123 A G" when the
line is really "chr1 123 A G all_the_other_fields"
Instead I have to do this:
$vcf = Vcf->new(file => $filename);
$vcf->parse_header();
Which looks like it carries out the command in Vcf.pm
sub _open{
#stuff
$cmd = "gunzip -c '$$self{file}' |";
#morestuff
Which I think means its reading in from STDIN, and that seems to be very
IO intensive. The upside to using an IO::Whatever in perl is that it
should read in only one line at a time.
Are there any plans to implement this?
Best,
Jillian
------------------------------------------------------------------------------
_______________________________________________
Samtools-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/samtools-help