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

Got a similar issue that was reported before (Issues # 72, and 115). I am not sure how to fix it after saving the -e SE JC file as tab delimited text #138

Open
nbizzozero opened this issue Oct 31, 2024 · 8 comments

Comments

@nbizzozero
Copy link

I am trying to use rmats2sashimi and for some reason, I am encountering a similar issue that was reported before and commented on October 8, 2021 Issues # 72 and 115.

usage: rmats2sashimiplot [-h] -o OUT_DIR [--l1 L1] [--l2 L2] [--event-type {SE,A5SS,A3SS,MXE,RI}] [-e EVENTS_FILE]
[-c COORDINATE] [--s1 S1] [--s2 S2] [--b1 B1] [--b2 B2] [--exon_s EXON_S]
[--intron_s INTRON_S] [--group-info GROUP_INFO] [--min-counts MIN_COUNTS] [--color COLOR]
[--font-size FONT_SIZE] [--fig-height FIG_HEIGHT] [--fig-width FIG_WIDTH] [--hide-number]
[--no-text-background] [--keep-event-chr-prefix] [--remove-event-chr-prefix]
'chr' is not in list
There is an exception in plot_with_eventsfile
Traceback (most recent call last):
File "./rmats2sashimiplot/src/rmats2sashimiplot/rmats2sashimiplot.py", line 953, in
main()
File "./rmats2sashimiplot/src/rmats2sashimiplot/rmats2sashimiplot.py", line 949, in main
plot_with_eventsfile(options)
File "./rmats2sashimiplot/src/rmats2sashimiplot/rmats2sashimiplot.py", line 606, in plot_with_eventsfile
options.events_file = create_chr_aware_events_file(options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ./rmats2sashimiplot/src/rmats2sashimiplot/rmats2sashimiplot.py", line 589, in create_chr_aware_events_file
chr_index = columns.index('chr')
^^^^^^^^^^^^^^^^^^^^
I saved my SE_JC file to .txt in a couple of ways but it still does not work and I can see the chr column well delineated. Any ideas on how to fix this?

Thanks so much, Nora

@EricKutschera
Copy link
Contributor

The error would happen if the file given with -e doesn't have chr as a tab separated value on the first line of the file. Can you upload that file?

@nbizzozero
Copy link
Author

Thank you, Eric. I fixed the chr error, but now I got a different error " invalid literal for int() with base 10: 'upstreamEE' " as shown below. I also uploaded the .txt file that I used for this. I know that I am close to solving the problem. Essentially, the issue is with converting an Excel file to a .txt file and not having problems with the columns or extra characters like " added to the first and last IncLev numbers.

Thanks again, Nora

image
SE-Neurites.txt

@EricKutschera
Copy link
Contributor

The code is expecting the same columns (and in the same order) as SE.MATS.JC.txt. Your file doesn't have ID as the first column which causes the code to process that first line as a regular row and not as the header. Also the line that gave the error is expecting the value for exonStart_0base as the 6th column (items[5]), but it found upstreamEE in that position

The expected headers are:
ID GeneID geneSymbol chr strand exonStart_0base exonEnd upstreamES upstreamEE downstreamES downstreamEE ID IJC_SAMPLE_1 SJC_SAMPLE_1 IJC_SAMPLE_2 SJC_SAMPLE_2 IncFormLen SkipFormLen PValue FDR IncLevel1 IncLevel2 IncLevelDifference

Your file had (including a few trailing tabs):
geneSymbol chr exonStart_0base exonEnd upstreamES upstreamEE downstreamES downstreamEE IJC_SAMPLE_1 SJC_SAMPLE_1 IJC_SAMPLE_2 SJC_SAMPLE_2 FDR IncLevel1 IncLevel2 IncLevelDifference

@nbizzozero
Copy link
Author

nbizzozero commented Nov 1, 2024 via email

@nbizzozero
Copy link
Author

nbizzozero commented Nov 1, 2024 via email

@nbizzozero
Copy link
Author

Thank you again, Eric.

I was trying different ways of converting the .xls to .txt file and when I used the space-delimited conversion I had too many columns and deleted a couple of those. I am going to use the tab-limited conversion and only remove the extra “ characters while keeping all the columns the same as in the original file.

Thanks for your patience in explaining what I need to do to fix the SE_JC file,

I am sure it will work now.

Good news: The program worked and I got the index files OK as shown below .
Bad news: Unfortunately, I could not print the plots.
So my new question for you is: Do I need to have MISO installed as well?

This is the new error I found after rmats2sashimplot program finished running:

"/users/nperrone/rmats2sashimiplot/src/MISO/misopy/index_gff.py", line 77
print "Making directory: %s" %(chrom_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
/carc/scratch/users/nperrone/.conda/envs/rmats2sashimiplot/bin/python /users/nperrone/rmats2sashimiplot/src/MISO/misopy/sashimi_plot/sashimi_plot.py --plot-event "2_70600348_70600419_-@2_70599206_70599274_-@2_70587818_70587893_-" /users/nperrone/test_events_output/Sashimi_index_Tlk1_1 /users/nperrone/test_events_output/Sashimi_index_Tlk1_1/sashimi_plot_settings.txt --output-dir /users/nperrone/test_events_output/Sashimi_plot
File "/users/nperrone/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 "
AND so on for the other genes:

It seems to me that everything is working well except that I cannot plot and print the plots
Sashimi plot output from CARC but unable to print as yet

@EricKutschera
Copy link
Contributor

The error is SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

The error would happen if you use Python3 with the unmodified source code for rmats2sashimiplot which is written for Python2. Here is a similar issue: #83

Your command used python from /carc/scratch/users/nperrone/.conda/envs/rmats2sashimiplot/bin/python and the rmats2sashimiplot code was from /users/nperrone/rmats2sashimiplot/src/MISO/misopy/sashimi_plot/sashimi_plot.py

You could either convert the source code with:

cd /users/nperrone/rmats2sashimiplot
./2to3.sh

Or if you installed rmats2sashimiplot to that conda environment then you should be able to just run rmats2sashimiplot when that environment is active

@nbizzozero
Copy link
Author

nbizzozero commented Nov 4, 2024 via email

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