ParBLiSS / FastANI

Fast Whole-Genome Similarity (ANI) Estimation
Apache License 2.0
368 stars 66 forks source link

How to make query list and reference list? #11

Closed dineshkumarsrk closed 6 years ago

dineshkumarsrk commented 6 years ago

how to make query list and reference list of genome, could you elaborate the same? i could get output ANI for single query and single reference genome, but when i try for multiple ref and query genomes, my command is $ ./fastANI -q 119.fasta --rl Xac29-1.fasta Xanthomonasalbilinneans.fasta Xanthomonas arbicola.fasta -o punicae.text

it shows error as follows, 1, Misplaced option '-r' detected. All option have to be BEFORE the first argument 2, Misplaced option '-o' detected. All option have to be BEFORE the first argument

cjain7 commented 6 years ago

Suppose you have two query genomes at locations /projects/genomes/q1.fasta and /projects/genomes/q2.fasta, then you should a single file (say query_list.txt), and simply put these locations in that file (one per line):

......... /projects/genomes/q1.fasta /projects/genomes/q2.fasta .........

Then you can supply the file by its name query_list.txt as your query list. Same procedure goes for the reference genome list. Let me know if you face any issue.

dineshkumarsrk commented 6 years ago

./fastANI --ql /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/query/query_list --rl /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/ref_list -o punicae

Reference = [/home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/Xac29-1.fasta, /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/Xanthomonas albilineans.fasta, /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/Xanthomonas arboricola 3004.fasta, /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/Xanthomonas arboricolapv celebensis.fasta, /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/Xanthomonas_ arboricolapv corylinastrNCCB 100457.fasta, /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/Xanthomonas arboricolapv juglandis.fasta, /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/Xanthomonas_ arboricolapv juglandis_str NCPPB1447.fasta, /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/Xanthomonas axonopodispv citrumeloF1.fasta, /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/Xanthomonas_ axonopodispv manihotisstr CIO151.fasta, /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/Xanthomonas axonopodispv manihotisstr UA536.fasta, /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/Xanthomonas axonopodispv manihotisstr UG39.fasta, /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/Xanthomonas axonopodispv manihotisstrXam672.fasta, /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/Xanthomonas bromi.fasta, /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/Xanthomonas campestrisJX.fasta, /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/Xanthomonas campestrispv musacearum Kenyan.fasta, /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/Xanthomonas campestrispv musacearum NCPPB4379.fasta, /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/Xanthomonas campestrispv musacearum NCPPB4381.fasta, /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/Xanthomonas campestrispv musacearum NCPPB4394.fasta, /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/Xanthomonas campestrispv raphani756C.fasta, ] Query = [/home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/query/Xap_119.fasta, /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/query/Xap_121.fasta, /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/query/Xap_lmg859.fasta] Kmer size = 16 Fragment length = 3000 ANI output file = punicae

ERROR, skch::validateInputFiles, Could not open

dineshkumarsrk commented 6 years ago

Thank you jain for your kind help. As you told i have done, but still i am getting error message like this ERROR, skch::validateInputFiles, Could not open

please see below reference list, is it correct /home/arvind/Documents/dinesh/fastANI/fastani-Linux64-v1.0/data/reference/Xac29-1.fasta

cjain7 commented 6 years ago

Which editor are you using for editing your query and reference files? The only explanation of this behavior I can think of is there might be some invisible weird characters around the file paths which C++ is reading. As a result, the function skch::validateInputFiles is failing to open your file.

Can you attach your ref_list and query_list here? I want to open them and double-check in vim editor.

cjain7 commented 6 years ago

@dineshkumarsrk , I was made aware that the code breaks if there are unnecessary white-spaces after file names. Can you double check this and re-run?

In case you are using vim, it is easy to spot trailing spaces by command :set list.

dineshkumarsrk commented 6 years ago

Thank you for your valuable suggestion. hereby i have been attached my reference and query list for your reference. i am looking for your kind reply. if it possible, could i connect my computer with you by team viewer.

On Wed, May 30, 2018 at 8:25 PM, Chirag Jain notifications@github.com wrote:

Which editor are you using for editing your query and reference files? The only explanation of this behavior I can think of is there might be some invisible weird characters around the file paths which C++ is reading. As a result, the function skch::validateInputFiles is failing to open your file.

Can you attach your reference and query list here? I want to open them and double-check in vim editor.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ParBLiSS/FastANI/issues/11#issuecomment-393194225, or mute the thread https://github.com/notifications/unsubscribe-auth/Al2XxdWEHReE9y975NuTVAcJ0_irG2kuks5t3rL5gaJpZM4USrQZ .

cjain7 commented 6 years ago

Sorry I don't see the attachment, not sure if this is a bug in github. Can you email the attachments to me at cjain7 at gatech dot edu. Thanks!

cjain7 commented 6 years ago

Got it. File format looks okay to me, expect spaces within file names may be the cause of these issues. To make things simple, can you run a smaller test by using 5 ref genomes (and name them 1.fasta, 2.fasta ...)? Also avoid empty lines at the end of file.

cjain7 commented 6 years ago

File parsing is improved now, so this should be resolved with the latest version of code. (Let me know if it doesn't)

diaz13 commented 6 years ago

Kmer size = 16 Fragment length = 3000 Hi I run this command : ./fastANI --ql ../1.fasta --rl ../2.fasta -o output I obtain Threads = 1 ANI output file = output

ERROR, skch::validateInputFiles, Could not open >Scaffold_1

I don't no why he could not open the file 1 ?

NeeluBegum commented 4 years ago

Dear @cjain7, I seem to be having the same issue above but i dont have any empty lines in my fasta file. Could you please advise?

cjain7 commented 4 years ago

Hi, are you using the latest version (v1.3) ? This was resolved.

NeeluBegum commented 4 years ago

Hi, are you using the latest version (v1.3) ? This was resolved.

Yes, i solved it. thank you