Hello, I am doing RNA-seq analysis, using the pipeline after StringTie quantification step, I have decided to use DESeq2 package(count-based methods) for Differential expression analysis DESeq2 and using the following commands:
python2.7 ./prepDE.py -i sample_list.txt
But every time I am facing an error
Traceback (most recent call last):
File "./prepDE.py", line 274,
in <module> my_writer.writerow(geneDict[i])
File "/usr/lib/python2.7/csv.py", line 152,
in writerow return self.writer.writerow(self._dict_to_list(rowdict))
ValueError: I/O operation on closed file
Since I don't know python I couldn't be able to solve this issue.
my sample_list file contains:
Treatment1 ./path/to/.gtf/file/which/is/obtained/from/stringtie/reestimation
Treatment2 ./path/to/.gtf/file/which/is/obtained/from/stringtie/reestimation
Control1 ./path/to/.gtf/file/which/is/obtained/from/stringtie/reestimation
. . . and so on The output which i am getting is transcript_count_matrix.csv and gene_count_matrix.csv from which gene_count_matrix.csv doesn't contain any values except first row:gene_id and Treatment1, Treatment2, Control1,etc
Any help in this regard will be deeply appreciated.
You can try another library in R called tximport.
https://bioconductor.org/packages/devel/bioc/vignettes/tximport/inst/doc/tximport.html
The link above is a full tutorial how to import data to DESeq2. It also includes data from StringTie. Maybe it can solve your problem quicker.
Thank you very much I'll do it
You should change this ti an acutal answer :-)
Exactly this answer has previously been given to OP. Please follow up your old questions.
Can you share the contents of ./prepDE.py or a github link to the script.
prepDE.py
While you indeed cannot run DESeq2 this is not the cause of your error. Your error lies within the prepDE.py script from the Tuxedo pipeline. I have altered your title to better describe your problem.
Thank you for your reply. I downloaded the script again and it ran successfully, The problem was in the script bymistakenly something would have got editted by me.