Entering edit mode
7.5 years ago
yangzituo
•
0
Hi everyone, I am new in RNA-seq and Python. Recently, I meet a problem. When I use HTSeq to count my SAM file, I have to do it one by one. So I check in the website and someone say it can be done in batch operation. There is following commands:
for i in *.sam
do
echo $i
./local/bin/htseq-count $i ./hg19.gtf > $i.count
done
But I cannot use it in my python. Does anyone may help me?? Thanks a lot!!!
What does that mean?
If you get an error message, it's very helpful to share that message too.
I have also added code markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:
sorry, i am new in this fiels, here is the code that guy post:
But when I follow him, it stop in line 1:
the system tells me "invalid syntax"
That's shell scripting code, not python.
oh, so it cannot use in the Python?
I again added code formatting to your post. See my previous comment on how you can do this yourself next time.
There are a couple of things wrong with that you command.
:
aftersam
done
(while you did include that in the previous command)which htseq-count
You have to be quite exact when executing commands.
thank you. But when I wirte the first code
the python tells me that "invalid syntax"
That's because, as Devon said, it's not Python code. You execute it just in your terminal (assuming you are using Linux/Mac).