how to visualize fastANI result
0
0
Entering edit mode
2.6 years ago
noobiestar ▴ 30

Hi, I have the output file from fastANI as filename.out.visual. I followed the steps in https://github.com/ParBLiSS/FastANI with the R script which use genoPlotR package. This is the R script that I used:

#######
# Purpose: Visualize fastANI core-genome comparison
# Usage: Rscript <this_script>  <query sequence in fasta format> <subject sequence> <fastANI visualization output>
# Output: <fastANI visualization output filename>.pdf
# Uses genoPlotR package: http://genoplotr.r-forge.r-project.org

#Parse command line arguments
query_fasta=commandArgs(TRUE)[1]
subject_fasta=commandArgs(TRUE)[2]
fastANI_visual_file=commandArgs(TRUE)[3]

library(genoPlotR)

#Read fastANI output
comparison <- try(read_comparison_from_blast(fastANI_visual_file))

#Read sequences into genoPlotR objects
Query <- try(read_dna_seg_from_file(query_fasta))
Ref <- try(read_dna_seg_from_file(subject_fasta))

plotTitle = paste(query_fasta, subject_fasta, sep=" v/s ")

pdf( paste(fastANI_visual_file,".pdf",sep="") )

plot_gene_map(dna_segs=list(Query, Ref), comparisons=list(comparison), main=plotTitle, scale=FALSE, scale_cex=1, n_scale_ticks=4)

dev.off()

But on running the R script in R studio, I got this error:

Loading required package: ade4 Loading required package: grid
> 
> #Read fastANI output
> comparison <- try(read_comparison_from_blast(fastANI_visual_file)) Error in file(file, "rt") : invalid 'description' argument
> 
> #Read sequences into genoPlotR objects
> Query <- try(read_dna_seg_from_file(query_fasta)) Error in file(con, "r") : invalid 'description' argument
> Ref <- try(read_dna_seg_from_file(subject_fasta)) Error in file(con, "r") : invalid 'description' argument
> 
> plotTitle = paste(query_fasta, subject_fasta, sep=" v/s ")
> 
> pdf( paste(fastANI_visual_file,".pdf",sep="") )
> 
> plot_gene_map(dna_segs=list(Query, Ref), comparisons=list(comparison), main=plotTitle, scale=FALSE, scale_cex=1, n_scale_ticks=4) Error in plot_gene_map(dna_segs = list(Query, Ref), comparisons = list(comparison),  :    Argument dna_segs must be a list of dna_seg objects
> 
> dev.off() null device

Please help me with this. I am stuck in this for a long time.

windows fastANI genomemapping ubuntu scaffolds • 1.2k views
ADD COMMENT
0
Entering edit mode

Any help???

ADD REPLY
0
Entering edit mode

The moment you start thinking that people on this forum are here to help you in particular is the moment they will stop helping you. Not sure why you are taking it for granted that anyone here should know how or be willing to help. Either way, it helps to have your post properly formatted and legible, which yours wasn't until the administrators fixed it. Lastly, you couldn't have been stuck on this for a long time because it was barely yesterday that you figured out how to install fastANI.

ADD REPLY

Login before adding your answer.

Traffic: 2003 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6