mhammell-laboratory / TEtranscripts

A package for including transposable elements in differential enrichment analysis of sequencing datasets.
http://hammelllab.labsites.cshl.edu/software/#TEtranscripts
GNU General Public License v3.0
218 stars 29 forks source link

tetranscripts incompatible with pysam >= 0.9.0 #10

Closed rvalieris closed 6 years ago

rvalieris commented 7 years ago

The requirements claim pysam > 0.8, but I got an error running with pysam 0.9.0:

[...]
INFO  @ Tue, 21 Feb 2017 11:30:04: Done building TE index ......

INFO  @ Tue, 21 Feb 2017 11:30:04: 
Reading sample files ...

Error occured when reading first line of sample file sample1.bam.
Error: 'samtools returned with error 1: stdout=, stderr=[bam_sort] Use -T PREFIX / -o FILE to specify temporary and final output file
s\n\nUsage: samtools sort [options...] [in.bam]\n\nOptions:\n\n  -l INT     Set compression level, from 0 (uncompressed) to 9 (best)\
n\n  -m INT     Set maximum memory per thread; suffix K/M/G recognized [768M]\n\n  -n         Sort by read name\n\n  -o FILE    Write
 final output to FILE rather than standard output\n\n  -T PREFIX  Write temporary files to PREFIX.nnnn.bam\n\n  -@, --threads INT\n\n
             Set number of sorting and compression threads [1]\n\n      --input-fmt-option OPT[=VAL]\n\n               Specify a sing
le input file format option in the form\n\n               of OPTION or OPTION=VALUE\n\n  -O, --output-fmt FORMAT[,OPT[=VAL]]...\n\n  
             Specify output format (SAM, BAM, CRAM)\n\n      --output-fmt-option OPT[=VAL]\n\n               Specify a single output 
file format option in the form\n\n               of OPTION or OPTION=VALUE\n\n      --reference FILE\n\n               Reference sequ
ence FASTA FILE [null]\n'
[Exception type: SamtoolsError, raised in utils.py:65]

I suspect this is because pysam 0.9.0 uses samtools 1.3, which removed the old way of calling samtools sort

olivertam commented 7 years ago

Hi. You are right about the issue with the updated pysam and samtools calling samtools sort in a different way. There was a fix that was suggested by another user, and we are in the process of reviewing and implementing it. Hopefully we can address this issue soon. Thanks, and apologies for our slow responses.

olivertam commented 6 years ago

Issue relating to the newer version of samtools/pysam should be addressed in TEToolkit v2.0.1. Note that pysam requirement is now v0.9.0 or higher