Giter Club home page Giter Club logo

Comments (6)

asgray avatar asgray commented on September 15, 2024 1

Ok, I think I know the issue, and you're right that there are files missing. The dfam-tetools.sh is set up to bind docker to an external Libraries folder to manage the FamDB file(s) that might be added or modified. However, it overwrites the internal Libraries with the external folder. So to fix this, there are a few choices:

  1. Modify line 105 in dfam-tetools.sh so that it does not overwrite the library files contained in the container, and use the -lib argument to identify your input file.
  2. Run the container directly without the script with the same custom mount argument that would be used above: docker run -it --rm --mount type=bind,source="$workdir/Libraries",target=/working dfam/tetools:1.88.5
  3. The last option is to copy the container Libraries folder onto the host system so that when it is bound back into the container, copies of the overwritten files are still visible. This will allow you to use the unmodified dfam-tetools.sh:
docker run -it --rm --workdir /work -v $(pwd):/work dfam/tetools:1.88.5
cp -r /opt/RepeatMasker/Libraries/ ./

Hopefully that will fix the issue. I'll update the documentation to make that interaction more clear.

from tetools.

asgray avatar asgray commented on September 15, 2024

Hi Andrés, the first thing I want to confirm is the location of your input file. dfam-tetools.sh automatically binds $workdir/Libraries into the proper location for RepeatMasker. If your sequence is anywhere but in a ./Libraries directory relative to where you're running the container, you'll have to bind it in manually with something like --mount type=bind,source=<full path>/Libraries,target=/opt/RepeatMasker/Libraries.

I'm also not sure how Windows and WSL interact. My versions of your commands run without error, but I'm working on Ubuntu directly. I wouldn't expect a difference in behavior, but I also can't test it with WSL 2 at the moment.

from tetools.

andresfeliper3 avatar andresfeliper3 commented on September 15, 2024

Hi, @asgray , thank you for answering. It seems the binding is correct. I can add fasta files to the ./Libraries directory and I can see them in /opt/RepeatMasker/Libraries directory in the container.
I'm also running the command ./dfam-tetools.sh in the root directory of the cloned repository and then the container with the Docker image starts.

Being inside the container, in /opt/ directory, I'm running now the command RepeatMasker -dir /opt/RepeatMasker/Libraries/ Libraries/c_elegans_chromosome_I.fasta

But I get the following message:

RepeatMasker version 4.1.6
Search Engine: NCBI/RMBLAST [ 2.14.1+ ]
Taxonomy::new() needs a path for a famdb directory!
at /opt/RepeatMasker/RepeatMasker line 682.

I'm also running: RepeatMasker -lib /opt/RepeatMasker/ -dir /opt/RepeatMasker/Libraries/ Libraries/c_elegans_chromosome_I.fasta but I get the same result.

I thought that because in the WSL2 I'm using an Ubuntu virtual machine, then it could work as in Ubuntu.
Or maybe can you notice any error in the process of setting up the container and executing the command?

from tetools.

asgray avatar asgray commented on September 15, 2024

I would have assumed that WSL2 would have worked as well, especially since the container should have everything it needs to work.
I don't see any issues with your commands, but it might be worth checking if FamDB is working. Do you get any output by running famdb.py info?

from tetools.

andresfeliper3 avatar andresfeliper3 commented on September 15, 2024

From the /opt/ directory I entered
cd RepeatMasker
and then python3 famdb.py info so
(dfam-tetools /opt/RepeatMasker)$ python3 famdb.py info

The following message was shown.

ERROR:famdb_globals:Please specify a directory to operate on with the -i/--db_dir option.

What directory do I have to specify?

Edit:

I looked at line 682 of /opt/RepeatMasker/RepeatMasker
and it is my $tax = Taxonomy->new( famdb_dir => "$LIBDIR/famdb" );

$LIBDIR is defined in line 475 as my $LIBDIR = $config->{'LIBDIR'}->{'value'};
and as far as I understand, that values comes from file RepeatMaskerConfig.pm line 114. So it seems $LIBDIR value is /opt/RepeatMasker/Libraries.

So line 682 of /opt/RepeatMasker/RepeatMasker seems to be trying to create a new instance of Taxonomy object and initializing it with a parameter famdb_dir set to a specific directory path, which according to the previous analysis famdb_dir should be set to /opt/RepeatMasker/Libraries/famdb.
I did not have this famdb subfolder, but I created it empty.
I executed this command again RepeatMasker /opt/RepeatMasker/Libraries/c_elegans_chromosome_I.fasta and got

RepeatMasker version 4.1.6
Search Engine: NCBI/RMBLAST [ 2.14.1+ ]
ERROR:famdb_globals:A partitioned famdb database is not present in /opt/RepeatMasker/Libraries/famdb
Could not execute famdb.py using: /opt/RepeatMasker/famdb.py -i /opt/RepeatMasker/Libraries/famdb info

And I executed this command again python3 famdb.py info and got:

ERROR:famdb_globals:A partitioned famdb database is not present in /opt/RepeatMasker/Libraries/famdb

It seems like some kind of database is missing, since the famdb subfolder in the Libraries folder was not created in the first place. I'm kind of confused on what am I missing or what am I doing wrong. Do you have any additional file, database, folder, etc? and how does your Libraries folder look like?

from tetools.

andresfeliper3 avatar andresfeliper3 commented on September 15, 2024

Thank you @asgray for your help. I finally could use the container and execute RepeatMasker using the second option you gave me

from tetools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.