This page contains some frequently asked questions and commonly encountered issues with TEToolkit. If your question or issue is not addressed here, please contact us.

Commonly encountered issues


Where can I find a transposable element GTF file for the organism or genome build that I want to use for my analysis?
Error: ‘NoneType’ object has no attribute ‘reference_start’ [Exception type: AttributeError, raised in TEtranscripts:288]
Error: ‘module’ object has no attribute ‘AlignmentFile’ [Exception type: AttributeError, raised in TEtranscripts:199]
Error in parametricDispersionFit(means, disps) : Parametric dispersion fit failed. Try a local fit and/or a pooled estimation.
Why did the differential analysis fail on the test files that were provided?

Please contact us if your question is not addressed below.

Where can I find a transposable element GTF file for the organism or genome build that I want to use for my analysis?

You can see what GTF files are already available here. If what you’re looking for is not there, you can contact us, and we will try to generate it for you.

How do I resolve the following error?

Error: 'NoneType' object has no attribute 'reference_start'
[Exception type: AttributeError, raised in TEtranscripts:288]


This error arises when TEtranscripts failed to find the aligned mates of a paired-end read in the alignment file. TEtranscripts requires the aligned mates to be found adjacent to each other in the BAM file.

If you have sorted your BAM file, you can check how it was sorted using the following command:

$ samtools view -H [BAM file] | grep "SO:"

If your BAM file is sorted by coordinate (SO:coordinate), please specify the --sortByPos option when running TEtranscripts.

How can I resolve the following error?

Error: 'module' object has no attribute 'AlignmentFile'
[Exception type: AttributeError, raised in TEtranscripts:199]

This error arises due to an old version of the pysam library being used. TEtranscripts depends on pysam library version above 0.8, and is incompatible with older pysam libraries.
To check your pysam version, run the following commands on your command prompt:

$ python
>>> import pysam
>>> print pysam.__version__

If the output is not ’0.8′ or higher (e.g. ’0.8.3′), then you will need to install a new version of pysam.

I installed pysam version 0.8 (or higher), but why do I still get same error as above?

This is probably due to having both the newer (version 0.8 or higher) and an older version installed, but python calling the older version by default.

If you installed pysam through pip, you can type:
$ pip list
This should show you the version of the package that was installed with pip.
To find the location of your pysam installed through pip, you can type:
$ pip show pysam

If you installed from source (e.g. python setup.py install), you can run the following commands:

$ python
>>> import pysam
>>> print pysam.__version__
'0.8.3'
>>> print pysam.__file__
'/lib/python2.6/site-packages/pysam-0.8.3-py2.6-linux-x86_64.egg/pysam/__init__.pyc'

This will tell you where the default pysam library is installed.

If your newer version of pysam is not listed, this likely means that it is not on the python search path. You can confirm this by running the following:

$ python
>>> import sys
>>> print "\n".join(sys.path)

For example, if pysam.__file__ produces this:
'/lib/python2.6/site-packages/pysam-0.8.3-py2.6-linux-x86_64.egg/pysam/__init__.pyc'
Then you should ensure that '/lib/python2.6/site-packages/pysam-0.8.3-py2.6-linux-x86_64' should be in the output above.

If you do not find the folder containing your pysam installation, then you will need to add it to the search path. You can do this by setting your PYTHONPATH variable.
This can be done either by running the following command:
$ export PYTHONPATH=/{path to your pysam version 0.8}:$PYTHONPATH

or add the command above to your .bashrc file
The former will enable python to use the newer pysam library for that particular session, while the latter will enable all future sessions to use the newer pysam library. This is useful if the newer pysam library might cause conflicts with other programs.

If your folder is in the search path, but listed after the folder with the default pysam, you can follow the procedure in the paragraph above to ensure that Python chooses the newer version of pysam as its default.

How do I resolve the following error?

Error in parametricDispersionFit(means, disps) : Parametric dispersion fit failed. Try a local fit and/or a pooled estimation.

This error is thrown due to the inability of DESeq to fit a dispersion model to your data. To address this, you can modify the following line in the .R file generated by TEtranscripts:

cds <- estimateDispersions(cds)

to

cds <- estimateDispersions(cds,fitType="local")

I was running TEtranscripts with the provided test files, and got the following error. How can I resolve this?

CRITICAL @ Wed, 02 Dec 2015 18:20:21: Error in running differential analysis!
CRITICAL @ Wed, 02 Dec 2015 18:20:21: Error: [Errno 13] Permission denied
CRITICAL @ Wed, 02 Dec 2015 18:20:21: [Exception type: OSError, raised in subprocess.py:1335]

This error is likely caused by the inability of TEtranscripts to run the R code for differential analysis. Here are things that you should check:

  1. The gene/TE abundance table generated by TEtranscripts (***.cntTable) is in the output folder and contains counts for genes & TE in the libraries processed.
  2. The R code generated by TEtranscripts (***.R) is the output folder.
  3. Rscript is in your PATH variable.

To check if Rscript could be found, you can type the following:

$ which Rscript

If you get the following results:

/usr/bin/which: no Rscript in (...)

That means that the system could not find the Rscript program (which is installed alongside R).
This is an issue encountered when using RStudio (especially in Mac OS X), where the R and Rscript programs are not added to the PATH variable upon installation.
If you’ve installed R/RStudio on Mac OS X in a standard location, you can direct the system to the Rscript program by doing the following:

ln -s /Library/Frameworks/R.framework/Resources/bin/Rscript /local/home/usr/bin

if /local/home/usr/bin is in your PATH variable.