Entering edit mode
7.0 years ago
HZZ0036
▴
30
Hello Everyone,
I tried to use the Count_fasta.pl script (https://github.com/sr320/eimd/blob/master/scripts/count_fasta.pl) to get the N50 for one assembled fasta file. However, when I ran perl Count_fasta.pl file.fa ,it showed:
0:99 0
Total length of sequence: 0 bp
Total number of sequences: 0
N25 stats: 25% of total sequence length is contained in the 0 sequences >= bp
N50 stats: 50% of total sequence length is contained in the 0 sequences >= bp
N75 stats: 75% of total sequence length is contained in the 0 sequences >= bp
Total GC count: 0 bp
Illegal division by zero at /home/aubhxz/Count_fasta.pl line 103.
But this Count_fasta.pl works for other fasta files. It seems very strange. Does anybody know how to solve this problem? Thanks.
Zhang
If it works on other FASTA files, I would guess there is something wrong with the FASTA file you are working with. Did you check if your FASTA file has sequences? Did you check if it is formatted correctly?
The following error message: Illegal division by zero at /home/aubhxz/Count_fasta.pl line 103., makes me think something is wrong with your input file.
I can't find the error for fasta file. Here is the file link: https://filemover.auburn.edu/files/files/1510608526_re69allokay.fa Could you please have a look? How to check if it is formatted correctly? Thank you so much.
It seems to be working fine for me. I took a subset of the file (your example file is huge) and ran the program you mentioned. You should probably save your file again and see if it works.
Thank you. It worked for a subset of the file, but it still didn't work for all of the file. I didn't meet this situation before. It's very strange.