python permission denied problem & any way to avoid installing bowtie2

129 views
Skip to first unread message

yunli...@gmail.com

unread,
Dec 16, 2015, 9:54:00 AM12/16/15
to kneaddata users
Hi all,
I hava some questions when using kneaddata. I only need to use bmtagger to remove human reads. However, even I set --bmtagger parameter when running the program, the software will automatically check the installation of bowtie2 and indexing reference database bowtie2 used. Is there any way I can avoid installing bowtie2 and the related reference database if I only interested in bmtagger?

After I installed bowtie2 and finally can run the program, I have a “python permission denied problem”. I saw in the user manual "If you do not have write permissions to '/usr/lib/', then add the option "--user" to the install command." However, I already have python installed before I installed kneaddata. How can I solve the problem?

Here is the error:
Traceback (most recent call last):
  File "/usr/local/bin/kneaddata", line 9, in <module>
    load_entry_point('kneaddata==0.4.6.1', 'console_scripts', 'kneaddata')()
  File "/usr/local/lib/python2.7/dist-packages/kneaddata-0.4.6.1-py2.7.egg/kneaddata/knead_data.py", line 390, in main
    storageheavy.storage_heavy(args)
  File "/usr/local/lib/python2.7/dist-packages/kneaddata-0.4.6.1-py2.7.egg/kneaddata/storageheavy.py", line 888, in storage_heavy
    debug          = debug)
  File "/usr/local/lib/python2.7/dist-packages/kneaddata-0.4.6.1-py2.7.egg/kneaddata/storageheavy.py", line 280, in tag
    stdout=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied


Thanks,
Yun

Andy Shi

unread,
Dec 18, 2015, 12:00:52 PM12/18/15
to kneadda...@googlegroups.com
Hi Yun,

Thank you for your interest in KneadData! Unfortunately, because Bowtie2 is the default, its dependency gets checked every time. It's possible to not install bowtie2 by using the --bypass-dependencies flag when installing, e.g. you would use 

python setup.py install --bypass-dependencies

You may need to use sudo, or you may need to also include the --user flag. During installation, the reference databases for Bowtie2 are not downloaded.

The error you're getting probably means that KneadData can't execute the BMTagger executable. To check, do 

ls -l [PATH_TO_BMTAGGER]

and see if the first letters are "-rwx" or something similar. If it's not, you'll need to make BMTagger executable using

chmod u+x [PATH_TO_BMTAGGER]

Let me know if this helps. 

Thanks!

yunli...@gmail.com

unread,
Dec 18, 2015, 1:21:55 PM12/18/15
to kneaddata users
Hi Andy,
Thank you for your email.
The BMTagger is executable, I can run it independently and I added the path in the command when I run kneaddata. If I tried to run in super user mode "sudo kneaddata ...." I get the following error, The "ImportError" will also appeared if I install the software by adding ''--user". Do you know what is wrong?

Traceback (most recent call last):
  File "/usr/local/bin/kneaddata", line 9, in <module>
    load_entry_point('kneaddata==0.4.6.1', 'console_scripts', 'kneaddata')()
  File "/usr/local/lib/python2.7/dist-packages/setuptools-12.2-py2.7.egg/pkg_resources/__init__.py", line 521, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python2.7/dist-packages/setuptools-12.2-py2.7.egg/pkg_resources/__init__.py", line 2631, in load_entry_point
    raise ImportError("Entry point %r not found" % ((group, name),))
ImportError: Entry point ('console_scripts', 'kneaddata') not found

Thanks,
Yun

Andy Shi

unread,
Dec 18, 2015, 4:12:47 PM12/18/15
to kneaddata users
Hi Yun,

Can you post the command(s) you used to install kneaddata, and the commands you used to run kneaddata? It seems like kneaddata was not properly installed/configured.

Yun Li

unread,
Dec 21, 2015, 10:26:10 AM12/21/15
to Andy Shi, kneaddata users
Hi Andy,

For install I use: 
sudo python setup.py install

To run the program, if I use 
kneaddata --input test1.fastq --input2 test2.fastq --reference-db /home/qiime/BiosoftwareLibrary/hs38_ref/hs38 --bmtagger --output-prefix kneaddata_test --output kneaddata_output --extract --bmtagger-path /home/qiime/BiosoftwareLibrary/bmtools/bmtagger

2015-12-21 10:19:34,166 INFO: Initial number of reads: test1.fastq: 250
test2.fastq: 250
2015-12-21 10:19:34,167 INFO: Trimming...
2015-12-21 10:19:35,570 INFO: Finished running Trimmomatic. Checking output files exist... 
2015-12-21 10:19:35,579 INFO: Number of reads after trimming: /home/qiime/Desktop/TMP/kneaddata_output/kneaddata_test.trimmed.1.fastq: 200
/home/qiime/Desktop/TMP/kneaddata_output/kneaddata_test.trimmed.2.fastq: 200
/home/qiime/Desktop/TMP/kneaddata_output/kneaddata_test.trimmed.single.1.fastq: 8
/home/qiime/Desktop/TMP/kneaddata_output/kneaddata_test.trimmed.single.2.fastq: 37
2015-12-21 10:19:35,580 INFO: Decontaminating
Traceback (most recent call last):
  File "/usr/local/bin/kneaddata", line 9, in <module>
    load_entry_point('kneaddata==0.4.6.1', 'console_scripts', 'kneaddata')()
  File "/usr/local/lib/python2.7/dist-packages/kneaddata-0.4.6.1-py2.7.egg/kneaddata/knead_data.py", line 390, in main
    storageheavy.storage_heavy(args)
  File "/usr/local/lib/python2.7/dist-packages/kneaddata-0.4.6.1-py2.7.egg/kneaddata/storageheavy.py", line 888, in storage_heavy
    debug          = debug)
  File "/usr/local/lib/python2.7/dist-packages/kneaddata-0.4.6.1-py2.7.egg/kneaddata/storageheavy.py", line 280, in tag
    stdout=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied


If I run with superuser mode:
sudo kneaddata --input test1.fastq --input2 test2.fastq --reference-db /home/qiime/BiosoftwareLibrary/hs38_ref/hs38 --bmtagger --output-prefix kneaddata_test --output kneaddata_output --extract --bmtagger-path /home/qiime/BiosoftwareLibrary/bmtools/bmtagger

Traceback (most recent call last):
  File "/usr/local/bin/kneaddata", line 9, in <module>
    load_entry_point('kneaddata==0.4.6.1', 'console_scripts', 'kneaddata')()
  File "/usr/local/lib/python2.7/dist-packages/setuptools-12.2-py2.7.egg/pkg_resources/__init__.py", line 521, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python2.7/dist-packages/setuptools-12.2-py2.7.egg/pkg_resources/__init__.py", line 2631, in load_entry_point
    raise ImportError("Entry point %r not found" % ((group, name),))
ImportError: Entry point ('console_scripts', 'kneaddata') not found

Thank you so much,
Yun

--
You received this message because you are subscribed to a topic in the Google Groups "kneaddata users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kneaddata-users/tkUsw1VMHYY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kneaddata-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kneaddata-users/f8e678d6-49f0-4f3b-b1b8-5895861e9d82%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Andy Shi

unread,
Jan 6, 2016, 10:10:10 PM1/6/16
to kneaddata users, and...@college.harvard.edu
Hi Yun,

I think that the bmtagger-path option is specified incorrectly. It seems like you set it to the folder that contains the bmtagger executable, but not to the bmtagger executable itself. If you use the first command as

kneaddata --input test1.fastq --input2 test2.fastq --reference-db /home/qiime/BiosoftwareLibrary/hs38_ref/hs38 --bmtagger --output-prefix kneaddata_test --output kneaddata_output --extract --bmtagger-path /home/qiime/BiosoftwareLibrary/bmtools/bmtagger/bmtagger.sh

it might fix your issue.

yunli...@gmail.com

unread,
Jan 21, 2016, 1:04:50 PM1/21/16
to kneaddata users, and...@college.harvard.edu
Hi Andy,
I tried. I still got permisson denied error. I tried to use bowtie2, and I do not have any problem in running kneaddata. However, if I use bmtagger, I will have python permisson issue.

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