I'm trying to visualize the fastANI output for a simple case where two fasta files have identical sequences (with different record IDs). In each fasta file, there are two random sequences generated using this website with the length of 800 and 1100 bases. The visualisation results doesn't seem to be as expected.
$ cat fastani.out
1.fa 2.fa 100 1 1
$ cat fastani.out.visual
1.fa 2.fa 100 NA NA NA 0 999 800 1799 NA NA
So the ANI value is correctly estimated 100.
Then I used this R code, generating this figure
I would have expected to see a different visualisation where the first record (with 800 bases) is ignored, and there is a match for the second record (with 1100 bases).
The output visual file is converted to this R dataframe:
So I can guess 0 999 (as it is evident in the image), shows the start and end on the first fasta file, and also 800 1799 shows the start and end on the second sequences. It seems that coordinate of FastANI .visual output are a concatenation.
It seems that it happens when the first sequence (record) in the fasta file is smaller than fragLen. This doesn't happened for another dataset with larger sequences. I agree this is very edge case and might not happen for usual real dataset.
Dear fastANI team
I'm trying to visualize the fastANI output for a simple case where two fasta files have identical sequences (with different record IDs). In each fasta file, there are two random sequences generated using this website with the length of 800 and 1100 bases. The visualisation results doesn't seem to be as expected.
This is the command line I used:
which resulted in these outputs
So the ANI value is correctly estimated 100. Then I used this R code, generating this figure
I would have expected to see a different visualisation where the first record (with 800 bases) is ignored, and there is a match for the second record (with 1100 bases).
When I check the R code,
The output visual file is converted to this R dataframe:
So I can guess
0 999
(as it is evident in the image), shows the start and end on the first fasta file, and also800 1799
shows the start and end on the second sequences. It seems that coordinate of FastANI.visual
output are a concatenation.Please find attached the dataset fastani_case.zip.
It seems that it happens when the first sequence (record) in the fasta file is smaller than fragLen. This doesn't happened for another dataset with larger sequences. I agree this is very edge case and might not happen for usual real dataset.
Best regards, Sina