Skip to content

Commit c8d4f52

Browse files
committed
update ghpages
2 parents a85aa6c + 10b26be commit c8d4f52

File tree

38 files changed

+1173
-533
lines changed

38 files changed

+1173
-533
lines changed

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

README.md

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,31 @@ signals (**squig**gles) + vis**ualiser** = **squigualiser**
55

66
Google Chrome is the recommended web browser to visualise these plots.
77

8+
Watch [the video](https://youtu.be/kClYH4KpOjk) to learn a few tricks to get the best out of the plots.
9+
810
![PyPI Downloads](https://img.shields.io/pypi/dm/squigualiser?label=pypi%20downloads)
911
[![PyPI](https://img.shields.io/pypi/v/squigualiser.svg?style=flat)](https://pypi.python.org/pypi/squigualiser)
1012
[![Snake CI](https://github.com/hiruna72/squigualiser/actions/workflows/snake.yml/badge.svg)](https://github.com/hiruna72/squigualiser/actions/workflows/snake.yml)
13+
[![GitHub Downloads](https://img.shields.io/github/downloads/hiruna72/squigualiser/total?logo=GitHub)](https://github.com/hiruna72/squigualiser/releases)
14+
<!---
15+
[![BioConda Install](https://img.shields.io/conda/dn/bioconda/slow5tools.svg?style=flag&label=BioConda%20install)](https://anaconda.org/bioconda/slow5tools)
16+
-->
17+
18+
Squigualiser preprint - https://www.biorxiv.org/content/10.1101/2024.02.19.581111v2
1119

1220
![image](docs/figures/different_aligments/method_eventalign.png)
13-
*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.
1424

1525
# Table of Contents
1626
1. [Quickstart](#quickstart)
1727
2. [Advanced Setup](#advanced-setup)
18-
3. [Signal to read visualisation](#signal-to-read-visualisation)
28+
3. [Signal-to-read visualisation](#signal-to-read-visualisation)
1929
1. [Option 1 - Using f5c resquiggle](#option-1---f5c-resquiggle)
2030
2. [Option 2 - Using basecaller move table](#option-2---basecaller-move-table)
2131
3. [Option 3 - Using squigulator signal simulation](#option-3---squigulator-signal-simulation)
22-
5. [Signal to reference visualisation](#signal-to-reference-visualisation)
32+
5. [Signal-to-reference visualisation](#signal-to-reference-visualisation)
2333
1. [Option 1 - Using f5c eventalign](#option-1-f5c-eventalign)
2434
2. [Option 2 - Using basecaller move table](#option-2---basecaller-move-table-1)
2535
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
173183
</div>
174184
</details>
175185

176-
## Signal to read visualisation
186+
## Signal-to-read visualisation
177187

178188
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.
179189

180190
#### Option 1 - f5c resquiggle
181191
<details>
182-
<summary>Steps for using f5c resquiggle signal-read alignment</summary>
192+
<summary>Steps for using f5c resquiggle signal-to-read alignment</summary>
183193
<div markdown=1>
184194

185195
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).
@@ -196,7 +206,7 @@ f5c resquiggle -c ${FASTQ} ${SIGNAL_FILE} -o ${ALIGNMENT}
196206
* Refer [Note(2)](#notes) for more information about `--kmer-model [KMER_MODEL]`, which is optional.
197207
* Refer [Note(3)](#notes) for more information about RNA.
198208

199-
3. Plot signal to read alignment
209+
3. Plot signal-to-read alignment
200210

201211
````
202212
OUTPUT_DIR=output_dir
@@ -238,7 +248,7 @@ squigualiser reform --sig_move_offset 0 --kmer_length 1 -c --bam basecalls.sam -
238248
* Refer [Note(5)](#notes) for a description about `sig_move_offset`.
239249
* Refer [Note(6)](#notes) for handling a potential SAM/BAM error.
240250

241-
3. Plot signal to read alignment
251+
3. Plot signal-to-read alignment
242252

243253
````
244254
FASTA_FILE=read.fasta
@@ -266,13 +276,13 @@ squigualiser plot --file ${FASTA_FILE} --slow5 ${SIGNAL_FILE} --alignment ${ALIG
266276
````
267277
REF=ref.fasta #reference
268278
READ=sim.fasta #simulated reads
269-
ALIGNMENT=sim.paf #contains signal-read alignment
279+
ALIGNMENT=sim.paf #contains signal-to-read alignment
270280
SIGNAL_FILE=sim.blow5 #simultated raw signal data
271281
272282
squigulator -x dna-r10-prom ${REF} -n 1 -o ${SIGNAL_FILE} -q ${READ} -c ${ALIGNMENT} # instead of dna-r10-prom, you can specify any other profile
273283
````
274284

275-
3. Plot signal to read alignment.
285+
3. Plot signal-to-read alignment.
276286

277287
````
278288
OUTPUT_DIR=output_dir
@@ -282,7 +292,7 @@ squigualiser plot -f ${READ} -s ${SIGNAL_FILE} -a ${ALIGNMENT} -o ${OUTPUT_DIR}
282292
</div>
283293
</details>
284294

285-
## Signal to reference visualisation
295+
## Signal-to-reference visualisation
286296

287297
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.
288298

@@ -386,7 +396,7 @@ REALIGN_BAM=realign_output.bam
386396
squigualiser realign --bam ${MAPP_SAM} --paf ${REFORMAT_PAF} -o ${REALIGN_BAM}
387397
````
388398

389-
5. Plot signal to reference alignment
399+
5. Plot signal-to-reference alignment
390400

391401
````
392402
REGION=chr1:6811404-6811443
@@ -417,7 +427,7 @@ NUM_READS=50 #number of reads to simulate
417427
squigulator -x dna-r10-prom ${REF} -o ${SIGNAL_FILE} -a sim.sam -n ${NUM_READS} && samtools sort sim.sam -o ${ALIGNMENT} && samtools index ${ALIGNMENT}
418428
```
419429

420-
3. Plot signal to reference alignment.
430+
3. Plot signal-to-reference alignment.
421431
````
422432
OUTPUT_DIR=output_dir
423433
REGION=chr1:6811404-6811443
@@ -460,10 +470,10 @@ tabix -0 -b 9 -e 8 -s 6 ${ALIGNMENT}
460470
![image](docs/figures/pileup/pileup_plot.png)
461471

462472
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.
464474
2. A genomic region should be specified using the argument `--region`
465475

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)
467477

468478
````
469479
REGION=chr1:6811011-6811198
@@ -535,7 +545,7 @@ However, the user is adviced to use `--profile` (documented [here](docs/profiles
535545
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).
536546

537547
### 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.
539549

540550

541551
## Plot Conventions
@@ -547,15 +557,15 @@ The commands `plot` and `plot_pileup` can take the argument `--sig_scale`. By pr
547557

548558

549559
## Calculate alignment statistics
550-
Calculate basic statistics of read/reference - signal alignments.
560+
Calculate basic statistics of signal-to-read/reference alignments.
551561
Check [here](docs/commands.md/#metric) for the command.
552562
Check [here](docs/different_alignments.md) for an example.
553563

554564
## Notes
555565

556566
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.
557567
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.
559569
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.
560570
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.
561571
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.
571581

572582
![image](docs/figures/preview.png)
573583

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)).
578588

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`.
580590
* [This](https://hiruna72.github.io/squigualiser/docs/figures/sig_to_reference/testcase-8.2.html) is the same plot with a fixed base width.
581591

582592
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).

docs/CONTRIBUTING.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Contributing to squigualiser
2+
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

Comments
 (0)