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

An error trying to plot the rna004 #55

Closed
hasindu2008 opened this issue Feb 19, 2024 · 5 comments
Closed

An error trying to plot the rna004 #55

hasindu2008 opened this issue Feb 19, 2024 · 5 comments

Comments

@hasindu2008
Copy link
Collaborator

Got an an error trying to plot the rna004.

plot region: 1-234      read_id: e8d52b46-e829-464a-a9d0-23223c7756d4
BokehUserWarning: ColumnDataSource's columns must be of the same length. Current lengths: ('line_color', 6095), ('x', 6094), ('y', 6094)
BokehUserWarning: ColumnDataSource's columns must be of the same length. Current lengths: ('hatch_color', 6095), ('line_color', 6095), ('x', 6094), ('y', 6094)
BokehUserWarning: ColumnDataSource's columns must be of the same length. Current lengths: ('fill_color', 6095), ('hatch_color', 6095), ('line_color', 6095), ('x', 6094), ('y', 6094)
Traceback (most recent call last):
  File "/home/hasindu/squigualiser-v0.5.1/bin/squigualiser", line 8, in <module>
    sys.exit(main())
  File "/home/hasindu/squigualiser-v0.5.1/lib/python3.8/site-packages/src/__init__.py", line 56, in main
    args.func(args)
  File "/home/hasindu/squigualiser-v0.5.1/lib/python3.8/site-packages/src/plot.py", line 710, in run
    layout_ = plot_function(p=p, read_id=read_id, signal_tuple=signal_tuple, sig_algn_data=sig_algn_dic, fasta_sequence=fasta_seq, base_limit=base_limit, draw_data=draw_data)
  File "/home/hasindu/squigualiser-v0.5.1/lib/python3.8/site-packages/src/plot.py", line 207, in plot_function
    plot_title = f'{sig_algn_data["tag_name"]}[{sig_algn_data["ref_end"]:,}-{sig_algn_data["ref_end"] - base_index+1:,}]{indt}signal: [{int(x_real[0])}-{int(x_real[x_coordinate - 1])}]{indt}deletions(bases): {num_Ds} insertions(samples): {num_Is}{indt}{read_id}{indt}signal dir:{draw_data["sig_dir"]}'
IndexError: index 6094 is out of bounds for axis 0 with size 6094
[12:27](https://genometech2.slack.com/archives/D02M0JVQ78C/p1708176434566439)
command:
~/squigualiser-v0.5.1/squigualiser plot  -f test/uhr_rna004_1k/PNXRXX240011_reads_1k.fastq -s test/uhr_rna004_1k/PNXRXX240011_reads_1k.blow5 -a test/uhr_rna004_1k/resquiggle.paf  -o plot1/ --rna
[12:27](https://genometech2.slack.com/archives/D02M0JVQ78C/p1708176476263939)

from f5c v1.4 run:

 test/test_rsq.sh -z

to generate the necessary files.

@hiruna72
Copy link
Owner

Thanks for sharing this.

In resquiggle.paf file PAF records for the following readids are wrong.
They should not have the first insertion at the very beginning of the ss string (it is already reflected in the start raw value - third column).
image

I manually edited the ss strings to remove that part.
For example ss:Z:221I8,20,17... was updated as ss:Z:8,20,17...
Then the above squigualiser command worked (dev branch).

@hasindu2008
Copy link
Collaborator Author

Did this not happen in R9 reads?

@hiruna72
Copy link
Owner

f5c rna r9 data also has this bug. but it did not cause squigualiser to error out. example,
16d22568-4ed8-4966-8f12-bb77b57f670f 119493 49 119303 + 16d22568-4ed8-4966-8f12-bb77b57f670f 1089 1087 0 1081 1089 255 sc:f:1.021642 sh:f:12.343329 ss:Z:49I23,53,7,643,8814,...

@hiruna72
Copy link
Owner

please check the PR hasindu2008/f5c#156 when you get time.
thanks!

@hasindu2008
Copy link
Collaborator Author

Merged that and it should work. Thanks for the fix. We should update the recommended f5c version for squigualiser when the new f5c version is released

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