Skip to content

Commit

Permalink
Add jobs option
Browse files Browse the repository at this point in the history
  • Loading branch information
MesihK committed Jul 20, 2023
1 parent 44b670f commit 905a3cb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## PROST python package v0.2.12
## PROST python package v0.2.13

PRotein Ortholog Search Tool is a new homolog detection tool that utilizes ESM-1b language model and iDCT quantization method.
PROST is fast and accurate compared to traditional tools.
Expand All @@ -18,13 +18,13 @@ Following commands can be used to create databases and perform homology search.
```
prost makedb db/sp.fa db/sp.prdb
prost makedb db/covid.fa db/covid.prdb
prost search --thr 0.05 db/covid.prdb db/sp.prdb results
prost searchsp --thr 0.05 db/covid.prdb results
prost search --thr 0.05 --jobs 8 db/covid.prdb db/sp.prdb results
prost searchsp --thr 0.05 --jobs 8 db/covid.prdb results
prost tosjonwp -a -i 'info' results.tsv website
```

* `makedb`: creates a PROST database from given fasta file. The fasta file usually contains more than one entry.
* `search`: searches a query database agains a target database. Query database can contain one or more sequences embedded using makedb command. `--thr` can be used to specify an e-value threshold. The default threshold is 0.05.
* `search`: searches a query database agains a target database. Query database can contain one or more sequences embedded using makedb command. `--thr` can be used to specify an e-value threshold. The default threshold is 0.05. You can paralelize the search by using `--jobs` option.
* `searchsp`: searches a query database agains a SwissProt February 2023 database. Performs GO enrichment analysis on found homologs. Query database can contain one or more sequences embedded using makedb command. Again `--thr` can be used to specify an e-value threshold. `--gothr` can be used to specifiy different e-value threshold for GO enrichment analysis.
`searchsp` produces a tab seprataed file `.tsv` This file can be converted into a `.json` file that can be used with the tool [JSONWP](https://jsonwp.onrender.com/) using the command `prost tojsonwp -i 'Here is an info string to shown on website' results.tsv website`
Here is an example result:
Expand Down
5 changes: 3 additions & 2 deletions bin/prost
Original file line number Diff line number Diff line change
Expand Up @@ -493,16 +493,17 @@ PROST [python package](https://github.com/MesihK/prost) can be used to generate

@click.command()
@click.option('--thr', default=0.05, help='E-value threshold for homolog detection')
@click.option('-n', '--jobs', default=1, help='Number of jobs to run in parallel')
@click.argument('querydb', type=click.Path(exists=True,file_okay=True,dir_okay=False))
@click.argument('targetdb', type=click.Path(exists=True,file_okay=True,dir_okay=False))
@click.argument('out', type=click.Path(exists=False,file_okay=True,dir_okay=False))
def search(thr, querydb, targetdb, out):
def search(thr, jobs, querydb, targetdb, out):
'''Search a query database in target database.
This command searches a query database against a target database.
Both databases should be created using makedb command.
Databases can contain one or more sequences.
An e-value threshold can be specified with --thr flag. The default e-value threshold is 0.05'''
goList,homologList = _search(thr,None,querydb,targetdb,None)
goList,homologList = _search(thr,None,querydb,targetdb,None,jobs)
print(f'Saving results into {out}.tsv.')
toTSV(goList,homologList,out)
print(f'You can use `prost tojsonwp` command to convert {out}.tsv results into a webpage!')
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = pyprost
version = 0.2.12
version = 0.2.13
author = Mesih Kilinc
author_email = mesih@iastate.edu
description = PRotein Ortholog Search Tool
Expand Down

0 comments on commit 905a3cb

Please sign in to comment.