Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with rmats.py when running with multiple contrasts: <filename>.bam not found in .rmats files #85

Closed
amizeranschi opened this issue Aug 1, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@amizeranschi
Copy link

Description of the bug

Running the pipeline with multiple contrasts in the contrast sheet results in multiple errors as mentioned in the filename. The pipeline runs fine with only one contrast at a time. As such, it's possible that this issue might be related to a separate report, which was focused on SUPPA: #71

Relevant input files, as well as the full log, are attached below.

Command used and terminal output

nextflow run nf-core/rnasplice -r dev -latest -c custom.config -params-file params.yml --igenomes_ignore --genome null \
--input /data/share/santina-cutrupi/sample-sheet-rnasplice.csv \
--outdir test-rnasplice -profile docker --source genome_bam \
--fasta /data/share/santina-cutrupi/genome/gencode_v44_spike-ins.fasta \
--gtf /data/share/santina-cutrupi/genome/gencode_v44_spike-ins.gtf \
--star_index /data/share/santina-cutrupi/genome/index/star \
--salmon_index /data/share/santina-cutrupi/genome/index/salmon \
--rmats --rmats_read_len 100 --rmats_paired_stats \
--contrasts /data/share/santina-cutrupi/contrasts-rnasplice.csv \
--aligner star --dexseq_exon false --miso_genes "ENSG00000004961.15, ENSG00000005302.19, ENSG00000147403.18"



-[nf-core/rnasplice] Pipeline completed with errors-
ERROR ~ Error executing process > 'NFCORE_RNASPLICE:RNASPLICE:RMATS:RMATS_POST (HepG2_TARDBP_TRT-HepG2_TARDBP_CTL)'

Caused by:
  Process `NFCORE_RNASPLICE:RNASPLICE:RMATS:RMATS_POST (HepG2_TARDBP_TRT-HepG2_TARDBP_CTL)` terminated with an error exit status (1)

Command executed:

  mkdir -p HepG2_TARDBP_TRT-HepG2_TARDBP_CTL/rmats_post
  
  rmats.py \
      --gtf gencode_v44_spike-ins.gtf \
      --b1 HepG2_TARDBP_TRT_bamlist.txt \
      --b2 HepG2_TARDBP_CTL_bamlist.txt \
      --od HepG2_TARDBP_TRT-HepG2_TARDBP_CTL/rmats_post \
      --tmp HepG2_TARDBP_TRT-HepG2_TARDBP_CTL/rmats_temp \
      -t paired \
      --libType fr-unstranded \
      --readLength 100 \
      --variable-read-length \
      --nthread 12 \
      --tstat 12 \
      --cstat 0.0001 \
      --task post \
      --paired-stats \
       \
       \
       \
      --allow-clipping \
      1> HepG2_TARDBP_TRT-HepG2_TARDBP_CTL/rmats_post.log
  
  cat <<-END_VERSIONS > versions.yml
  "NFCORE_RNASPLICE:RNASPLICE:RMATS:RMATS_POST":
      rmats: $(echo $(rmats.py --version) | sed -e "s/v//g")
  END_VERSIONS

Command exit status:
  1

Command output:
  (empty)

Command error:
  HepG2_TARDBP_TRT_REP2_sorted.bam not found in .rmats files
  HepG2_TARDBP_TRT_REP1_sorted.bam not found in .rmats files
  HepG2_TARDBP_CTL_REP1_sorted.bam not found in .rmats files
  HepG2_TARDBP_CTL_REP2_sorted.bam not found in .rmats files

Work dir:
  /data/share/santina-cutrupi/work/44/1986fadc43abab0d325223ec214ee9

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`

 -- Check '.nextflow.log' file for details

Relevant files

custom.config.txt
params.yml.txt
contrasts-rnasplice.csv.txt
sample-sheet-rnasplice.csv.txt
nextflow.log.txt

System information

Nextflow 23.04.2
Latest Dev version of the rnasplice pipeline

@amizeranschi amizeranschi added the bug Something isn't working label Aug 1, 2023
@jma1991
Copy link
Collaborator

jma1991 commented Aug 2, 2023

Fixed in #87

Please try with the latest dev branch, and let us know if it solved your issue.

@amizeranschi
Copy link
Author

Hi, thanks a lot for looking into this issue. I tested again now with the latest dev:

N E X T F L O W  ~  version 23.04.2
Pulling nf-core/rnasplice ...
 Fast-forward
Launching `https://github.com/nf-core/rnasplice` [evil_keller] DSL2 - revision: 317076b2c3 [dev]

