Hello,
I am working on inputting my data from stringtie -e-B to then perform differential expression on my samples using Deseq. I am running the command 'python prepDE.py -i sample_list.txt' but keep getting this error :
python ./prepDE.py -i /scratch/exp_radonc/bkirby/scratch/mazur_lab_scratch/mazur_lab/SH-ERK5_RNA480/ballgown/sample_list.txt
File "./prepDE.py", line 32
print "Error: Text file with sample ID and path invalid (%s)" % (line.strip())
^
SyntaxError: invalid syntax
my sample_list file looks like this :
[bkirby@cnode241 ballgown]$ head sample_list.txt
sample1 /SH-11/SH-11.gtf
sample2 /SH-12/SH-12.gtf
sample3 /SH-13/SH-13.gtf
sample4 /SH-14/SH-14.gtf
sample5 /SH-15/SH-15.gtf
sample6 /SH-16/SH-16.gtf
sample7 /SH-17/SH-17.gtf
sample8 /SH-18/SH-18.gtf
sample9 /SH-19/SH-19.gtf
and subsequent directories containing the .gtf files in my working directory like this:
[bkirby@cnode241 ballgown]$ ls
SH-11 SH-12 SH-13 SH-14 SH-15 SH-16 SH-17 SH-18 SH-19 prepDE.py prepDE_multi.py sample_list.txt sample_lst.txt
Here is what each "SH" directory contains inside it:
[bkirby@cnode241 SH-11]$ ls
SH-11.gtf e2t.ctab e_data.ctab i2t.ctab i_data.ctab t_data.ctab
Has anyone come across this issue or know any quick fixes? Am I missing something here with the way I'm setting up the command?
Here is the section of code that is giving me an error:
samples = [] # List of tuples. If sample list, (first column, path). Else, (subdirectory name, path to gtf file in subdirectory)
if (os.path.isfile(opts.input)):
# gtfList = True
try:
fin = open(opts.input, 'r')
for line in fin:
if line[0] != '#':
lineLst = tuple(line.strip().split())
if (len(lineLst) != 2):
print "Error: Text file with sample ID and path invalid (%s)" % (line.strip())
exit(1)
Any help is appreciated!
Thanks so much,
Bryce
Please use the formatting bar (especially the
code
option) to present your post better. I've done it for you this time.What is the full path to
/SH-11/SH-11.gtf
?