BrooksLabUCSC / flair

Full-Length Alternative Isoform analysis of RNA
Other
208 stars 71 forks source link

ssCorrect.py FileNotFoundError when running flair correct #200

Closed peterthorpe5 closed 2 years ago

peterthorpe5 commented 2 years ago

Dear Flair,

I am running flair correct with the following command:

 python3 ./flair/flair.py correct --gtf gencode.v39.primary_assembly.annotation.gtf -q query.bed12 -g 
 GRCh38.primary_assembly.genome.fa  --threads 12

It runs through just after here:

.... Step 5/5: Correcting Splice Sites: 100%|██████████| 46/46 [00:08<00:00, 5.49it/s]

Then fails with the following error (the exact line numbers may be 2 or 3 out as I put some print statements in regarding python versions) import sys print(sys.version) print(sys.executable):

File "/flair/bin/ssCorrect.py", line 427, in main() File "/flair/bin/ssCorrect.py", line 409, in main with open(os.path.join(tempDir, "%s_inconsistent.bed" % chrom),'rb') as fd: FileNotFoundError: [Errno 2] No such file or directory: '/flair/gencode/tmp_c3138f8a-df54-4d9e-8bc9-79bc6ec85c20/chr1_inconsistent.bed' Correction command did not exit with success status

In the temp folder, there are no "inconsistent.bed" or "consistent.bed" files. Only "temp_reads.bed", "known_juncs.bed".

Could you please advise on how to fix this?

regards,

Pete

wenmm commented 2 years ago

I came across this problem too,

peterthorpe5 commented 2 years ago

@wenmm - the problem for me was a conda python version issue. The python in the main installation, not the envirmnet seems to keep being my default python, which was very irritating.

so I added this to the top of flair .py and the other scripts which it uses.

!/usr/bin/env python3.6

And it worked for me.

Jeltje commented 2 years ago

I think the latest release fixes a similar problem (see #207). It also requires python3, which may solve another issue or two.

If you still see this problem with release v1.6.1 or after pip install flair-brookslab, please reopen this ticket.

mintstella0419 commented 2 years ago

Hi, I just tried with v1.6.1 but it is still having the same issue. I don't see any inconsistent.bed or corrected.bed generated in the tmp folder. Can you have a look into again?

Jeltje commented 2 years ago

Sure! First off, are the chromosome names in your input bed, gtf, and genome fasta files identical? You would get this error if, for instance, your gtf file used '1' instead of 'chr1'