Unfortunately, the outcome was the same as the one reported above.

ERROR ~ Error executing process > 'NFCORE_RNASPLICE:RNASPLICE:RMATS:RMATS_POST (K562_HNRNPK_TRT-K562_HNRNPK_CTL)'

Caused by:
  Process `NFCORE_RNASPLICE:RNASPLICE:RMATS:RMATS_POST (K562_HNRNPK_TRT-K562_HNRNPK_CTL)` terminated with an error exit status (1)

Command executed:

  mkdir -p K562_HNRNPK_TRT-K562_HNRNPK_CTL/rmats_post
  
  rmats.py \
      --gtf gencode_v44_spike-ins.gtf \
      --b1 K562_HNRNPK_TRT_bamlist.txt \
      --b2 K562_HNRNPK_CTL_bamlist.txt \
      --od K562_HNRNPK_TRT-K562_HNRNPK_CTL/rmats_post \
      --tmp K562_HNRNPK_TRT-K562_HNRNPK_CTL/rmats_temp \
      -t paired \
      --libType fr-unstranded \
      --readLength 100 \
      --variable-read-length \
      --nthread 12 \
      --tstat 12 \
      --cstat 0.0001 \
      --task post \
      --paired-stats \
       \
       \
       \
      --allow-clipping \
      1> K562_HNRNPK_TRT-K562_HNRNPK_CTL/rmats_post.log
  
  cat <<-END_VERSIONS > versions.yml
  "NFCORE_RNASPLICE:RNASPLICE:RMATS:RMATS_POST":
      rmats: $(echo $(rmats.py --version) | sed -e "s/v//g")
  END_VERSIONS

Command exit status:
  1

Command output:
  (empty)

Command error:
  K562_HNRNPK_TRT_REP1_sorted.bam not found in .rmats files
  K562_HNRNPK_TRT_REP2_sorted.bam not found in .rmats files
  K562_HNRNPK_CTL_REP1_sorted.bam not found in .rmats files
  K562_HNRNPK_CTL_REP2_sorted.bam not found in .rmats files

Work dir:
  /data/share/santina-cutrupi/work/95/3c889e4ab5c9b8c8e00c1a39902cf9

This is what the work dir looks like. Please let me know if I can do any further digging in there, in case it helps with identifying the issue.

$ ls -lhat /data/share/santina-cutrupi/work/95/3c889e4ab5c9b8c8e00c1a39902cf9
total 40K
-rw-r--r-- 1 ubuntu ubuntu 1.1K Aug  2 13:22 .command.log
-rw-r--r-- 1 ubuntu ubuntu    1 Aug  2 13:22 .exitcode
drwxrwxr-x 3 ubuntu ubuntu 4.0K Aug  2 13:22 .
-rw-r--r-- 1 ubuntu ubuntu  232 Aug  2 13:22 .command.err
drwxr-xr-x 4 ubuntu ubuntu   80 Aug  2 13:22 K562_HNRNPK_TRT-K562_HNRNPK_CTL
-rw-r--r-- 1 ubuntu root      0 Aug  2 13:22 .command.trace
-rw-r--r-- 1 ubuntu ubuntu    0 Aug  2 13:22 .command.out
lrwxrwxrwx 1 ubuntu ubuntu   98 Aug  2 13:22 K562_HNRNPK_CTL_REP2_sorted.bam -> /data/share/santina-cutrupi/work/82/f300060e385abd4ed924bdba6646e5/K562_HNRNPK_CTL_REP2_sorted.bam
lrwxrwxrwx 1 ubuntu ubuntu   98 Aug  2 13:22 K562_HNRNPK_CTL_REP1_sorted.bam -> /data/share/santina-cutrupi/work/52/d7c6630f2bd54bec077a772e534260/K562_HNRNPK_CTL_REP1_sorted.bam
lrwxrwxrwx 1 ubuntu ubuntu   98 Aug  2 13:22 K562_HNRNPK_TRT_REP2_sorted.bam -> /data/share/santina-cutrupi/work/ce/3e2653945b846206b2e4c37dc6bde0/K562_HNRNPK_TRT_REP2_sorted.bam
lrwxrwxrwx 1 ubuntu ubuntu   98 Aug  2 13:22 K562_HNRNPK_TRT_REP1_sorted.bam -> /data/share/santina-cutrupi/work/64/19c0a94b1ed0224e24cb9f8aa88c85/K562_HNRNPK_TRT_REP1_sorted.bam
lrwxrwxrwx 1 ubuntu ubuntu   94 Aug  2 13:22 K562_HNRNPK_CTL_bamlist.txt -> /data/share/santina-cutrupi/work/e2/5a11b96da70ad1762e7a7c430e9a06/K562_HNRNPK_CTL_bamlist.txt
lrwxrwxrwx 1 ubuntu ubuntu   94 Aug  2 13:22 K562_HNRNPK_TRT_bamlist.txt -> /data/share/santina-cutrupi/work/e2/5a11b96da70ad1762e7a7c430e9a06/K562_HNRNPK_TRT_bamlist.txt
lrwxrwxrwx 1 ubuntu ubuntu   60 Aug  2 13:22 gencode_v44_spike-ins.gtf -> /data/share/santina-cutrupi/genome/gencode_v44_spike-ins.gtf
-rw-r--r-- 1 ubuntu ubuntu    0 Aug  2 13:22 .command.begin
-rw-rw-r-- 1 ubuntu ubuntu  218 Aug  2 13:21 .command.condor
-rw-rw-r-- 1 ubuntu ubuntu  762 Aug  2 13:21 .command.sh
-rwxrw-r-- 1 ubuntu ubuntu  14K Aug  2 13:21 .command.run
drwxrwxr-x 3 ubuntu ubuntu   52 Aug  2 13:21 ..

I'm guessing that these are the *.rmats files referred to in the error:

$ find /data/share/santina-cutrupi/work/95/3c889e4ab5c9b8c8e00c1a39902cf9 -name "*.rmats"
/data/share/santina-cutrupi/work/95/3c889e4ab5c9b8c8e00c1a39902cf9/K562_HNRNPK_TRT-K562_HNRNPK_CTL/rmats_temp/2023-08-02-10_16_03_793196_0.rmats
/data/share/santina-cutrupi/work/95/3c889e4ab5c9b8c8e00c1a39902cf9/K562_HNRNPK_TRT-K562_HNRNPK_CTL/rmats_temp/2023-08-02-10_16_03_793196_1.rmats
/data/share/santina-cutrupi/work/95/3c889e4ab5c9b8c8e00c1a39902cf9/K562_HNRNPK_TRT-K562_HNRNPK_CTL/rmats_temp/2023-08-02-10_16_03_793196_2.rmats
/data/share/santina-cutrupi/work/95/3c889e4ab5c9b8c8e00c1a39902cf9/K562_HNRNPK_TRT-K562_HNRNPK_CTL/rmats_temp/2023-08-02-10_16_03_793196_3.rmats

And these are the entries containing .bam in the above files.

$ grep ".bam" /data/share/santina-cutrupi/work/95/3c889e4ab5c9b8c8e00c1a39902cf9/K562_HNRNPK_TRT-K562_HNRNPK_CTL/rmats_temp/*.rmats
/data/share/santina-cutrupi/work/95/3c889e4ab5c9b8c8e00c1a39902cf9/K562_HNRNPK_TRT-K562_HNRNPK_CTL/rmats_temp/2023-08-02-10_16_03_793196_0.rmats:K562_TARDBP_TRT_REP1_sorted.bam
/data/share/santina-cutrupi/work/95/3c889e4ab5c9b8c8e00c1a39902cf9/K562_HNRNPK_TRT-K562_HNRNPK_CTL/rmats_temp/2023-08-02-10_16_03_793196_1.rmats:K562_TARDBP_TRT_REP2_sorted.bam
/data/share/santina-cutrupi/work/95/3c889e4ab5c9b8c8e00c1a39902cf9/K562_HNRNPK_TRT-K562_HNRNPK_CTL/rmats_temp/2023-08-02-10_16_03_793196_2.rmats:K562_TARDBP_CTL_REP1_sorted.bam
/data/share/santina-cutrupi/work/95/3c889e4ab5c9b8c8e00c1a39902cf9/K562_HNRNPK_TRT-K562_HNRNPK_CTL/rmats_temp/2023-08-02-10_16_03_793196_3.rmats:K562_TARDBP_CTL_REP2_sorted.bam

@amizeranschi
Copy link
Author

Looks like the .rmats files contain the BAM files for the wrong experimental condition, i.e. the K562_TARDBP BAM files appear to be mentioned for the K562_HNRNPK_TRT-K562_HNRNPK_CTL contrast, judging from the names of the directories above.

@jma1991
Copy link
Collaborator

jma1991 commented Aug 2, 2023

Can you post your sample and contrast sheet? I'll make a dummy copy for further testing.

@amizeranschi
Copy link
Author

The sample and contrast sheet are linked in the first post, above.

@jma1991
Copy link
Collaborator

jma1991 commented Aug 2, 2023

Can you pull the code from #88 and run with your data? I've refactored the code and tested it on some dummy data which mimics the experimental design of your data, but would be good to have you test before I merge the PR.

@amizeranschi
Copy link
Author

Thanks again for working on this. I tested again with the zifornd/rnasplice -r dev -latest and the issue with RMATS_POST seems to be solved now. However, the pipeline now crashed due to a new issue with MISO_SASHIMI (which didn't occur before when I tested with only a single contrast at a time):

ERROR ~ Error executing process > 'NFCORE_RNASPLICE:RNASPLICE:VISUALISE_MISO:MISO_SASHIMI (3)'

Caused by:
  Process `NFCORE_RNASPLICE:RNASPLICE:VISUALISE_MISO:MISO_SASHIMI (3)` terminated with an error exit status (1)

Command executed:

  sashimi_plot --plot-event ENSG00000147403.18 index miso_settings.txt --output-dir sashimi
  
  cat <<-END_VERSIONS > versions.yml
  "NFCORE_RNASPLICE:RNASPLICE:VISUALISE_MISO:MISO_SASHIMI":
      python: $(python --version | sed "s/Python //g")
      misopy: $(python -c "import pkg_resources; print(pkg_resources.get_distribution('misopy').version)")
  END_VERSIONS

Command exit status:
  1

Command output:
    - Looking for chromosome chrX directories
  Error: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_HNRNPK_CTL_REP2_sorted not a directory.
  Error: Could not find MISO output files for sample HepG2_HNRNPK_CTL_REP2_sorted (after searching in /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_HNRNPK_CTL_REP2_sorted and its subdirectories). Are you sure MISO output files are present in that directory?
  Searching for MISO files in: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/K562_HNRNPK_TRT_REP1_sorted
    - Looking for chromosome chrX directories
  Error: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/K562_HNRNPK_TRT_REP1_sorted not a directory.
  Error: Could not find MISO output files for sample K562_HNRNPK_TRT_REP1_sorted (after searching in /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/K562_HNRNPK_TRT_REP1_sorted and its subdirectories). Are you sure MISO output files are present in that do_data/K562_HNRNPK_TRT_REP1_sorted not a directory.
  Error: Could not find MISO output files for sample K562_HNRNPK_TRT_REP1_sorted (after searching in /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/K562_HNRNPK_TRT_REP1_sorted and its subdirectories). Are you sure MISO output files are present in that directory?
  Searching for MISO files in: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_TARDBP_CTL_REP1_sorted
    - Looking for chromosome chrX directories
  Error: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_TARDBP_CTL_REP1_sorted not a directory.
  Error: Could not find MISO output files for sample HepG2_TARDBP_CTL_REP1_sorted (after searching in /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_TARDBP_CTL_REP1_sorted and its subdirectories). Are you sure MISO output files are present in that directory?
  Searching for MISO files in: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/K562_HNRNPK_CTL_REP1_sorted
    - Looking for chromosome chrX directories
  Error: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/K562_HNRNPK_CTL_REP1_sorted not a directory.
  Error: Could not find MISO output files for sample K562_HNRNPK_CTL_REP1_sorted (after searching in /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/K562_HNRNPK_CTL_REP1_sorted and its subdirectories). Are you sure MISO output files are present in that directory?
  Searching for MISO files in: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/K562_HNRNPK_TRT_REP2_sorted
    - Looking for chromosome chrX directories
  Error: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/K562_HNRNPK_TRT_REP2_sorted not a directory.
  Error: Could not find MISO output files for sample K562_HNRNPK_TRT_REP2_sorted (after searching in /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/K562_HNRNPK_TRT_REP2_sorted and its subdirectories). Are you sure MISO output files are present in that directory?
  Searching for MISO files in: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_HNRNPK_TRT_REP2_sorted
    - Looking for chromosome chrX directories
  Error: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_HNRNPK_TRT_REP2_sorted not a directory.
  Error: Could not find MISO output files for sample HepG2_HNRNPK_TRT_REP2_sorted (after searching in /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_HNRNPK_TRT_REP2_sorted and its subdirectories). Are you sure MISO output files are present in that directory?
  Searching for MISO files in: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/K562_HNRNPK_CTL_REP2_sorted
    - Looking for chromosome chrX directories
  Error: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/K562_HNRNPK_CTL_REP2_sorted not a directory.
  Error: Could not find MISO output files for sample K562_HNRNPK_CTL_REP2_sorted (after searching in /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/K562_HNRNPK_CTL_REP2_sorted and its subdirectories). Are you sure MISO output files are present in that directory?
  Searching for MISO files in: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_HNRNPK_CTL_REP1_sorted
    - Looking for chromosome chrX directories
  Error: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_HNRNPK_CTL_REP1_sorted not a directory.
  Error: Could not find MISO output files for sample HepG2_HNRNPK_CTL_REP1_sorted (after searching in /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_HNRNPK_CTL_REP1_sorted and its subdirectories). Are you sure MISO output files are present in that directory?
  Searching for MISO files in: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_HNRNPK_TRT_REP1_sorted
    - Looking for chromosome chrX directories
  Error: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_HNRNPK_TRT_REP1_sorted not a directory.
  Error: Could not find MISO output files for sample HepG2_HNRNPK_TRT_REP1_sorted (after searching in /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_HNRNPK_TRT_REP1_sorted and its subdirectories). Are you sure MISO output files are present in that directory?
  Searching for MISO files in: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_TARDBP_TRT_REP2_sorted
    - Looking for chromosome chrX directories
  Error: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_TARDBP_TRT_REP2_sorted not a directory.
  Error: Could not find MISO output files for sample HepG2_TARDBP_TRT_REP2_sorted (after searching in /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_TARDBP_TRT_REP2_sorted and its subdirectories). Are you sure MISO output files are present in that directory?
  Reading dimensions from settings...
   - Height: 7.00
   - Width: 7.00
  Plotting read densities and MISO estimates along event...
    - Event: ENSG00000147403.18
  Setting up plot using dimensions:  [7.0, 7.0]
  Using intron scale  30.0
  Using exon scale  4.0
  Reading sample label: K562_TARDBP_TRT_REP1_sorted.bam
  Processing BAM: /data/share/santina-cutrupi/test-rnasplice/star/K562_TARDBP_TRT_REP1_sorted.bam

Command error:
    - Looking for chromosome chrX directories
  Error: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/K562_HNRNPK_TRT_REP2_sorted not a directory.
  Error: Could not find MISO output files for sample K562_HNRNPK_TRT_REP2_sorted (after searching in /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/K562_HNRNPK_TRT_REP2_sorted and its subdirectories). Are you sure MISO output files are present in that directory?
  Searching for MISO files in: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_HNRNPK_TRT_REP2_sorted
    - Looking for chromosome chrX directories
  Error: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_HNRNPK_TRT_REP2_sorted not a directory.
  Error: Could not find MISO output files for sample HepG2_HNRNPK_TRT_REP2_sorted (after searching in /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_HNRNPK_TRT_REP2_sorted and its subdirectories). Are you sure MISO output files are present in that directory?
  Searching for MISO files in: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/K562_HNRNPK_CTL_REP2_sorted
    - Looking for chromosome chrX directories
  Error: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/K562_HNRNPK_CTL_REP2_sorted not a directory.
  Error: Could not find MISO output files for sample K562_HNRNPK_CTL_REP2_sorted (after searching in /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/K562_HNRNPK_CTL_REP2_sorted and its subdirectories). Are you sure MISO output files are present in that directory?
  Searching for MISO files in: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_HNRNPK_CTL_REP1_sorted
    - Looking for chromosome chrX directories
  Error: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_HNRNPK_CTL_REP1_sorted not a directory.
  Error: Could not find MISO output files for sample HepG2_HNRNPK_CTL_REP1_sorted (after searching in /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_HNRNPK_CTL_REP1_sorted and its subdirectories). Are you sure MISO output files are present in that directory?
  Searching for MISO files in: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_HNRNPK_TRT_REP1_sorted
    - Looking for chromosome chrX directories
  Error: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_HNRNPK_TRT_REP1_sorted not a directory.
  Error: Could not find MISO output files for sample HepG2_HNRNPK_TRT_REP1_sorted (after searching in /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_HNRNPK_TRT_REP1_sorted and its subdirectories). Are you sure MISO output files are present in that directory?
  Searching for MISO files in: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_TARDBP_TRT_REP2_sorted
    - Looking for chromosome chrX directories
  Error: /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_TARDBP_TRT_REP2_sorted not a directory.
  Error: Could not find MISO output files for sample HepG2_TARDBP_TRT_REP2_sorted (after searching in /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/HepG2_TARDBP_TRT_REP2_sorted and its subdirectories). Are you sure MISO output files are present in that directory?
  Reading dimensions from settings...
   - Height: 7.00
   - Width: 7.00
  Plotting read densities and MISO estimates along event...
    - Event: ENSG00000147403.18
  Setting up plot using dimensions:  [7.0, 7.0]
  Using intron scale  30.0
  Using exon scale  4.0
  Reading sample label: K562_TARDBP_TRT_REP1_sorted.bam
  Processing BAM: /data/share/santina-cutrupi/test-rnasplice/star/K562_TARDBP_TRT_REP1_sorted.bam
  [E::hts_open_format] Failed to open file "/data/share/santina-cutrupi/test-rnasplice/star/K562_TARDBP_TRT_REP1_sorted.bam" : No such file or directory
  Traceback (most recent call last):
    File "/usr/local/bin/sashimi_plot", line 11, in <module>
      sys.exit(main())
    File "/usr/local/lib/python2.7/site-packages/misopy/sashimi_plot/sashimi_plot.py", line 276, in main
      plot_label=plot_label)
    File "/usr/local/lib/python2.7/site-packages/misopy/sashimi_plot/sashimi_plot.py", line 153, in plot_event
      plot_label=plot_label)
    File "/usr/local/lib/python2.7/site-packages/misopy/sashimi_plot/plot_utils/plot_gene.py", line 698, in plot_density_from_file
      plot_title=plot_title)
    File "/usr/local/lib/python2.7/site-packages/misopy/sashimi_plot/plot_utils/plot_gene.py", line 260, in plot_density
      junction_log_base=junction_log_base)
    File "/usr/local/lib/python2.7/site-packages/misopy/sashimi_plot/plot_utils/plot_gene.py", line 48, in plot_density_single
      bamfile = pysam.Samfile(bam_filename, 'rb')
    File "pysam/libcalignmentfile.pyx", line 751, in pysam.libcalignmentfile.AlignmentFile.__cinit__
    File "pysam/libcalignmentfile.pyx", line 950, in pysam.libcalignmentfile.AlignmentFile._open
  IOError: [Errno 2] could not open alignment file `/data/share/santina-cutrupi/test-rnasplice/star/K562_TARDBP_TRT_REP1_sorted.bam`: No such file or directory

Work dir:
  /data/share/santina-cutrupi/work/b2/cc51deec0ce0205e0a7c0da3f1d60b

@amizeranschi
Copy link
Author

There seems to be a problem with the directory naming convention. MISO expects directories ending with _sorted (such as K562_HNRNPK_TRT_REP2_sorted), but the actual directories in miso_data do not have this ending:

$ ls -lhat /data/share/santina-cutrupi/test-rnasplice/misopy/miso_data/
total 68K
drwxrwxr-x  4 ubuntu ubuntu  121 Aug  4 08:57 ..
drwxrwxr-x 44 ubuntu ubuntu 4.0K Aug  4 07:36 K562_TARDBP_TRT_REP1
drwxrwxr-x 18 ubuntu ubuntu 4.0K Aug  4 07:36 .
drwxrwxr-x 39 ubuntu ubuntu 4.0K Aug  4 07:32 HepG2_TARDBP_TRT_REP2
drwxrwxr-x 47 ubuntu ubuntu 4.0K Aug  4 07:30 K562_TARDBP_TRT_REP2
drwxrwxr-x 49 ubuntu ubuntu 4.0K Aug  4 07:29 K562_HNRNPK_CTL_REP2
drwxrwxr-x 37 ubuntu ubuntu 4.0K Aug  4 07:28 HepG2_TARDBP_TRT_REP1
drwxrwxr-x 40 ubuntu ubuntu 4.0K Aug  4 07:25 HepG2_HNRNPK_TRT_REP1
drwxrwxr-x 48 ubuntu ubuntu 4.0K Aug  4 07:24 K562_HNRNPK_TRT_REP2
drwxrwxr-x 35 ubuntu ubuntu 4.0K Aug  4 07:23 HepG2_TARDBP_CTL_REP2
drwxrwxr-x 46 ubuntu ubuntu 4.0K Aug  4 07:21 K562_TARDBP_CTL_REP1
drwxrwxr-x 49 ubuntu ubuntu 4.0K Aug  4 07:20 K562_TARDBP_CTL_REP2
drwxrwxr-x 46 ubuntu ubuntu 4.0K Aug  4 07:19 K562_HNRNPK_CTL_REP1
drwxrwxr-x 35 ubuntu ubuntu 4.0K Aug  4 07:16 HepG2_HNRNPK_CTL_REP2
drwxrwxr-x 38 ubuntu ubuntu 4.0K Aug  4 07:15 HepG2_TARDBP_CTL_REP1
drwxrwxr-x 47 ubuntu ubuntu 4.0K Aug  4 07:13 K562_HNRNPK_TRT_REP1
drwxrwxr-x 37 ubuntu ubuntu 4.0K Aug  4 07:09 HepG2_HNRNPK_TRT_REP2
drwxrwxr-x 41 ubuntu ubuntu 4.0K Aug  4 07:08 HepG2_HNRNPK_CTL_REP1

As for the last error:

[E::hts_open_format] Failed to open file "/data/share/santina-cutrupi/test-rnasplice/star/K562_TARDBP_TRT_REP1_sorted.bam" : No such file or directory

This one is strange, because that file is definitely present there, at least it is at this moment in time.

$ ls -lhat /data/share/santina-cutrupi/test-rnasplice/star/K562_TARDBP_TRT_REP1_sorted.bam
-rw-r--r-- 1 ubuntu ubuntu 2.5G Aug  4 06:50 /data/share/santina-cutrupi/test-rnasplice/star/K562_TARDBP_TRT_REP1_sorted.bam

@amizeranschi
Copy link
Author

The same MISO issue also happened now when running a previous test with only one contrast, which previously worked fine.

@jma1991
Copy link
Collaborator

jma1991 commented Aug 4, 2023

Closing this issue as the rMATS bug has been fixed. Please open a new issue to discuss the MISO bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants