Skip to content

Commit

Permalink
Merge pull request #248 from gbouras13/1.3.0
Browse files Browse the repository at this point in the history
1.3.0
  • Loading branch information
gbouras13 authored Apr 11, 2023
2 parents b8ac144 + 508f34e commit c822b4c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Brief Overview
<img src="img/pharokka_workflow.png" alt="pharokka Workflow" height=600>
</p>

pharokka uses [PHANOTATE](https://github.com/deprekate/PHANOTATE), the only gene prediction program tailored to bacteriophages, as the default program for gene prediction. [Prodigal](https://github.com/hyattpd/Prodigal) is also available as an alternative. Following this, functional annotations are assigned by matching each predicted coding sequence (CDS) to the [PHROGs](https://phrogs.lmge.uca.fr), [CARD](https://card.mcmaster.ca) and [VFDB](http://www.mgc.ac.cn/VFs/main.htm) databases using [MMseqs2](https://github.com/soedinglab/MMseqs2). pharokka's main output is a GFF file suitable for using in downstream pangenomic pipelines like [Roary](https://sanger-pathogens.github.io/Roary/). pharokka also generates a `cds_functions.tsv` file, which includes counts of CDSs, tRNAs, tmRNAs, CRISPRs and functions assigned to CDSs according to the PHROGs database. See the full [usage](#usage) and check out the full [documentation](https://pharokka.readthedocs.io) for more details.
pharokka uses [PHANOTATE](https://github.com/deprekate/PHANOTATE), the only gene prediction program tailored to bacteriophages, as the default program for gene prediction. [Prodigal](https://github.com/hyattpd/Prodigal) is also available as an alternative. Following this, functional annotations are assigned by matching each predicted coding sequence (CDS) to the [PHROGs](https://phrogs.lmge.uca.fr), [CARD](https://card.mcmaster.ca) and [VFDB](http://www.mgc.ac.cn/VFs/main.htm) databases using [MMseqs2](https://github.com/soedinglab/MMseqs2). Pharokka's main output is a GFF file suitable for using in downstream pangenomic pipelines like [Roary](https://sanger-pathogens.github.io/Roary/). pharokka also generates a `cds_functions.tsv` file, which includes counts of CDSs, tRNAs, tmRNAs, CRISPRs and functions assigned to CDSs according to the PHROGs database. See the full [usage](#usage) and check out the full [documentation](https://pharokka.readthedocs.io) for more details.

Pharokka v 1.3.0 Update
-----------
Expand All @@ -44,13 +44,15 @@ It requires the input FASTA, Pharokka output directory, and the `-p` or `--prefi
You can run `pharokka_plotter.py` in the following form

```
pharokka_plotter.py -i input.fasta -n pharokka_plot.png -o pharokka_output_directory
pharokka_plotter.py -i input.fasta -n pharokka_plot -o pharokka_output_directory
```

This will create `pharokka_plot.png` as an output file plot of your phage.

An example plot is included below made with the following command (assuming Pharokka has been run with `SAOMS1_pharokka_output_directory` as the output directory).

```
pharokka_plotter.py -i test_data/SAOMS1.fasta -n SAOMS1_plot.png -o SAOMS1_pharokka_output_directory --interval 8000 --annotations 0.5 --plot_title 'Staphylococcus Phage SAOMS1'
pharokka_plotter.py -i test_data/SAOMS1.fasta -n SAOMS1_plot -o SAOMS1_pharokka_output_directory --interval 8000 --annotations 0.5 --plot_title 'Staphylococcus Phage SAOMS1'
```

<p align="center">
Expand Down
24 changes: 13 additions & 11 deletions docs/plotting.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,51 @@ It is reasonably customisable and is designed for single input phage contigs. If

You can run `pharokka_plotter.py` in the following way (most basic command below).

`pharokka_plotter.py -i input.fasta -n pharokka_plot.png -o pharokka_output_directory`
`pharokka_plotter.py -i input.fasta -n pharokka_plot -o pharokka_output_directory`

This will create `pharokka_plot.png` as an output file of your plot.

A prefix is not required for pharokka by default. If you used a prefix to create your pharokka output, please specify it:

`pharokka_plotter.py -i input.fasta -n pharokka_plot.png -o pharokka_output_directory -p my_prefix`
`pharokka_plotter.py -i input.fasta -n pharokka_plot -o pharokka_output_directory -p my_prefix`

If you want to give your plot a title (e.g. Escherichia phage lambda):

`pharokka_plotter.py -i input.fasta -n pharokka_plot.png -o pharokka_output_directory -t 'Escherichia phage lambda' `
`pharokka_plotter.py -i input.fasta -n pharokka_plot -o pharokka_output_directory -t 'Escherichia phage lambda' `

If you want to make the title bigger:

`pharokka_plotter.py -i input.fasta -n pharokka_plot.png -o pharokka_output_directory -t 'Escherichia phage lambda' --title_size 30 `
`pharokka_plotter.py -i input.fasta -n pharokka_plot -o pharokka_output_directory -t 'Escherichia phage lambda' --title_size 30 `

By default all CDSs that are not hypothetical or unknown are labelled. If you want to reduce this (if the plot is overcrowded for example), use `--annotations` to chose the proportion of annotations that you want labelled (descending based on size).
For example, the following command will label half the annotations

`pharokka_plotter.py -i input.fasta -n pharokka_plot.png -o pharokka_output_directory --annotations 0.5 `
`pharokka_plotter.py -i input.fasta -n pharokka_plot -o pharokka_output_directory --annotations 0.5 `

You can also use this to remove all CDS labels by specifying `--annotations 0`

`pharokka_plotter.py -i input.fasta -n pharokka_plot.png -o pharokka_output_directory --annotations 0 `
`pharokka_plotter.py -i input.fasta -n pharokka_plot -o pharokka_output_directory --annotations 0 `

By default hypothetical or unknown genes are not labelled. If you want to label them use `--label_hypotheticals`:

`pharokka_plotter.py -i input.fasta -n pharokka_plot.png -o pharokka_output_directory --label_hypotheticals `
`pharokka_plotter.py -i input.fasta -n pharokka_plot -o pharokka_output_directory --label_hypotheticals `

If you want the axis intervals to be changed (e.g. 10kbp here):

`pharokka_plotter.py -i input.fasta -n pharokka_plot.png -o pharokka_output_directory -t 'Escherichia phage lambda' --title_size 30 --interval 10000 `
`pharokka_plotter.py -i input.fasta -n pharokka_plot -o pharokka_output_directory -t 'Escherichia phage lambda' --title_size 30 --interval 10000 `

By default all axis labels longer than 20 characters are truncated. To change this number to whatever you want, use `--truncate`.
For example this will truncate all labels to 15 characters:

`pharokka_plotter.py -i input.fasta -n pharokka_plot.png -o pharokka_output_directory --truncate 15`
`pharokka_plotter.py -i input.fasta -n pharokka_plot -o pharokka_output_directory --truncate 15`

If you want to make the CDS labels bigger (defaults to 8):

`pharokka_plotter.py -i input.fasta -n pharokka_plot.png -o pharokka_output_directory -t label_size 10`
`pharokka_plotter.py -i input.fasta -n pharokka_plot -o pharokka_output_directory -t label_size 10`

If you want to change the plot resolution (default 600 dpi)

`pharokka_plotter.py -i input.fasta -n pharokka_plot.png -o pharokka_output_directory -dpi 600`
`pharokka_plotter.py -i input.fasta -n pharokka_plot -o pharokka_output_directory -dpi 600`

```
usage: pharokka_plotter.py [-h] -i INFILE [-n PLOT_NAME] -o OUTDIR [-p PREFIX] [-t PLOT_TITLE] [-f]
Expand Down

0 comments on commit c822b4c

Please sign in to comment.