Psy-Fer / SquiggleKit

SquiggleKit: A toolkit for manipulating nanopore signal data
MIT License
122 stars 23 forks source link

SquigglePlot command is not working #64

Open TTT16 opened 6 months ago

TTT16 commented 6 months ago

Hi, I tried the SquigglePlot command, and it gave me error like below. Could you please let me know how to fix it?

python /cm/shared/apps/squigglekit/1.5.1a/SquigglePlot.py -s /condo/kisslab/tmhtxt53/GridIon/m6Apaper_data/SquiggleKit/SRR8767348_squiggle-pull.tsv.gz --raw_signal --save SRR8767348_squigglePlot.png --save_path /condo/kisslab/tmhtxt53/GridIon/m6Apaper_data/SquiggleKit

Error:

Cannot convert the signal file. Will plot the values provided as is. Traceback (most recent call last): File "/cm/shared/apps/squigglekit/1.5.1a/SquigglePlot.py", line 474, in main() File "/cm/shared/apps/squigglekit/1.5.1a/SquigglePlot.py", line 198, in main for l in sz: File "/cm/local/apps/python3/lib/python3.9/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte

Psy-Fer commented 6 months ago

Hello,

That looks like you are putting a gzipped signal file to SquigglePlot. It currently doesn't accept gzipped signal files. Try unzipping it and trying again.

James

TTT16 commented 6 months ago

Hi James, I tried to unzip the tsv file, and do it again, but it still gave me error. How can I fix it? THank you!

[tmhtxt53@cn001 ~]$ python /cm/shared/apps/squigglekit/1.5.1a/SquigglePlot.py /condo/kisslab/tmhtxt53/GridIon/m6Apaper_data/SquiggleKit/SRR8767348_squiggle-pull.tsv --raw_signal --save SRR8767348_squigglePlot.png --save_path /condo/kisslab/tmhtxt53/GridIon/m6Apaper_data/SquiggleKit error: unrecognized arguments: /condo/kisslab/tmhtxt53/GridIon/m6Apaper_data/SquiggleKit/SRR8767348_squiggle-pull.tsv usage: SquigglePlot.py [-h] [-p F5_PATH | -s SIGNAL | -w SLOW5 | -i IND [IND ...]] [-r READID] [--single] [--head] [--raw_signal] [-n NUM] [--lim_hi LIM_HI] [--lim_low LIM_LOW] [--plot_colour PLOT_COLOUR] [--save SAVE] [--save_path SAVE_PATH] [--no_show] [--dpi DPI]

SquigglePlot - plotting the raw signal data after (optional) conversion to pA

Psy-Fer commented 6 months ago

Hello,

You are missing the argument in front of the signal file in your command.

It should be

python /cm/shared/apps/squigglekit/1.5.1a/SquigglePlot.py -s /condo/kisslab/tmhtxt53/GridIon/m6Apaper_data/SquiggleKit/SRR8767348_squiggle-pull.tsv --raw_signal --save SRR8767348_squigglePlot.png --save_path /condo/kisslab/tmhtxt53/GridIon/m6Apaper_data/SquiggleKit

James

TTT16 commented 6 months ago

Hi, sorry for my mistake. I did again like you suggested, and it gave me warning/error like below:

[tmhtxt53@cn001 ~]$ python /cm/shared/apps/squigglekit/1.5.1a/SquigglePlot.py -s /condo/kisslab/tmhtxt53/GridIon/m6Apaper_data/SquiggleKit/SRR8767348_squiggle-pull.tsv --raw_signal --save SRR8767348_squigglePlot.png --save_path /condo/kisslab/tmhtxt53/GridIon/m6Apaper_data/SquiggleKit Cannot convert the signal file. Will plot the values provided as is.

And endless output png files as here. Is it supposed like this? 17993bb4-e99a-47c3-9f6e-7310e0c3500a_dpi_100_SRR8767348_squigglePlot.png 179c1b72-19c1-4c1b-86d6-b8c914d763fd_dpi_100_SRR8767348_squigglePlot.png 17ad5912-0c03-47fd-8328-469674fc909c_dpi_100_SRR8767348_squigglePlot.png 17b14433-fb0f-4a7a-ba02-32e74303220c_dpi_100_SRR8767348_squigglePlot.png 17c96a26-658b-4b64-9f1a-b0eb2ba1a7c3_dpi_100_SRR8767348_squigglePlot.png 17cf684d-773e-4614-a2cb-46ebf5c7a054_dpi_100_SRR8767348_squigglePlot.png 17d49fad-d1a6-48d3-97ec-49da71ae6a1e_dpi_100_SRR8767348_squigglePlot.png 17d865ba-8bda-4ca9-9033-4a254988a3b1_dpi_100_SRR8767348_squigglePlot.png 17e3654d-ed4e-4a17-9af0-240b28c7aac9_dpi_100_SRR8767348_squigglePlot.png 182cac11-e9e8-44a9-ac7a-dbf75d4f530a_dpi_100_SRR8767348_squigglePlot.png 184770d8-09e5-443e-ab51-f8c441bca726_dpi_100_SRR8767348_squigglePlot.png 185c44f4-c1c1-46bd-8253-f3e79cf85731_dpi_100_SRR8767348_squigglePlot.png 186606b3-c85a-43d5-8c6a-e0054860c7e9_dpi_100_SRR8767348_squigglePlot.png 187a06cf-511a-43b1-95e4-6aacc090463d_dpi_100_SRR8767348_squigglePlot.png 188e622d-564c-4345-8c6a-71b441c9f0a5_dpi_100_SRR8767348_squigglePlot.png 188e9b29-fbc4-4c7e-90fb-4cfa7090430c_dpi_100_SRR8767348_squigglePlot.png 18936c5f-dfe8-4bf7-af53-63a831fc319b_dpi_100_SRR8767348_squigglePlot.png 189ef11f-5df8-4d9f-b435-06a794d36ca3_dpi_100_SRR8767348_squigglePlot.png 18aa4ed0-b74f-4c2f-a96d-3078a1c58258_dpi_100_SRR8767348_squigglePlot.png 18ad70f9-4620-4e4e-b09a-1a8ce48367bb_dpi_100_SRR8767348_squigglePlot.png 18c2ee8f-7e6c-43fc-9865-aaf4a4f4a5c9_dpi_100_SRR8767348_squigglePlot.png 18c5831f-0f78-4994-8fd5-400adcac1336_dpi_100_SRR8767348_squigglePlot.png 18c9ff7c-bdfe-4914-bcb1-1ee8cf507f15_dpi_100_SRR8767348_squigglePlot.png 18cff98b-349e-46b3-8b85-5b687db47785_dpi_100_SRR8767348_squigglePlot.png 18f44dd4-30ce-46a0-839f-f9be0f9b4c6c_dpi_100_SRR8767348_squigglePlot.png 190d3dd1-0d36-45db-88bd-de7e24d32c02_dpi_100_SRR8767348_squigglePlot.png 193081e4-57cc-4a8d-a055-d74ee0dcb482_dpi_100_SRR8767348_squigglePlot.png 1934a71e-a832-4544-8744-f7e2adba12cc_dpi_100_SRR8767348_squigglePlot.png 193ee89f-f96e-4695-a725-59451e6a3391_dpi_100_SRR8767348_squigglePlot.png 19614e75-db83-4641-8e2a-086c77b11489_dpi_100_SRR8767348_squigglePlot.png

Thanks!

TTT16 commented 6 months ago

And, one of png file like this:

image

How do I know where is A, U, C, G or modified nucleotides? Thank you 0a0aa048-fcfa-4671-990f-a81f825e5f37_dpi_100_SRR8767348_squigglePlot

Psy-Fer commented 6 months ago

Hello,

SquiggleKit does not do base-to-signal alignment or modification detection. It was built primarily to allow users to visualise the signal data to get more comfortable with the data to use in other methods, or to visually check strange results.

If you are looking for base-to-signal alignment, please use https://github.com/hiruna72/squigualiser by Hiruna from our group. If you are looking for RNA mods, try this https://github.com/GoekeLab/m6anet which we helped get working for RNA004.

The output for RNA004 being in fast5 format from MinKNOW is a bug by ONT. I think they have fixed it now. Either way, nanopore has a conversion tool for fast5->pod5 in their pod5 tools here https://github.com/nanoporetech/pod5-file-format/

or if you want to use slow5, we have a fast5->slow5 in slow5tools https://github.com/hasindu2008/slow5tools and if you need it, a pod5<->slow5 converter with https://github.com/Psy-Fer/blue-crab

I hope this helps.

James