Closed caloto closed 6 years ago
It gives me:
... Making bed file
... Getting regions
Traceback (most recent call last):
File "make_trinuc_maf.py", line 48, in
@caloto As you can see in the error message, the call to bedtools
include a hardcoded path to a fasta file. Unless you're working on the luna cluster within MSK, you won't have access to that file.
@kpjonsson Thank you so much for your answer! Is there any way to fix it without being in luna cluster?
You can download the assembly here: https://grch37.ensembl.org/Homo_sapiens/Info/Index
Note, only use GRCh37 if that's the genome version used in your MAF file.
Ok, very helpful! Thank you!
Thank you for your time.
I have followed your recommendations (thank you so much) downloading GRCh37 human genome assembly as "Homo_sapiens.GRCh37.dna.primary_assembly.fa". Then, I have tried to call this file just changing the "subprocess.call" line as follows:
print " ... Getting regions" subprocess.call("bedtools getfasta -tab -fi Homo_sapiens.GRCh37.dna.primary_assembly.fa -bed tmp.bed -fo tmp.tsv".split(" "))
I have tried also: subprocess.call("bedtools getfasta -tab -fi ./Homo_sapiens.GRCh37.dna.primary_assembly.fa -bed tmp.bed -fo tmp.tsv".split(" "))
and:
subprocess.call("bedtools getfasta -tab -fi /Users/lab02/Desktop/hotspots-master/Homo_sapiens.GRCh37.dna.primary_assembly.fa -bed tmp.bed -fo tmp.tsv".split(" "))
and:
subprocess.call("bedtools getfasta -tab -fi ./Users/lab02/Desktop/hotspots-master/Homo_sapiens.GRCh37.dna.primary_assembly.fa -bed tmp.bed -fo tmp.tsv".split(" "))
Any of the previous changes have resulted in the same error:
... Making bed file ... Getting regions Traceback (most recent call last): File "make_trinuc_maf.py", line 48, in subprocess.call("bedtools getfasta -tab -fi /ifs/depot/assemblies/H.sapiens/GRCh37/gr37.fasta -bed tmp.bed -fo tmp.tsv".split(" ")) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call return Popen(*popenargs, **kwargs).wait() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in init errread, errwrite) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory Error in read.table(file = file, header = header, sep = sep, quote = quote, : no lines available in input Calls: read.csv -> read.table Execution halted
Can you please help me with this issue??
Thank you very much for your time and attention!
Judging by that error message the script is still trying to find the fasta file located at the hardcoded path on our cluster.
That is my idea, but I cannot really fix it
Do you have any idea why the program is still looking your directory?
How exactly are you running it?
I have all the files in the same folder. Using the terminal - and in the folder's directory-, I paste:
./hotspot_algo.R \ --input-maf=pancancer_unfiltered.maf \ --rdata=hotspot_algo.Rdata \ --gene-query=genes_of_interest.txt \ --output-file=sig_hotspots.txt
and press enter. Of course, all this process modifying the original line in make_trinuc_maf.py:
subprocess.call("bedtools getfasta -tab -fi /ifs/depot/assemblies/H.sapiens/GRCh37/gr37.fasta -bed tmp.bed -fo tmp.tsv".split(" "))
for:
subprocess.call("bedtools getfasta -tab -fi ./Homo_sapiens.GRCh37.dna.primary_assembly.fa -bed tmp.bed -fo tmp.tsv".split(" "))
subprocess.call("bedtools getfasta -tab -fi /Users/lab02/Desktop/hotspots-master/Homo_sapiens.GRCh37.dna.primary_assembly.fa -bed tmp.bed -fo tmp.tsv".split(" "))
subprocess.call("bedtools getfasta -tab -fi ./Users/lab02/Desktop/hotspots-master/Homo_sapiens.GRCh37.dna.primary_assembly.fa -bed tmp.bed -fo tmp.tsv".split(" "))
That's all. Thank you again for your attention to this issue.
I'm not sure what's wrong. I don't see how you can get that error message if you have modified that line of code.
That's right, it is so mysterious... Could be something inside the subprocess?
The error has been solved. If someone suffers from this, the answer would be reinstall bedtool package from Hombrew instead of any other server.
Thank you very much for your help and attention!!
Great.
https://github.com/taylor-lab/hotspots/blob/733c727bd4b9f7c1a7f4508b9a467b2f31cacf33/make_trinuc_maf.py#L48
When I run the code, it gives back an error here. No ___tmp.tsv file in the directory. No such file has been created before. Can you please help me??
Thank you!