Skip to content

Commit

Permalink
[re/factor] readme and changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ChocoParrot committed Sep 8, 2021
1 parent db3c9c8 commit 34b9ff9
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 4 deletions.
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# ORFFinder
ORFFinder in Python. Inspired by NCBI's version: https://www.ncbi.nlm.nih.gov/orffinder/

### Installation:
`pip3 install orffinder`

### Usage
Import the package

```py
from Bio import SeqIO
import orffinder

sequence = SeqIO.read("gene.fasta", "fasta")
orffinder.getORFs(sequence, minimum_length=75, remove_nested=True)
```

### Documentation
**getORFs()**
```
Returns the loci of discovered ORFs in a dictionary format.
sequence: sequence in Biopython Seq or String format.
minimum_length: minimum size of ORF in nucleotides. Default: 75
start_codons: recognised 3-base-pair codons for initialisation. Default: ["ATG"]
stop_codons: recognised 3-base pair condons for termination. Default: ["TAA", "TAG", "TGA"]
remove_nested: remove all ORFs completely encased in another. Default: False
trim_trailing: remove ORFs are the edge of the sequence that do not have a defined stop codon. Default: False
```

**getORFNucleotides()**
```
Returns the loci of discovered ORFs in a dictionary format.
sequence: sequence in Biopython Seq or String format.
return_loci: return the loci together with the nucleotide sequences. Default: False
minimum_length: minimum size of ORF in nucleotides. Default: 75
start_codons: recognised 3-base-pair codons for initialisation. Default: ["ATG"]
stop_codons: recognised 3-base pair condons for termination. Default: ["TAA", "TAG", "TGA"]
remove_nested: remove all ORFs completely encased in another. Default: False
trim_trailing: remove ORFs are the edge of the sequence that do not have a defined stop codon. Default: False
```

**getORFProteins()**
```
Returns the loci of discovered ORFs in a dictionary format.
sequence: sequence in Biopython Seq or String format.
translation_table: translation table as per BioPython. Default: 1
return_loci: return the loci together with the protein sequences. Default: False
minimum_length: minimum size of ORF in nucleotides. Default: 75
start_codons: recognised 3-base-pair codons for initialisation. Default: ["ATG"]
stop_codons: recognised 3-base pair condons for termination. Default: ["TAA", "TAG", "TGA"]
remove_nested: remove all ORFs completely encased in another. Default: False
trim_trailing: remove ORFs are the edge of the sequence that do not have a defined stop codon. Default: False
```
9 changes: 5 additions & 4 deletions orffinder/orffinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ def getORFNucleotides (sequence, return_loci=False, **kwargs):
Returns the loci of discovered ORFs in a dictionary format.
sequence: sequence in Biopython Seq or String format.
return_loci: return the loci together with the nucleotide sequences.
minimum_length: minimum size of ORF in nucleotides.
return_loci: return the loci together with the nucleotide sequences. Default: False
minimum_length: minimum size of ORF in nucleotides. Default: 75
start_codons: recognised 3-base-pair codons for initialisation. Default: ["ATG"]
stop_codons: recognised 3-base pair condons for termination. Default: ["TAA", "TAG", "TGA"]
remove_nested: remove all ORFs completely encased in another. Default: False
Expand Down Expand Up @@ -191,8 +191,9 @@ def getORFProteins (sequence, translation_table=1, return_loci=False, **kwargs):
Returns the loci of discovered ORFs in a dictionary format.
sequence: sequence in Biopython Seq or String format.
return_loci: return the loci together with the protein sequences.
minimum_length: minimum size of ORF in nucleotides.
translation_table: translation table as per BioPython. Default: 1
return_loci: return the loci together with the protein sequences. Default: False
minimum_length: minimum size of ORF in nucleotides. Default: 75
start_codons: recognised 3-base-pair codons for initialisation. Default: ["ATG"]
stop_codons: recognised 3-base pair condons for termination. Default: ["TAA", "TAG", "TGA"]
remove_nested: remove all ORFs completely encased in another. Default: False
Expand Down

0 comments on commit 34b9ff9

Please sign in to comment.