MITObim icon indicating copy to clipboard operation
MITObim copied to clipboard

Use of uninitialized value $readpool in -e

Open nsmt89 opened this issue 6 years ago • 5 comments

Hi, I am very new to this, I can't seem to get the tutorial done. I keep getting 'Use of uninitialized value $readpool in -e ' what is seems to be the problem?

nsmt89 avatar Mar 26 '19 08:03 nsmt89

Hi, Could you please tell me which command you ran and a bit about your system. Are you running on Linux, Max, Docker, what?

cheers, Christoph

chrishah avatar Mar 29 '19 14:03 chrishah

Hi Chris, I have the same problem. I'm running this file in Docker installed in my Ubuntu 18.04 OS.

here is the command I used:

root@84409dacfe33:/home# /home/src/scripts/MITObim.pl -sample AcspLA -ref Lachesilla_Mitogenoma -readpool /home/oscar/Lachesillidae/Acantolachesilla/AcspLA_GGAGCGTC-GTCCGTGC_L00M_R1_001.fastq.gz -quick Acantholachesilla.fasta -end 100 --clean

HERE IS THE OUTPU:

MITObim - mitochondrial baiting and iterative mapping version 1.9.1 author: Christoph Hahn, (c) 2012-2018 Use of uninitialized value $readpool in -e at /home/src/scripts/MITObim.pl line 127. Cant find the readpool. Is the path correct?

THANKS FOR THE HELP

Ofsm avatar Oct 31 '19 19:10 Ofsm

Hi,

Thanks for your interest into MITObim!

It's hard to say what the problem is, but I think it might have to do with where you mounted your Docker container and that the path you give to your readpool is referring to the absolute path on your local system and not relative to your mountpoint.

Once you are in the docker container to access files you need to specify the path from within the container, rather than the absolute path on your system. Note that Docker can't access files that are on your local system above your mountpoint. Mountpoints are specified to docker via the -v option.

Now, assuming your reads and your fasta file are in the directory /home/oscar/Lachesillidae/Acantolachesilla, and you want to run MITObim there, you can make this your mountpoint ($(pwd) is you 'present working directory', which you mount to /working in the container. -w /working tells docker that this is the location in the container where things should happen) and run it like so:

#on your local system
cd /home/oscar/Lachesillidae/Acantolachesilla
#run MITObim
docker run --rm -v $(pwd):/working -w /working chrishah/mitobim:v.1.9.1 \
MITObim.pl -sample AcspLA -ref Lachesilla_Mitogenoma \
-readpool ./AcspLA_GGAGCGTC-GTCCGTGC_L00M_R1_001.fastq.gz \
--quick ./Acantholachesilla.fasta -end 100 --clean

Say you want to run the analyses, e.g. in your home directory and your data are in a location which is below the location in the system from where you want to run you analyses - run analyses at /home/oscar/ and data is at /home/oscar/Lachesillidae/Acantolachesilla/, specify the relative path to your data:

#on your local system
cd /home/oscar
#run MITObim
docker run --rm -v $(pwd):/working -w /working chrishah/mitobim:v.1.9.1 \
MITObim.pl -sample AcspLA -ref Lachesilla_Mitogenoma \
-readpool Lachesillidae/Acantolachesilla/AcspLA_GGAGCGTC-GTCCGTGC_L00M_R1_001.fastq.gz \
--quick Lachesillidae/Acantolachesilla/Acantholachesilla.fasta -end 100 --clean

Here's an example for how you would do it when your data on your file system are not below your mountpoint.

cd /home/oscar/
#Say you make a directory an enter it so things are organized - this could be anywhere in your system
mkdir MITObim
cd MITObim
#Now you are at /home/oscar/MITObim
#Run MITObim but specify an additional mountpoint to access your data -> /data in the container
docker run --rm -v $(pwd):/working -w /working \
-v /home/oscar/Lachesillidae/Acantolachesilla/:/data \
chrishah/mitobim:v.1.9.1 \
MITObim.pl -sample AcspLA -ref Lachesilla_Mitogenoma \
-readpool /data/AcspLA_GGAGCGTC-GTCCGTGC_L00M_R1_001.fastq.gz \
--quick /data/Acantholachesilla.fasta -end 100 --clean

Finally, consider an example where the data files are in different locations, neither below your mountpoint, e.g. you want to run your analyses in /home/oscar/MITObim. Reads are in /home/oscar/Lachesillidae/Acantolachesilla/reads and fasta is at /home/oscar/Lachesillidae/Acantolachesilla/fasta. You could specify an additional mountpoint which works for both of you datafiles, and specify the path to the files relative to this:

cd /home/oscar/
#Say you make a directory an enter it so things are organized - this could be anywhere in your system
mkdir MITObim
cd MITObim
#Now you are at /home/oscar/MITObim
docker run --rm -v $(pwd):/working -w /working \
-v /home/oscar/Lachesillidae/Acantolachesilla/:/data \
chrishah/mitobim:v.1.9.1 \
MITObim.pl -sample AcspLA -ref Lachesilla_Mitogenoma \
-readpool /data/reads/AcspLA_GGAGCGTC-GTCCGTGC_L00M_R1_001.fastq.gz \
--quick /data/fasta/Acantholachesilla.fasta -end 100 --clean

Or, hypothetically, if your data are in completely different locations for which it's not possible to specify a shared mountpoint (not the case here, but as an example):

cd /home/oscar/
#Say you make a directory an enter it so things are organized - this could be anywhere in your system
mkdir MITObim
cd MITObim
#Now you are at /home/oscar/MITObim
docker run --rm -v $(pwd):/working -w /working \
-v /home/oscar/Lachesillidae/Acantolachesilla/reads/:/mountpoint-1 \
-v /home/oscar/Lachesillidae/Acantolachesilla/fasta/:/mountpoint-2 \
chrishah/mitobim:v.1.9.1 \
MITObim.pl -sample AcspLA -ref Lachesilla_Mitogenoma \
-readpool /mountpoint-1/AcspLA_GGAGCGTC-GTCCGTGC_L00M_R1_001.fastq.gz \
--quick /mountpoint-2/Acantholachesilla.fasta -end 100 --clean

Hope that helps!

cheers, Christoph

chrishah avatar Nov 04 '19 10:11 chrishah

Hello Cristoph, I'm triying to apply your reply to my data but I dont know what i'm doing wrong.

1: My data is located here (seed and fastq files): /home/oscar/Lachesillidae/MITOrecons 2: I install docker here: oscarpc:/home$ 3: I go to directory /home/oscar/Lachesillidae/MITOrecons and run the command:

                  **sudo docker run --rm -v $(pwd):/working -w /working chrishah/mitobim:v.1.9.1 \
                  MITObim.pl -sample AcspLA -ref Lachesilla_Mitogenome \
                  -readpool ./AcspLA_R1_10M.fastq.gz \
                  --quick ./Acantholachesilla.fasta -end 100 --clean**

4: The output is this:

**quick option selected but is the path to the file correct?

MITObim - mitochondrial baiting and iterative mapping version 1.9.1 author: Christoph Hahn, (c) 2012-2018**

Again thanks for the help

Ofsm avatar Dec 09 '19 23:12 Ofsm

I Christoph, Already working, everything is running O.K.

Thanks

Ofsm avatar Dec 10 '19 23:12 Ofsm