I just compiled and ran the code without problems on a FASTA file with the suffix .fa. I don't think the suffix is the issue. Are you sure you have a valid FASTA file?
I initially thought that too, but the web page states that kseq.h parses "both FASTA and FASTQ format, and even a mixture of FASTA and FASTQ records in one file."
the problem is that when i insert the fasta, fp = NULL ( fp = gzopen(argv[1], "r"); ), and in zlib.h says that "gzopen returns NULL if the file could not be opened or if there was
insufficient memory to allocate the (de)compression state"
I just compiled and ran the code without problems on a FASTA file with the suffix .fa. I don't think the suffix is the issue. Are you sure you have a valid FASTA file?
Yes, i use the standard human hg19.fasta, plus i've got the .fasta.fai, but i don't know how to use it.
FASTQ format is NOT the same as FASTA format
If I remember correctly, that library is supposed to work with either type.
I initially thought that too, but the web page states that kseq.h parses "both FASTA and FASTQ format, and even a mixture of FASTA and FASTQ records in one file."
then that code doesn't work with a .FASTA file...
Yes it does, as I stated in my first comment.
So, i ran it with "nameofprogram file.fasta" and returns "return value -1".
the problem is that when i insert the fasta, fp = NULL ( fp = gzopen(argv[1], "r"); ), and in zlib.h says that "gzopen returns NULL if the file could not be opened or if there was insufficient memory to allocate the (de)compression state"