You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*Figure - A [pileup view](#pileup-view) of DNA R10.4.1 signals that align to the region `chr1:92,783,745-92,783,946`. Click the [link](https://hiruna72.github.io/squigualiser/docs/figures/different_aligments/dna_r10.4.1_e8.2_400bps_sup.cfg_evligned_vs_sim.html) to open it on your browser.* Go to Section [Examples](#examples) for more examples.
21
+
* Figure - A [pileup view](#pileup-view) of DNA R10.4.1 signals that align to the region `chr1:92,783,745-92,783,946`.
22
+
* Click the [link](https://hiruna72.github.io/squigualiser/docs/figures/different_aligments/dna_r10.4.1_e8.2_400bps_sup.cfg_evligned_vs_sim.html) to open it on your browser.
23
+
* Go to Section [Examples](#examples) for more examples.
14
24
15
25
# Table of Contents
16
26
1.[Quickstart](#quickstart)
17
27
2.[Advanced Setup](#advanced-setup)
18
-
3.[Signal to read visualisation](#signal-to-read-visualisation)
1.[Option 1 - Using f5c eventalign](#option-1-f5c-eventalign)
24
34
2.[Option 2 - Using basecaller move table](#option-2---basecaller-move-table-1)
25
35
3.[Option 3 - Using squigulator signal simulation](#option-3---squigulator-signal-simulation-1)
@@ -173,13 +183,13 @@ SLOW5 files compressed with *zstd* offer smaller file size and better performanc
173
183
</div>
174
184
</details>
175
185
176
-
## Signal to read visualisation
186
+
## Signal-to-read visualisation
177
187
178
188
This section explains how you can use squigualiser to visualise a raw signal alignment against its basecalled read. Click on the arrow to expand the revalent method.
179
189
180
190
#### Option 1 - f5c resquiggle
181
191
<details>
182
-
<summary>Steps for using f5c resquiggle signal-read alignment</summary>
192
+
<summary>Steps for using f5c resquiggle signal-to-read alignment</summary>
183
193
<divmarkdown=1>
184
194
185
195
1. Install f5c [v1.3 or higher](https://github.com/hasindu2008/f5c/releases) as explained in [f5c documentation](https://github.com/hasindu2008/f5c/#quick-start).
This section explains how you can use squigualiser to visualise a raw signal alignment against a reference. Click on the arrow to expand the relevant method.
Similar to IGV pileup view now you can view the signal pileup view. To create a pileup view the following conditions should be met.
463
-
1. The plot is a signal to reference visualisation, not a signal to read.
473
+
1. The plot is a signal-to-reference visualisation, not a signal-to-read.
464
474
2. A genomic region should be specified using the argument `--region`
465
475
466
-
First, create an alignment file by following the steps mentioned in [Signal to reference visualisation](#signal-to-reference-visualisation)
476
+
First, create an alignment file by following the steps mentioned in [Signal-to-reference visualisation](#signal-to-reference-visualisation)
467
477
468
478
````
469
479
REGION=chr1:6811011-6811198
@@ -535,7 +545,7 @@ However, the user is adviced to use `--profile` (documented [here](docs/profiles
535
545
For more information please refer [base_shift and eventalignment](docs/base_shift_and_eventalignment.md) and [base_shift and reverse mapped reads](docs/base_shift_of_reverse_mapped_reads.md).
536
546
537
547
### Signal scaling
538
-
The commands `plot` and `plot_pileup` can take the argument `--sig_scale`. By providing the argument `--sig_scale znorm`or `--sig_scale medmad`the signals will be zscore or median MAD normalized respectively.
548
+
The commands `plot` and `plot_pileup` can take the argument `--sig_scale`. Provide the argument `--sig_scale znorm`to zscore normalize, `--sig_scale medmad`to median MAD normalize, and `--sig_scale scaledpA` to scale the raw signal to the pore model.
539
549
540
550
541
551
## Plot Conventions
@@ -547,15 +557,15 @@ The commands `plot` and `plot_pileup` can take the argument `--sig_scale`. By pr
547
557
548
558
549
559
## Calculate alignment statistics
550
-
Calculate basic statistics of read/reference - signal alignments.
560
+
Calculate basic statistics of signal-to-read/reference alignments.
551
561
Check [here](docs/commands.md/#metric) for the command.
552
562
Check [here](docs/different_alignments.md) for an example.
553
563
554
564
## Notes
555
565
556
566
1. If your FASTQ file is a multi-line file (not to confuse with multi-read), then install [seqtk](https://github.com/lh3/seqtk) and use `seqtk seq -l0 in.fastq > out.fastq` to convert multi-line FASTQ to 4-line FASTQ.
557
567
2. The optional argument `--kmer-model KMER_MODEL` can be used to specify a custom k-mer model if you wish.
558
-
3. To plot RNA signal-read alignment use the alignment file created using `f5c resquiggle --rna -c ${FASTQ} ${SIGNAL_FILE} -o ${ALIGNMENT}`. Also, provide the argument `--rna` to the visualising command. Currently, there exists no RNA kmer model for r10.4.1 chemistry.
568
+
3. To plot RNA signal-to-read alignment use the alignment file created using `f5c resquiggle --rna -c ${FASTQ} ${SIGNAL_FILE} -o ${ALIGNMENT}`. Also, provide the argument `--rna` to the visualising command. Currently, there exists no RNA kmer model for r10.4.1 chemistry.
559
569
4. The input alignment format accepted by `squigualiser plot` is explained [here](https://hasindu2008.github.io/f5c/docs/output#resquiggle). This standard format made plotting a lot easier.
560
570
5. The argument `sig_move_offset` is the number of moves `n` to skip in the signal to correct the start of the alignment. This will not skip bases in the fastq sequence. For example, to align the first move with the first kmer `--sig_move_offset 0` should be passed. To align from the second move onwards, `--sig_move_offset 1` should be used.
561
571
6. Pysam does not allow reading SAM/BAM files without a `@SQ` line in the header. Hence, `squigualiser reform` script might error out with `NotImplementedError: can not iterate over samfile without header`. Add a fake `@SQ` header line with a zero length reference as follows,
@@ -571,12 +581,12 @@ Check [here](docs/different_alignments.md) for an example.
571
581
572
582

573
583
574
-
1. The first read is a signal-read alignment using guppy_v.6.3.7 move table annotation ([link](https://hiruna72.github.io/squigualiser/docs/figures/sig_to_read/testcase-1.1.html)).
575
-
2. The second read is a signal-read alignment using f5c resquiggle output ([link](https://hiruna72.github.io/squigualiser/docs/figures/sig_to_read/testcase-2.1.html)).
576
-
3. The third read is a signal-read alignment using the squigulator's simulated output ([link](https://hiruna72.github.io/squigualiser/docs/figures/sig_to_read/testcase-1.11.html)).
577
-
4. The fourth read (RNA) is a signal-read alignment using f5c resquiggle output ([link](https://hiruna72.github.io/squigualiser/docs/figures/sig_to_read/testcase-3.2.html)).
584
+
1. The first read is a signal-to-read alignment using guppy_v.6.3.7 move table annotation ([link](https://hiruna72.github.io/squigualiser/docs/figures/sig_to_read/testcase-1.1.html)).
585
+
2. The second read is a signal-to-read alignment using f5c resquiggle output ([link](https://hiruna72.github.io/squigualiser/docs/figures/sig_to_read/testcase-2.1.html)).
586
+
3. The third read is a signal-to-read alignment using the squigulator's simulated output ([link](https://hiruna72.github.io/squigualiser/docs/figures/sig_to_read/testcase-1.11.html)).
587
+
4. The fourth read (RNA) is a signal-to-read alignment using f5c resquiggle output ([link](https://hiruna72.github.io/squigualiser/docs/figures/sig_to_read/testcase-3.2.html)).
578
588
579
-
*[This](https://hiruna72.github.io/squigualiser/docs/figures/sig_to_reference/testcase-8.1.html) signal-reference alignment aligns a signal to the region `chr1:4270161-4271160`.
589
+
*[This](https://hiruna72.github.io/squigualiser/docs/figures/sig_to_reference/testcase-8.1.html) signal-to-reference alignment aligns a signal to the region `chr1:4270161-4271160`.
580
590
*[This](https://hiruna72.github.io/squigualiser/docs/figures/sig_to_reference/testcase-8.2.html) is the same plot with a fixed base width.
581
591
582
592
These examples were generated using the testcases - `1.1, 2.1, 1.11,` and `3.2` respectively in [test_plot_signal_to_read.sh](test/test_plot_signal_to_read.sh).
We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
3
+
4
+
- Reporting a bug
5
+
- Discussing the current state of the code
6
+
- Submitting a fix
7
+
- Proposing new features
8
+
- Becoming a maintainer
9
+
10
+
## We Develop with Github
11
+
We use github to host code, to track issues and feature requests, as well as accept pull requests.
12
+
13
+
## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests
14
+
Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests:
15
+
16
+
1. Fork the repo and create your branch from `main`.
17
+
2. If you've added code that should be tested, add tests.
18
+
3. If you've changed APIs, update the documentation.
19
+
4. Ensure the test suite passes.
20
+
5. Make sure your code lints.
21
+
6. Issue that pull request!
22
+
23
+
## Any contributions you make will be under the MIT Software License
24
+
In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.
25
+
26
+
## Report bugs using Github's [issues](https://github.com/hiruna72/squigualiser/issues)
27
+
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](); it's that easy!
28
+
29
+
## Write bug reports with detail, background, and sample code
30
+
Here's [an example from Craig Hockenberry](http://www.openradar.me/11905408).
31
+
32
+
**Great Bug Reports** tend to have:
33
+
34
+
- A quick summary and/or background
35
+
- Steps to reproduce
36
+
- Be specific!
37
+
- Give sample code if you can. [this stackoverflow question](http://stackoverflow.com/q/12488905/180626) includes sample code that *anyone* with a base R setup can run to reproduce
38
+
- What you expected would happen
39
+
- What actually happens
40
+
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
41
+
42
+
People *love* thorough bug reports. I'm not even kidding.
43
+
44
+
## Use a Consistent Coding Style
45
+
Borrowing these from [Facebook's Guidelines](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md)
46
+
47
+
## License
48
+
By contributing, you agree that your contributions will be licensed under its MIT License.
49
+
50
+
## References
51
+
This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md) and [from here](https://gist.github.com/briandk/3d2e8b3ec8daf5a27a62)
0 commit comments