This is a test version of Biostars. For the public version, visit https://www.biostars.org.
HTseq problem....... with code for qa module published in the HTseq web tutorial

I am new to Python (trying to learn through MOOCS courses and online tutorials).

I have been trying to use HTSeq (on Windows) and have successfully installed it, along with numpy and matolib. I am beginning to work through the online HTSeq website "tour" and can read in and slice the example yeast RNASeq excerpt fastq.

I now want to try and do the qa and have tried the given code (since my Python library folder is not in my working directory path):

python -m HTSeq.scripts.qa -t solexa-fastq "yeast_RNASeq_excerpt_sequence.txt"
                          ^

But I get SyntaxError: invalid syntax

Can anyone help? As far as I can see I have written the code as per the example,

python -m HTSeq.scripts.qa [options] read_file

but clearly I've done something dumb.

Kind regards
Doiremac

htseq python hts sequencing-qc

What is complete error ?

Goutham many thanks for your reply. I attach a screen shot of the whole history. Thank you in advance for any words of wisdom!

Roisin

Sorry, yes here is the full history

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Windows\system32>chdir C:\\Users\\roisin\\Desktop\\learn py

C:\Users\roisin\Desktop\learn py>C:\\Python27\\python.exe
Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on wi
n32
Type "help", "copyright", "credits" or "license" for more information.
>>> import HTSeq
>>> python -m HTSeq.scripts.qa -t solexa-fastq "yeast_RNASeq_excerpt.sequence.tx
t"
  File "<stdin>", line 1
    python -m HTSeq.scripts.qa -t solexa-fastq "yeast_RNASeq_excerpt.sequence.tx
t"
                  ^
SyntaxError: invalid syntax
>>>

Doiremac

1 answer

Just run the command in command prompt. Not in the python interpreter:

You don't need to do:

C:\Users\roisin\Desktop\learn py>C:\\Python27\\python.exe

Directly run:

python.exe -m HTSeq.scripts.qa -t solexa-fastq "yeast_RNASeq_excerpt.sequence.txt"

If everything is installed properly, it executes. Otherwise read some basic tutorials about installing python modules and running python scripts and then try.

Goutham that works! I think I need to learn to walk with Python,before I learn to run. Much appreciated Roisin

Good to hear it installed properly. :-)

Log in to answer this question.