SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
map with defined number of mismatches Pol8 Bioinformatics 1 10-16-2015 08:20 PM
Extract reads with defined nucleotide at defined aligned position charlescoldroom Bioinformatics 2 03-22-2014 08:11 AM
BAM : select only alignment of a defined length NicoBxl Bioinformatics 0 08-18-2011 03:29 AM
BS_Seeker 'original_BS' is not defined Gangcai Bioinformatics 2 11-16-2010 09:26 PM

Reply
 
Thread Tools
Old 03-24-2016, 08:42 PM   #1
ssb
Junior Member
 
Location: USA

Join Date: Mar 2016
Posts: 4
Default HTSeq - NameError: name 're' is not defined

I'm trying to use HTSeq but getting "NameError: name 're' is not defined" after import HTSeq command. As I'm a novice, I don't know how to resolve the issue. It would be nice if someone could help me in getting through.
>>> import HTSeq

Traceback (most recent call last):
File "<pyshell#11>", line 1, in <module>
import HTSeq
File "C:\Python27\lib\site-packages\HTSeq\__init__.py", line 144, in <module>
_re_attr_main = re.compile( "\s*([^\s\=]+)[\s=]+(.*)" )
NameError: name 're' is not defined
ssb is offline   Reply With Quote
Old 03-25-2016, 07:09 AM   #2
fanli
Senior Member
 
Location: California

Join Date: Jul 2014
Posts: 198
Default

Does this work for you?

Code:
import re
Did you follow the installation instructions for Windows?
fanli is offline   Reply With Quote
Old 03-25-2016, 07:24 AM   #3
ssb
Junior Member
 
Location: USA

Join Date: Mar 2016
Posts: 4
Default

Yes, I followed all instructions.
No, "import re" doesn't work. See below,


>>> import re
>>> import HTSeq

Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import HTSeq
File "C:\Python27\lib\site-packages\HTSeq\__init__.py", line 9, in <module>
from _HTSeq import *
File "numpy.pxd", line 155, in init HTSeq._HTSeq (src/_HTSeq.c:34392)
ValueError: numpy.dtype has the wrong size, try recompiling
>>> import HTSeq

Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import HTSeq
File "C:\Python27\lib\site-packages\HTSeq\__init__.py", line 144, in <module>
_re_attr_main = re.compile( "\s*([^\s\=]+)[\s=]+(.*)" )
NameError: name 're' is not defined
ssb is offline   Reply With Quote
Old 03-25-2016, 07:48 AM   #4
fanli
Senior Member
 
Location: California

Join Date: Jul 2014
Posts: 198
Default

Probably should try recompiling numpy:

http://stackoverflow.com/questions/1...ry-recompiling
fanli is offline   Reply With Quote
Old 03-25-2016, 08:24 AM   #5
maubp
Peter (Biopython etc)
 
Location: Dundee, Scotland, UK

Join Date: Jul 2009
Posts: 1,542
Default

How did you install HTSeq and NumPy?

My guess is you have a mis-match between the version of NumPy installed, and the version that HTSeq expects (i.e. what it was compiled against).
maubp is offline   Reply With Quote
Old 03-25-2016, 08:36 AM   #6
ssb
Junior Member
 
Location: USA

Join Date: Mar 2016
Posts: 4
Default

Thanks fanli!
I'll recompile and check whether the same error comes again or not.
Is R / Bioconductor useful in high throughput sequence analysis?
ssb is offline   Reply With Quote
Old 03-25-2016, 12:09 PM   #7
fanli
Senior Member
 
Location: California

Join Date: Jul 2014
Posts: 198
Default

Yes, R is pretty handy for all sorts of statistical things. For example, differential expression testing using edgeR, DESeq2, etc.
fanli is offline   Reply With Quote
Old 03-25-2016, 04:30 PM   #8
ssb
Junior Member
 
Location: USA

Join Date: Mar 2016
Posts: 4
Default

Thanks fanli!
ssb is offline   Reply With Quote
Reply

Tags
htseq, nameerror, python

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 12:52 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO