hiruna72 / squigualiser

Visualise and analyse nanopore (ONT) raw signals
https://hiruna72.github.io/squigualiser/
MIT License
100 stars 1 forks source link

Extracting plot data question #64

Open wpearman1996 opened 1 month ago

wpearman1996 commented 1 month ago

Hi there, I'm hoping to try and extract the current data for the terminal base in my slow5 (originally R9 fast5s) files to look for anomalous patterns. Essentially trying to look at different patterns associated with a blockage end reason for the read.

I've been hoping to try and directly generate the data from used to generate the plots (i.e., via squigualiser plot) as a csv (e.g., Position, Base, Signal value (pA), signal value (raw).

I've been using the resquiggle with the signal-to-read visualization approach and this has been successful in generating the plots (although weirdly, only for the first 1000bp of a read - is this limit adjustable?).

But i'd like to extract the data directly and then analyse the patterns in R. Is there any easy way to output this data? Thanks! William

hiruna72 commented 1 month ago

Hi @wpearman1996,

you can try increasing --sig_plot_limit and --base_limit. also if you want to change the plot region you can use --region.

The subtool metric should give the raw data in TSV format. Assuming your a familiar with python let me link you to the implementation as well https://github.com/hiruna72/squigualiser/blob/main/src/metric.py

If you are planning to develop a method, I suggest to get familiarize with ss tag so that you can parse it to suit your requirements. https://hasindu2008.github.io/f5c/docs/output#resquiggle-paf-output