nmquijada / tormes

Making whole bacterial genome sequencing data analysis easy
GNU General Public License v3.0
101 stars 32 forks source link

report rendering and input/output directories #24

Open dkarig opened 4 years ago

dkarig commented 4 years ago

I'm excited about this tool. Thank you for making it! I have a three questions/comments: 1) I don't get an html file, and the error below seems to be from an attempt at report rendering. Do you have any suggestions?

Quitting from lines 192-201 (tormes_report.Rmd) 
Error in names(x) <- value : 
  'names' attribute [3] must be the same length as the vector [2]
Calls: <Anonymous> ... withCallingHandlers -> withVisible -> eval -> eval -> colnames<-
In addition: Warning messages:
1: package 'ggplot2' was built under R version 3.6.3 
2: package 'knitr' was built under R version 3.6.3 
3: package 'plotly' was built under R version 3.6.3 
4: package 'RColorBrewer' was built under R version 3.6.3 
5: package 'reshape2' was built under R version 3.6.3 
Execution halted

2) It seems that the input files must be in the same directory that tormes is run from.

3) Likewise, specifying an output directory isn't working. If I specify /directory1/directory2/myoutputdirectory, for some reason, the /directory1/directory2 part is pasted twice in the code, and it can't locate the correct directory, since it is looking for /directory1/directory2//directory1/directory2/myoutputdirectory. Here is an example snippet:

(tormes-1.1) [me@node0086 Applications]$ tormes --metadata metadata_AF054_003 --output /scratch3/me/AF054_003_Bacillus --threads 32 > tormes_stdout.txt &
[1] 4422
(tormes-1.1) [me@node0086 Applications]$ /home/me/anaconda3/envs/tormes-1.1/bin/tormes: line 672: /scratch3/me//scratch3/me/AF054_003_Bacillus/list.tmp: No such file or directory
tail: write error: Broken pipe
/home/me/anaconda3/envs/tormes-1.1/bin/tormes: line 674: /scratch3/me//scratch3/me/AF054_003_Bacillus/metadata.R: No such file or directory
...
nmquijada commented 4 years ago

Hi @dkarig ,

Glad that you are using tormes! Let's see if we can solve the issues...

  1. Regarding the report, tormes tries to automatically generate one after running. However, if any file is missing or corrupted, the excution will halt. In such cases, you can generate the report by you own, after taking care of the issues (in your case, something is failing in the lines 192-201 from your tormes_report.Rmd file). Currently I am working on a wiki to further explain how to do so, although it is not very evolved yet. Maybe I can help you with your particular situation in the meantime.

  2. If you refer to the main tormes software, it does not require to be in the same directory of the files. In your case, tormes is in home/me/anaconda3/envs/tormes-1.1/bin/tormes whereas the input metadata file, aswell as the sequences/genomes contained in it, can be elsewhere. If you refer to the files that are the input for the report generation, yes, the files must be in the report_files directory, so the automatically generated render_report.sh script, contained in that directory, can find them.

  3. This issue really strikes me and it is the first time I see it... I see that you send the output of the run to "tormes_stdout.txt". Would you mind to share that file with me so I can inspect where the issue is coming from? If you have any sensitive data, we can share these data via email.

Let me know! Narciso