nigyta / dfast_core

DDBJ Fast Annotation and Submission Tool
76 stars 14 forks source link

modification configs for running rnammer #20

Closed aistBMRG closed 4 years ago

aistBMRG commented 4 years ago

Hi,

Thanks for developing dfast -- it is a great tool!

Just a small question. I wanted to use rnammer for calling of rRNA genes. It seems that can be achieved by setting a custom configuration file. However, I was not able to understand which files should be updated for that. Would it be possible to clarify? Could we also enable it as part of the command for dfast, same as in Prokka (--rnammer option)?

Thank you very much in advance.

Dieter

nigyta commented 4 years ago

@aistBMRG Thank you for using DFAST.

Yes, you can use rnammer by creating a custom config file. Please follow the instruction below.

  1. Add the path to rnammer executable to $PATH environmental variable. (or create a symbolic link of rnammer in $DFAST_APP_ROOT/bin/Darwin/ or $DFAST_APP_ROOT/bin/Linux/)
  2. Copy $DFAST_APP_ROOT/dfc/default_config.py to rnammer_config.py
  3. Modify it as following:
        {
            # Barrnap for rRNA prediction
            "tool_name": "Barrnap",
            "target": "rRNA",
            "enabled": False,   # <--- Set this to False
             "options": {
                 # Currently, Barrnap will run with default settings.
                 # You can set parameters such as --reject and --lencutoff to cmd_options.
                 # "cmd_options": "--reject 0.4 --lencutoff 0.6"
             },
        },
        {
            # RNAmmer for rRNA prediction. By default, this is disabled.
            # Please insall RNAmmer and put it in your PATH to enable this.
            "tool_name": "RNAmmer",
            "target": "rRNA",
            "enabled": True,   # <--- Set this to True
            "options": {
                "model": "bac",  # arc/bac/euk
                "cmd_options": ""
            },
        },
  1. Invoke DFAST with --config option
    dfast --genome path/to/genome.fna --config path/to/conf_rnammer.py

Alternatively, you can directly modify default_config.py. In that case, --config option is not required.

Please note that rnammer is not well tested. Hope this helps.

aistBMRG commented 4 years ago

Thank you very much for the prompt reply. I will try it; but may need to specify some cmd_options for rnammer.

nigyta commented 4 years ago

By default, rnammer is invoked with the following command,

rnammer -S bac -m tsu,lsu,ssu  -gff OUT/structural/RNAmmer.txt OUT/input/genome.fna

meaning that all kind of rRNA genes will be predicted using the parameter for bacteria. (You can see the command by running DFAST with --debug option)

If you want to provide other options, please specify it in cmd_options, but I think leaving it blank is okay.

aistBMRG commented 4 years ago

Ok, thanks.

mirajaonison commented 4 years ago

Hi, When I use the --use_rnammer option, I get the OUT/structural/RNAmmer.txt not found. It seams dfast does not produce the RNAmmer.txt.

Is there a way to fix that ?

Thank you already

nigyta commented 4 years ago

RNAmmer is not bundled in the DFAST software package. Did you install it? Please check by typing rnammer -v If installed properly, you got the message like This rnammer 1.2, running from '/Users/tanizawa/projects/newpipe/tooltest/rnammer'

mirajaonison commented 4 years ago

RNAmmer is installed properly, I run the tests to be sure

nigyta commented 4 years ago

Is it possible to send your genome file to dfast@nig.ac.jp? I will look into it.

mirajaonison commented 4 years ago

Do you think it's genome related ?

nigyta commented 4 years ago

Did you get the result successfully without "--use_rnammer" option? What does the log file say?

mirajaonison commented 4 years ago

Everything is fine without "--use_rnammer". I am sending you the genome so you can have a look at it

nigyta commented 4 years ago

TIPS for trouble shoot:

Check RNAmmer configuration.

# the path of the program
my $INSTALL_PATH = "/home/User/tools/rnammer";

$HMMSEARCH_BINARY = "/Users/User/tools/hmmer2/hmmer-2.3.2/src/hmmsearch";