BrooksLabUCSC / flair

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

open(os.path.join(tempDir, "%s_inconsistent.bed" % chrom),'rb') as fd #233

Closed gaobaoqing-picb closed 8 months ago

gaobaoqing-picb commented 1 year ago

Copy and paste the exact command you tried to run flair correct -q ${i}_mapped_q1.bed12 -f /data/rnomics8/gaobaoqing/tsa-seq_lxq/20220715_lxq/backup/index/t2t_v2.0_hisat2/chm13.draft_v2.0.gene_annotation.gtf -g /data/rnomics8/gaobaoqing/tsa-seq_lxq/20220715_lxq/backup/index/t2t_v2.0minimap2/chm13v2.0.fa --threads 4 --output sample${i}_flair --print_check

How did you install Flair?

  1. git cloned the current repository

What happened?

Step 5/5: Correcting Splice Sites: 100%|██████████████████████████| 25/25 [00:22<00:00,  1.10it/s]
Traceback (most recent call last): 100%|██████████████████████████| 25/25 [00:22<00:00,  1.66s/it]
  File "/data/rnomics8/gaobaoqing/tsa-seq_lxq/nanopore/softwares/flair/src/flair/ssCorrect.py", line 423, in <module>
    main()
  File "/data/rnomics8/gaobaoqing/tsa-seq_lxq/nanopore/softwares/flair/src/flair/ssCorrect.py", line 402, in main
    with open(os.path.join(tempDir, "%s_inconsistent.bed" % chrom),'rb') as fd:
FileNotFoundError: [Errno 2] No such file or directory: '/data/rnomics8/gaobaoqing/tsa-seq_lxq/nanopore/20220909/deal_data/mapping/1/6b18a24c-825e-41d2-ba39-caa548c5aad1/chr1_inconsistent.bed'
Correction command did not exit with success status:
/data/rnomics10/gaobaoqing/anaconda3/envs/tsa-seq2/bin/python3 /data/rnomics8/gaobaoqing/tsa-seq_lxq/nanopore/softwares/flair/src/flair/ssCorrect.py -i 1_mapped_q1.bed12 -w 15 -p 4 -o sample_1_flair --progress -f /data/rnomics8/gaobaoqing/tsa-seq_lxq/20220715_lxq/backup/index/t2t_v2.0_minimap2/chm13v2.0.fa --correctStrand -g /data/rnomics8/gaobaoqing/tsa-seq_lxq/20220715_lxq/backup/index/t2t_v2.0_hisat2/chm13.draft_v2.0.gene_annotation.gtf

We know it's ugly but we promise it helps us solve problems faster.

What else do we need to know? Go ahead, every bit helps.

Jeltje commented 1 year ago

It looks like you don't have write access to /data/rnomics8/gaobaoqing/tsa-seq_lxq/nanopore/20220909/deal_data/mapping/1/6b18a24c-825e-41d2-ba39-caa548c5aad1 Can you verify?

gaobaoqing-picb commented 1 year ago

Thank you for your timely answer! I checked that the folder has writable permission. And there are _known_juncs.bed and _temp_reads.bed files in this folder. Is there any other reason? Thanks a lot!

Jeltje commented 1 year ago

Can you copy and paste a list of everything in that folder?

Also please give the output of

head -n 5 ${i}mapped_q1.bed12 # (of course replace ${i} with a real file)
head -n 5 /data/rnomics8/gaobaoqing/tsa-seq_lxq/20220715_lxq/backup/index/t2t_v2.0_hisat2/chm13.draft_v2.0.gene_annotation.gtf 
head -n 1 /data/rnomics8/gaobaoqing/tsa-seq_lxq/20220715_lxq/backup/index/t2t_v2.0_minimap2/chm13v2.0.fa
gaobaoqing-picb commented 1 year ago

Thank you very much for your reply!The command you suggest runs as follows.

  1. head -n 5 ${i}mapped_q1.bed12

chr1 20530 35061 98:1034|23095722-7104-448b-ae62-b9f10975440d;16 13 - 20530 35061 217,95,2 3 557,180,104, 0,7916,14427, chr1 20531 125183 97:952|2014fa35-5e9b-4a83-9218-f8404f2b3bce;16 37 - 20531 125183 217,95,2 3 556,180,74, 0,7915,104578, chr1 43932 191678 95:2650|8d55c271-6973-46b7-8ae3-38eb131cbca0;0 8 + 43932 191678 27,158,119 8 44,243,949,222,189,70,157,417, 0,127794,128472,131762,136264,138678,141569,147329, chr1 77721 78703 80:1208|b45a388b-71ee-44ac-9259-ab71af738c73;16 9 - 77721 78703 217,95,2 1 982, 0, chr1 127610 128575 83:1028|03ac3e55-2a78-4e9c-8a7a-bb08c5e7a8a0;0 59 + 127610 128575 27,158,119 1 965, 0,

  1. head -n 5 /data/rnomics8/gaobaoqing/tsa-seq_lxq/20220715_lxq/backup/index/t2t_v2.0_hisat2/chm13.draft_v2.0.gene_annotation.gtf

chr1 Liftoff transcript 11136 12457 . - . transcript_id "LOFF_T0000001"; gene_id "LOFF_G0000001"; gene_name "AL627309.3"; chr1 Liftoff exon 11136 11635 . - . transcript_id "LOFF_T0000001"; gene_id "LOFF_G0000001"; gene_name "AL627309.3"; chr1 Liftoff exon 11639 12457 . - . transcript_id "LOFF_T0000001"; gene_id "LOFF_G0000001"; gene_name "AL627309.3"; chr1 Liftoff transcript 11630 13433 . + . transcript_id "LOFF_T0000002"; gene_id "LOFF_G0000002"; gene_name "AP006222.2"; chr1 Liftoff exon 11630 11831 . + . transcript_id "LOFF_T0000002"; gene_id "LOFF_G0000002"; gene_name "AP006222.2";

3.head -n 1 /data/rnomics8/gaobaoqing/tsa-seq_lxq/20220715_lxq/backup/index/t2t_v2.0_minimap2/chm13v2.0.fa

chr1 CP068277.2 Homo sapiens isolate CHM13 chromosome 1

gaobaoqing-picb commented 1 year ago

And the list of everything in that folder is as follows.

ls /data/rnomics8/gaobaoqing/tsa-seq_lxq/nanopore/20220909/deal_data/mapping/1/6b18a24c-825e-41d2-ba39-caa548c5aad1

chr10_known_juncs.bed chr15_known_juncs.bed chr1_known_juncs.bed chr3_known_juncs.bed chr8_known_juncs.bed chr10_temp_reads.bed chr15_temp_reads.bed chr1_temp_reads.bed chr3_temp_reads.bed chr8_temp_reads.bed chr11_known_juncs.bed chr16_known_juncs.bed chr20_known_juncs.bed chr4_known_juncs.bed chr9_known_juncs.bed chr11_temp_reads.bed chr16_temp_reads.bed chr20_temp_reads.bed chr4_temp_reads.bed chr9_temp_reads.bed chr12_known_juncs.bed chr17_known_juncs.bed chr21_known_juncs.bed chr5_known_juncs.bed chrM_known_juncs.bed chr12_temp_reads.bed chr17_temp_reads.bed chr21_temp_reads.bed chr5_temp_reads.bed chrM_temp_reads.bed chr13_known_juncs.bed chr18_known_juncs.bed chr22_known_juncs.bed chr6_known_juncs.bed chrX_known_juncs.bed chr13_temp_reads.bed chr18_temp_reads.bed chr22_temp_reads.bed chr6_temp_reads.bed chrX_temp_reads.bed chr14_known_juncs.bed chr19_known_juncs.bed chr2_known_juncs.bed chr7_known_juncs.bed chrY_known_juncs.bed chr14_temp_reads.bed chr19_temp_reads.bed chr2_temp_reads.bed chr7_temp_reads.bed chrY_temp_reads.bed

Jeltje commented 1 year ago

flair calls ssCorrect.py, which calls ssPrep.py, and it looks like that program didn't do what it's supposed to.

Can you try running it separately? The base command is this: ssPrep.py -i chr20_temp_reads.bed -j chr20_known_juncs.bed -o chr20 -f test_ref/genome.fa -w 15 --correctStrand

If you run it from your output directory /data/rnomics8/gaobaoqing/tsa-seq_lxq/nanopore/20220909/deal_data/mapping/1/6b18a24c-825e-41d2-ba39-caa548c5aad1

it should be /data/rnomics10/gaobaoqing/anaconda3/envs/tsa-seq2/bin/python3 /data/rnomics8/gaobaoqing/tsa-seq_lxq/nanopore/softwares/flair/src/flair/ssPrep.py -i chr20_temp_reads.bed -j chr20_known_juncs.bed -o chr20 -f /data/rnomics8/gaobaoqing/tsa-seq_lxq/20220715_lxq/backup/index/t2t_v2.0_minimap2/chm13v2.0.fa -w 15 --correctStrand What happens? Do you get chr20_inconsistent.bed and chr20_corrected.bed?

Also please attach the ssCorrect.err file that should be in your output directory, or paste it in a seprarate comment.

gaobaoqing-picb commented 1 year ago

Thanks a lot! The problem has been solved! When I run ssPrep.py separately, a new error- "No module named 'ncls'" has appeared. After run "pip install ncls", "flair correct" can run successfully!