how to change tmp directory if I want to use pick_otus.py -m mothur

314 views
Skip to first unread message

Isiah

unread,
Apr 8, 2013, 6:21:19 PM4/8/13
to qiime...@googlegroups.com
Hi,

I want to use pick_otus.py -i out/seqs.fna -o mothur_picked_otus/ -m mothur but it kept saying no space on device.

I know it might be the problem of the /tmp directory which I don't have enough space. I faced the same problem when I  ran pick_otus_through_otu_table.py -i out/seqs.fna -o otus .
After I modified the temp_dir to my local directory (I don't have root access) as /home/lc178/tmp/ which I got enough space, pick_otus_through_otu_table.py -i out/seqs.fna -o otus  works.

However, when I attempted to use pick_otus.py -i out/seqs.fna -o mothur, the following is the error message:

[lc178@dav-dd-l0151 merge]$ pick_otus.py -i out/seqs.fna -o mothur_picked_otus/ -m mothur
Traceback (most recent call last):
  File "/home/lc178/install/QIIME1.6/bin/pick_otus.py", line 591, in <module>
    main()
  File "/home/lc178/install/QIIME1.6/bin/pick_otus.py", line 565, in main
    result_path=result_path, log_path=log_path)
  File "/home/lc178/install/QIIME1.6/lib/python2.7/site-packages/qiime/pick_otus.py", line 1393, in __call__
    results = app(seq_path)
  File "/home/lc178/install/QIIME1.6/src/PyCogent/cogent/app/mothur.py", line 119, in __call__
    getattr(self, self.InputHandler)(data)
  File "/home/lc178/install/QIIME1.6/src/PyCogent/cogent/app/mothur.py", line 314, in _input_as_path
    copyfile(data, self._input_filename)
  File "/home/lc178/install/QIIME1.6/lib/python2.7/shutil.py", line 84, in copyfile
    copyfileobj(fsrc, fdst)
  File "/home/lc178/install/QIIME1.6/lib/python2.7/shutil.py", line 52, in copyfileobj
    fdst.write(buf)
IOError: [Errno 28] No space left on device

I checked the /tmp and /home/lc178/tmp, and the temporary file is still created in /tmp instead of /home/lc178/tmp.
I think this might be the problem. But I don't know how to change it.

I've tried modify the parameter in these files,
 /home/lc178/install/QIIME1.6/lib/python2.7/site-packages/cogent/app/mothur.py
 /home/lc178/install/QIIME1.6/src/PyCogent-1.5.3/cogent/app/mothur.py 
 /home/lc178/install/QIIME1.6/src/PyCogent-1.5.3/build/lib.linux-x86_64-2.7/cogent/app/mothur.py
changing TmpDir='/tmp' to /home/lc178/tmp/ in def __init__(self, params=None, InputHandler=None, SuppressStderr=None,
                 SuppressStdout=None, WorkingDir=None, TmpDir='/tmp',

But it still failed. And I also added environment variables of $TMPDIR, $TMP, $TEMP, but still no use.
I don't know how to change it.

Here's my config:

[lc178@dav-dd-l0151 merge]$ print_qiime_config.py -t

System information
==================
         Platform: linux2
   Python version: 2.7.3 (default, Mar 15 2013, 11:25:05)  [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)]
Python executable: /home/lc178/install/QIIME1.6/bin/python
 
Dependency versions
===================
                     PyCogent version: 1.5.3
                        NumPy version: 1.5.1
                   matplotlib version: 1.1.0
                  biom-format version: 1.1.1
                QIIME library version: 1.6.0
                 QIIME script version: 1.6.0
        PyNAST version (if installed): 1.2
RDP Classifier version (if installed): rdp_classifier-2.2.jar
          Java version (if installed): 1.6.0_43
 
QIIME config values
===================
                     blastmat_dir: /home/lc178/install/QIIME1.6/src/blast/data
                         sc_queue: all.q
      topiaryexplorer_project_dir: None
     pynast_template_alignment_fp: /home/lc178/install/QIIME1.6/data/core_set_aligned.fasta.imputed
                  cluster_jobs_fp: /home/lc178/install/QIIME1.6/bin/start_parallel_jobs.py
pynast_template_alignment_blastdb: None
assign_taxonomy_reference_seqs_fp: /home/lc178/install/QIIME1.6/data/gg_12_10_otus/rep_set/97_otus.fasta
                     torque_queue: friendlyq
              qiime_test_data_dir: None
   template_alignment_lanemask_fp: /home/lc178/install/QIIME1.6/data/lanemask_in_1s_and_0s
                    jobs_to_start: 1
                cloud_environment: False
                qiime_scripts_dir: /home/lc178/install/QIIME1.6/src/qiime/scripts/
            denoiser_min_per_core: 50
                      working_dir: /home/lc178/tmp/
                    python_exe_fp: python
                         temp_dir: /home/lc178/tmp/
                      blastall_fp: blastall
                 seconds_to_sleep: 2
assign_taxonomy_id_to_taxonomy_fp: /home/lc178/install/QIIME1.6/data/gg_12_10_otus/taxonomy/97_otu_taxonomy.txt
 
 
running checks:
 
test_FastTree_supported_version (__main__.Qiime_config)
FastTree is in path and version is supported ... ok
test_INFERNAL_supported_version (__main__.Qiime_config)
INFERNAL is in path and version is supported ... ok
test_ParsInsert_supported_version (__main__.Qiime_config)
ParsInsert is in path and version is supported ... ok
test_R_supported_version (__main__.Qiime_config)
R is in path and version is supported ... ok
test_ampliconnoise_install (__main__.Qiime_config)
AmpliconNoise install looks sane. ... ok
test_blast_supported_version (__main__.Qiime_config)
blast is in path and version is supported ... ok
test_blastall_fp (__main__.Qiime_config)
blastall_fp is set to a valid path ... ok
test_blastmat_dir (__main__.Qiime_config)
blastmat_dir is set to a valid path. ... ok
test_cdbtools_supported_version (__main__.Qiime_config)
cdbtools is in path and version is supported ... ok
test_cdhit_supported_version (__main__.Qiime_config)
cd-hit is in path and version is supported ... ok
test_chimeraSlayer_install (__main__.Qiime_config)
no obvious problems with ChimeraSlayer install ... ok
test_clearcut_supported_version (__main__.Qiime_config)
clearcut is in path and version is supported ... ok
test_cluster_jobs_fp (__main__.Qiime_config)
cluster_jobs_fp is set to a valid path and is executable ... ok
test_denoiser_supported_version (__main__.Qiime_config)
denoiser aligner is ready to use ... ok
test_for_obsolete_values (__main__.Qiime_config)
local qiime_config has no extra params ... ok
test_gdata_install (__main__.Qiime_config)
gdata is installed ... ok
test_matplotlib_suported_version (__main__.Qiime_config)
maptplotlib version is supported ... ok
test_mothur_supported_version (__main__.Qiime_config)
mothur is in path and version is supported ... ok
test_muscle_supported_version (__main__.Qiime_config)
muscle is in path and version is supported ... ok
test_numpy_suported_version (__main__.Qiime_config)
numpy version is supported ... ok
test_pplacer_supported_version (__main__.Qiime_config)
pplacer is in path and version is supported ... ok
test_pynast_suported_version (__main__.Qiime_config)
pynast version is supported ... ok
test_pynast_template_alignment_blastdb_fp (__main__.Qiime_config)
pynast_template_alignment_blastdb, if set, is set to a valid path ... ok
test_pynast_template_alignment_fp (__main__.Qiime_config)
pynast_template_alignment, if set, is set to a valid path ... ok
test_python_exe_fp (__main__.Qiime_config)
python_exe_fp is set to a working python env ... ok
test_python_supported_version (__main__.Qiime_config)
python is in path and version is supported ... ok
test_qiime_scripts_dir (__main__.Qiime_config)
qiime_scripts_dir, if set, is set to a valid path ... ok
test_qiime_test_data_dir (__main__.Qiime_config)
qiime_test_data_dir, if set, is set to a valid path ... ok
test_raxmlHPC_supported_version (__main__.Qiime_config)
raxmlHPC is in path and version is supported ... ok
test_rtax_supported_version (__main__.Qiime_config)
rtax is in path and version is supported ... ok
test_temp_dir (__main__.Qiime_config)
temp_dir, if set, is set to a valid path ... ok
test_template_alignment_lanemask_fp (__main__.Qiime_config)
template_alignment_lanemask, if set, is set to a valid path ... ok
test_uclust_supported_version (__main__.Qiime_config)
uclust is in path and version is supported ... ok
test_usearch_supported_version (__main__.Qiime_config)
usearch is in path and version is supported ... ok
test_working_dir (__main__.Qiime_config)
working_dir, if set, is set to a valid path ... ok
 
----------------------------------------------------------------------
Ran 35 tests in 0.314s
 
OK



Please help me. Thanks.

Tony Walters

unread,
Apr 9, 2013, 7:50:35 PM4/9/13
to qiime...@googlegroups.com
Hello Isiah,

In this case, I think the only way to change the tmp directory used by mothur would be to modify the pycogent app controller:
cogent/app/mother.py

on line 52 (after making a copy of the file):
    def __init__(self, params=None, InputHandler=None, SuppressStderr=None,
                 SuppressStdout=None, WorkingDir=None, TmpDir='/tmp',
                 TmpNameLen=20, HALT_EXEC=False)

Change the TmpDir setting here to the location you want it.

-Tony



--
 
---
You received this message because you are subscribed to the Google Groups "Qiime Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qiime-forum...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Isiah

unread,
Apr 11, 2013, 11:39:29 AM4/11/13
to qiime...@googlegroups.com
Hi Tony,

Thanks for your reply. After I changed all the /tmp in the files of cogent/app/mother.py and /cogent/app/util.py to my local directories. It works.

Thanks,
Isiah
Reply all
Reply to author
Forward
0 new messages