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

How to generate .tbl when running the docker image? #20

Open
nathaliagg opened this issue Jul 23, 2019 · 9 comments
Open

How to generate .tbl when running the docker image? #20

nathaliagg opened this issue Jul 23, 2019 · 9 comments

Comments

@nathaliagg
Copy link

I'm running Mfannot via docker image, and it is running ok as far as I can tell. I was wondering how to generate the .tbl file, which is provided when running a job in the web server.

Thank you!

@natacha-beck
Copy link
Collaborator

Hello,

If you run MFannot with the --sqn option, MFannot will generate the .sqn file. And if you add the -d option, MFannot will keep all the intermediate file included the .tbl file.

@nathaliagg
Copy link
Author

Adding the -d option didn't work for me. This was an example of my run:

docker run -v $(pwd):/working-dir  -w /working-dir 071cbd1a9412 mfannot --sqn -d -g 4 -l logfile filename.fasta

The outputs were the log, .new, and .sqn files. The .tbl file was not created.

@natacha-beck
Copy link
Collaborator

Can you cut and paste the trace of the run of Mfannot, the last 5-10 lines.

You need to go inside the temporary workdirectory to find the .tbl file.

@nathaliagg
Copy link
Author

nathaliagg commented Aug 4, 2019

[nathalia] $  docker run -ti -v $(pwd):/working-dir  -w /working-dir --mount type=tmpfs,destination=/working-dir/tmp 071cbd1a9412 mfannot --sqn -d -g 4 -l logfile_ks28.txt ks28_mt_scaffolded.fasta

(...)

15) Intron ORF annotation...

----------------------------------
       This is it, Folks !     
----------------------------------
Added : 57
Writing new masterfile in /working-dir/ks28_mt_scaffolded.fasta.new
/usr/local/bin/mf2sqn -a Generic -m /working-dir/ks28_mt_scaffolded.fasta.new -t/usr/local/bin/mf2sqn -a Generic -m /working-dir/ks28_mt_scaffolded.fasta.new -tclose Logfile : logfile_ks28.txt
Temporary work directory /tmp/mfannot.1 NOT cleaned up ...

I tried using --tmpfs, and then --mount configuration as shown above. Using either option to mount, the /tmp/mfannot.1 didn't exist:

[nathalia] $  docker run --rm -it --entrypoint=/bin/bash 071cbd1a9412
root@9619df62882b:/# cd tmp/
root@d446f68c14c7:/tmp# ls -Ra
.:
.  ..  PCyaqO4osP  upvWGcLlr5.tmp.bioperl

./PCyaqO4osP:
.  ..

The /tmp was created in the working-dir, but it was empty:

[nathalia] $  pwd
/Users/grachetng/MFannot 
[nathalia] $  cd tmp/
[nathalia] $  ls -la
total 0
drwxr-xr-x   2 grachetng  staff    64 Aug  4 09:40 .
drwxr-xr-x  43 grachetng  staff  1376 Aug  4 09:44 ..

I am not used to running containers, so this issue might be my lack of knowledge.

@natacha-beck
Copy link
Collaborator

You will be able to redirect the temporary workdirectory by using the option --T like that:

docker run -ti -v $(pwd):/working-dir -w /working-dir nbeck/mfannot:latest mfannot --sqn -d -g 4 --T /working-dir/tmp fasta_file

then when you go in /working-dir/tmp you will find a file named fasta.new.tbl.

Let me know if it is ok now ?

@nathaliagg
Copy link
Author

The temporary directory is created using the --T option, however it still does not work. Now, the code breaks at:

  --- SCRIPT /working-dir/tmphcw2/Contig/err_out/bashcom.rrn5.B-0.MfGC.1 END ---
  DEBUG: Executing external script block 'B-0' for 'rrn5'.
  --- COMMAND : cd '/working-dir/tmphcw2/Contig/err_out';/bin/bash '/working-dir/tmphcw2/Contig/err_out/bashcom.rrn5.B-0.MfGC.1' >'/working-dir/tmphcw2/Contig/err_out/out.rrn5.B-0.MfGC.1' 2>'/working-dir/tmphcw2/Contig/err_out/err.rrn5.B-0.MfGC.1'
  --- SCRIPT /working-dir/tmphcw2/Contig/err_out/bashcom.rrn5.B-0.MfGC.1 START ---

    RNAfinder -m rrn5 -g 4 -d /working-dir/tmphcw2/Contig/contig3 -M /working-dir/tmphcw2/Contig/contig3-rrn5.xml

  --- SCRIPT /working-dir/tmphcw2/Contig/err_out/bashcom.rrn5.B-0.MfGC.1 END ---
  DEBUG: Executing external script block 'B-0' for 'rrn5'.
  --- COMMAND : cd '/working-dir/tmphcw2/Contig/err_out';/bin/bash '/working-dir/tmphcw2/Contig/err_out/bashcom.rrn5.B-0.MfGC.1' >'/working-dir/tmphcw2/Contig/err_out/out.rrn5.B-0.MfGC.1' 2>'/working-dir/tmphcw2/Contig/err_out/err.rrn5.B-0.MfGC.1'
  --- SCRIPT /working-dir/tmphcw2/Contig/err_out/bashcom.rrn5.B-0.MfGC.1 START ---

    RNAfinder -m rrn5 -g 4 -d /working-dir/tmphcw2/Contig/contig1 -M /working-dir/tmphcw2/Contig/contig1-rrn5.xml

  --- SCRIPT /working-dir/tmphcw2/Contig/err_out/bashcom.rrn5.B-0.MfGC.1 END ---
11) Adjust intron boundaries...
12) Identify start codons; identify gene fusions...
13) Find extra genes with HMM
Cannot open /working-dir/tmphcw2/contig/contig1/contig1.faa in GetORFForLowConservedGenes

In addition, working-dir/tmphcw2/contig/ does not exist, but working-dir/tmphcw2/Contig/ exists. But working-dir/tmphcw2/Contig/contig1/ does not exist because contig1 is a fasta file.

@natacha-beck
Copy link
Collaborator

Can you please send me the full log trace and the input file I will take a look. I re-run an example on my side and I did not have any issue. I really want to help you and understand what happened.

@nathaliagg
Copy link
Author

Sure. I really appreciate your help!

This was the code I ran:

[nathalia] $  docker run -ti -v $(pwd):/working-dir -w /working-dir nbeck/mfannot:latest mfannot --sqn -d -g 4 --T /working-dir/tmp_hcw2 -l logfile_hcw2.txt hcw2_mt_scaffolded.fasta > logfile_stdout_hcw2.txt

This is the data file: hcw2_mt_scaffolded.fasta.txt

These are the log files: logfile_hcw2.txt
logfile_stdout_hcw2.txt

@natacha-beck
Copy link
Collaborator

I run the same command line as you. And did not get any issue. I will think of your issue.

In the mean time, here is the *.tbl file

hcw2_mt_scaffolded.fasta.txt.new.tbl.txt

I just rename it with the txt extension to attach the file on github.

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

2 participants