Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fastANI's .visualize output for small sequences #133

Open
sinamajidian opened this issue Jun 10, 2024 · 0 comments
Open

fastANI's .visualize output for small sequences #133

sinamajidian opened this issue Jun 10, 2024 · 0 comments

Comments

@sinamajidian
Copy link

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:

fastANI -q 1.fa -r 2.fa --visualize -o fastani.out --minFraction 0.1 --fragLen 1000

which resulted in these outputs

$ 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

fastani out visual

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,

comparison <- try(read_comparison_from_blast(fastANI_visual_file))

The output visual file is converted to this R dataframe:
Screenshot 2024-06-10 at 7 07 41 PM

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.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant