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 when running on rMATS generated BAM files #139

Open
nicholas-moskwa opened this issue Nov 6, 2024 · 5 comments
Open

Error when running on rMATS generated BAM files #139

nicholas-moskwa opened this issue Nov 6, 2024 · 5 comments

Comments

@nicholas-moskwa
Copy link

Hi,

I am trying to generate sashimi plots using BAM files made from running rMATS on FASTQ files. I am using two files that hold my replicates.

My run:
python /Packages/rmats2sashimiplot/src/rmats2sashimiplot/rmats2sashimiplot.py --b1 10_129S.txt --b2 10_B6.txt -c chr7:+:27256438:27284145:/genomes/mm10/gencode.vM36.annotation.gff3 --l1 129S --l2 B6 --exon_s 1 --intron_s 5 -o ${dir_out}

My error:
File "/Packages/rmats2sashimiplot/src/MISO/misopy/index_gff.py", line 77
print "Making directory: %s" %(chrom_dir)
^
SyntaxError: invalid syntax
File "/Packages/rmats2sashimiplot/src/MISO/misopy/sashimi_plot/sashimi_plot.py", line 46
print "WARNING: %s does not end in .miso_bf, are you sure it is the "
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("WARNING: %s does not end in .miso_bf, are you sure it is the " )?
'/mm10-tmp/2024-02-01-13_40_35_331660_bam1_1/Aligned.sortedByCoord.out.bam' is indexed already: '/mm10-tmp/2024-02-01-13_40_35_331660_bam1_1/Aligned.sortedByCoord.out.bam.bai'
'mm10-tmp/2024-02-01-13_40_35_331660_bam2_1/Aligned.sortedByCoord.out.bam' is indexed already: '/mm10-tmp/2024-02-01-13_40_35_331660_bam2_1/Aligned.sortedByCoord.out.bam.bai'

Thanks for your help!

@EricKutschera
Copy link
Contributor

Here's a similar issue: #138 (comment)

You could try:

cd /Packages/rmats2sashimiplot
./2to3.sh

@nicholas-moskwa
Copy link
Author

nicholas-moskwa commented Nov 7, 2024

Okay, that changed the error, I think most of the script ran, but now I see this error:

Exception: Event 7_27256438_27284146_- not found in pickled directory /pod/2/ch-lee-lab/labdata/moskwn/RNA-seq/RMT0015/10_Rmats2sashimiplot/Sashimi_index. Are you sure this is the right directory for the event?

Does rmatsashimiplot only plot events that show up in rMATS?

@EricKutschera
Copy link
Contributor

That error can happen if you use the same -o directory for multiple runs. The code will see files from a previous run (which may have had an error) and the old files can cause the error: #92 (comment)

@nicholas-moskwa
Copy link
Author

I deleted the output directory and re-ran my scripts and saw this, should I use a gene name instead of a coordinate:

<module 'misopy' from '/pod/2/ch-lee-lab/labdata/Packages/rmats2sashimiplot/src/MISO/misopy/init.py'>
Indexing GFF...

  • GFF: /10_Rmats2sashimiplot/Sashimi_index/tmp.gff3
  • Outputting to: /10_Rmats2sashimiplot/Sashimi_index
    WARNING: No entries found for gene 7_27256438_27284146_+ in GFF /10_Rmats2sashimiplot/Sashimi_index/tmp.gff3
    Skipping gene 7_27256438_27284146_+...
    Loaded 0 genes
  • Loading of genes from GFF took 0.00 seconds
    Outputting gene records in GFF format...
  • Output file: /10_Rmats2sashimiplot/Sashimi_index/genes.gff
  • Serialization of genes from GFF took 0.03 seconds
    Indexing of GFF took 0.04 seconds.
    Traceback (most recent call last):
    File "/rmats2sashimiplot/src/MISO/misopy/sashimi_plot/sashimi_plot.py", line 293, in
    main()
    File "/rmats2sashimiplot/src/MISO/misopy/sashimi_plot/sashimi_plot.py", line 289, in main
    plot_label=plot_label)
    File "/rmats2sashimiplot/src/MISO/misopy/sashimi_plot/sashimi_plot.py", line 148, in plot_event
    %(event_name, pickle_dir))
    Exception: Event 7_27256438_27284146_+ not found in pickled directory /10_Rmats2sashimiplot/Sashimi_index. Are you sure this is the right directory for the event?

@EricKutschera
Copy link
Contributor

The issue might be that your bam files don't have chr but you're using a gff3 that does. It looks like you have gencode.vM36.annotation.gff3 which has chr7 and the error is about an event on just 7 which would be based on the coordinates from the -c argument. I think you could remove the chr prefix from your gff3 with:

sed s/^chr// gencode.vM36.annotation.gff3 > gencode.vM36.annotation_no_chr.gff3

Then you could use that updated gff3 file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants