NBISweden / AGAT

Another Gtf/Gff Analysis Toolkit
GNU General Public License v3.0
457 stars 56 forks source link

Support gezipped fasta/gtf/gff for agat_sp_extract_sequences.pl #486

Closed Tong-Chen closed 1 month ago

Tong-Chen commented 1 month ago

Is your feature request related to a problem? Please describe. No

Describe the solution you'd like In agat, Bio::DB::Fasta->new is used to index FASTA files, could this module support gzipped fasta.

I have tried:

  1. Modiy agat_sp_extract_sequences.pl by supplying a file handle to Bio::DB::Fasta->new, which does not work.
open(my $FASTA_INPUT_FH, "zcat $opt_fastafile |") or die "gunzip $opt_fastafile: $!";   
my $db = Bio::DB::Fasta->new($FASTA_INPUT_FH);
  1. I tried agat_sp_extract_sequences.pl -g <(gunzip infile.gff.gz) -f <(guznip infile.fasta.gz) to deal with gzipped files. This also does not work.

This may be the question of BioPerl.

Thank!

Tong Chen

Juke34 commented 1 month ago

To my knowledge Bio::DB::Fasta does not allow to read compressed file. You should contact bioperl developer to get better information https://github.com/bioperl/bioperl-live