ORForise 1.5.1__py3-none-any.whl → 1.6.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ORForise/Aggregate_Compare.py +2 -4
- ORForise/Annotation_Compare.py +16 -53
- ORForise/Annotation_Intersector.py +726 -0
- ORForise/Aux/TabToGFF/TabToGFF.py +140 -0
- ORForise/Convert_To_GFF.py +139 -0
- ORForise/GFF_Adder.py +454 -179
- ORForise/List_Tools.py +63 -0
- ORForise/StORForise.py +8 -4
- ORForise/Tools/EasyGene/EasyGene.py +13 -1
- ORForise/Tools/{GLIMMER_3/GLIMMER_3.py → GLIMMER3/GLIMMER3.py} +2 -2
- ORForise/Tools/GLIMMER3/__init__.py +0 -0
- ORForise/Tools/{GeneMark_HA/GeneMark_HA.py → GeneMarkHA/GeneMarkHA.py} +1 -1
- ORForise/Tools/GeneMarkHA/__init__.py +0 -0
- ORForise/Tools/Prodigal/Prodigal.py +13 -1
- ORForise/utils.py +4 -1
- orforise-1.6.1.dist-info/METADATA +1038 -0
- {orforise-1.5.1.dist-info → orforise-1.6.1.dist-info}/RECORD +29 -24
- {orforise-1.5.1.dist-info → orforise-1.6.1.dist-info}/entry_points.txt +6 -2
- ORForise/GFF_Intersector.py +0 -192
- orforise-1.5.1.dist-info/METADATA +0 -427
- /ORForise/{Tools → Aux}/StORF_Undetected/Completely_Undetected/Completey_Undetected.py +0 -0
- /ORForise/{Tools/GLIMMER_3 → Aux/StORF_Undetected/Completely_Undetected}/__init__.py +0 -0
- /ORForise/{Tools → Aux}/StORF_Undetected/StORF_Undetected.py +0 -0
- /ORForise/{Tools/GeneMark_HA → Aux/StORF_Undetected}/__init__.py +0 -0
- /ORForise/{Tools/StORF_Undetected/Completely_Undetected → Aux/StORF_Undetected/unvitiated_Genes}/__init__.py +0 -0
- /ORForise/{Tools → Aux}/StORF_Undetected/unvitiated_Genes/unvitiated_Missed_Genes.py +0 -0
- /ORForise/{Tools/StORF_Undetected → Aux/TabToGFF}/__init__.py +0 -0
- /ORForise/{Tools/StORF_Undetected/unvitiated_Genes → Aux}/__init__.py +0 -0
- {orforise-1.5.1.dist-info → orforise-1.6.1.dist-info}/WHEEL +0 -0
- {orforise-1.5.1.dist-info → orforise-1.6.1.dist-info}/licenses/LICENSE +0 -0
- {orforise-1.5.1.dist-info → orforise-1.6.1.dist-info}/top_level.txt +0 -0
ORForise/List_Tools.py
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
from importlib import import_module
|
|
2
|
+
import argparse
|
|
3
|
+
import sys, os
|
|
4
|
+
import gzip, csv
|
|
5
|
+
import logging
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
try:
|
|
10
|
+
from utils import *
|
|
11
|
+
from Comparator import tool_comparison
|
|
12
|
+
except ImportError:
|
|
13
|
+
from .Comparator import tool_comparison
|
|
14
|
+
from .utils import *
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def main():
|
|
21
|
+
print(WELCOME)
|
|
22
|
+
|
|
23
|
+
print('ORForise ' + ORForise_Version + ': List Tools Run Parameters')
|
|
24
|
+
|
|
25
|
+
tools = set()
|
|
26
|
+
base_dirs = [
|
|
27
|
+
os.path.join(os.path.dirname(__file__), 'Tools'),
|
|
28
|
+
os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'Tools')),
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
for base in base_dirs:
|
|
32
|
+
if not os.path.isdir(base):
|
|
33
|
+
continue
|
|
34
|
+
try:
|
|
35
|
+
for entry in os.listdir(base):
|
|
36
|
+
entry_path = os.path.join(base, entry)
|
|
37
|
+
if os.path.isdir(entry_path) and not entry.startswith('.') and entry != '__pycache__':
|
|
38
|
+
tools.add(entry)
|
|
39
|
+
except OSError:
|
|
40
|
+
continue
|
|
41
|
+
|
|
42
|
+
if not tools:
|
|
43
|
+
print('No tools found in the searched directories.')
|
|
44
|
+
return
|
|
45
|
+
|
|
46
|
+
print('Available tools:')
|
|
47
|
+
for tool_name in sorted(tools):
|
|
48
|
+
print(' -', tool_name)
|
|
49
|
+
try:
|
|
50
|
+
tool_ = import_module('Tools.' + tool_name + '.' + tool_name)
|
|
51
|
+
print(' Imported from Tools.' + tool_name)
|
|
52
|
+
except ModuleNotFoundError:
|
|
53
|
+
try:
|
|
54
|
+
tool_ = import_module('ORForise.Tools.' + tool_name + '.' + tool_name)
|
|
55
|
+
print(' Imported from ORForise.Tools.' + tool_name)
|
|
56
|
+
except ModuleNotFoundError:
|
|
57
|
+
print(' Tool not importable')
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
if __name__ == "__main__":
|
|
62
|
+
main()
|
|
63
|
+
print("Complete")
|
ORForise/StORForise.py
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
from importlib import import_module
|
|
2
|
-
|
|
3
2
|
import argparse
|
|
4
|
-
import collections
|
|
5
3
|
import csv
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
try:
|
|
6
|
+
from utils import *
|
|
7
|
+
from Comparator import tool_comparison
|
|
8
|
+
except ImportError:
|
|
9
|
+
from .Comparator import tool_comparison
|
|
10
|
+
from .utils import *
|
|
8
11
|
|
|
9
12
|
###################
|
|
10
13
|
|
|
@@ -98,7 +101,8 @@ def comparator(tool, input_to_analyse, storfs_to_find_missing, genome_to_compare
|
|
|
98
101
|
|
|
99
102
|
|
|
100
103
|
def main():
|
|
101
|
-
|
|
104
|
+
print(WELCOME)
|
|
105
|
+
parser = argparse.ArgumentParser(description='ORForise ' + ORForise_Version + ': StORForise Run Parameters.')
|
|
102
106
|
parser.add_argument('-t', '--tool', default='GFF', help='Which tool/format would you analyse with StORF-R?')
|
|
103
107
|
parser.add_argument('-i', '--input_to_analyse', default='', help='Location of file containing missed genes')
|
|
104
108
|
parser.add_argument('-stf', '--storfs_to_find_missing', default='', help='STORFs to find missing.')
|
|
@@ -11,11 +11,23 @@ except ImportError:
|
|
|
11
11
|
def EasyGene(*args):
|
|
12
12
|
tool_pred = args[0]
|
|
13
13
|
dna_regions = args[1]
|
|
14
|
+
if not dna_regions: # This triggers if dna_regions is an empty dict (GFF_Intersect passed nothing)
|
|
15
|
+
dna_regions = collections.OrderedDict()
|
|
16
|
+
with open(tool_pred, 'r') as EasyGene_input:
|
|
17
|
+
for line in EasyGene_input:
|
|
18
|
+
line = line.split()
|
|
19
|
+
if len(line) == 10 and line[0] and "CDS" in line[2] and line[0] not in dna_regions:
|
|
20
|
+
dna_regions[line[0]] = [] # Placeholder for genome sequence
|
|
21
|
+
return dna_regions
|
|
22
|
+
|
|
14
23
|
easyGene_ORFs = collections.OrderedDict()
|
|
15
24
|
for dna_region in dna_regions:
|
|
16
25
|
easyGene_ORFs[dna_region] = collections.OrderedDict()
|
|
17
26
|
for dna_region in dna_regions:
|
|
18
|
-
|
|
27
|
+
try:
|
|
28
|
+
genome = dna_regions[dna_region][0]
|
|
29
|
+
except IndexError:
|
|
30
|
+
genome = dna_regions[dna_region]
|
|
19
31
|
genome_size = len(genome)
|
|
20
32
|
genome_rev = revCompIterative(genome)
|
|
21
33
|
with open(tool_pred, 'r') as EasyGene_input:
|
|
@@ -19,7 +19,7 @@ def GLIMMER_3(*args):
|
|
|
19
19
|
genome_size = len(genome)
|
|
20
20
|
genome_rev = revCompIterative(genome)
|
|
21
21
|
with open(tool_pred,
|
|
22
|
-
'r') as glimmer_input: #
|
|
22
|
+
'r') as glimmer_input: # GLIMMER3 reverses the start and stop positions for ORFS on the negative strand
|
|
23
23
|
for line in glimmer_input:
|
|
24
24
|
if '>' not in line: # This will not work with multiple contigs
|
|
25
25
|
line = line.split()
|
|
@@ -39,7 +39,7 @@ def GLIMMER_3(*args):
|
|
|
39
39
|
startCodon = genome[start - 1:start + 3]
|
|
40
40
|
stopCodon = genome[stop - 3:stop]
|
|
41
41
|
po = str(start) + ',' + str(stop)
|
|
42
|
-
orf = [strand, startCodon, stopCodon, 'CDS', '
|
|
42
|
+
orf = [strand, startCodon, stopCodon, 'CDS', 'GLIMMER3']
|
|
43
43
|
GLIMMER_ORFs.update({po: orf})
|
|
44
44
|
|
|
45
45
|
for group in GLIMMER_ORFs:
|
|
File without changes
|
|
@@ -34,7 +34,7 @@ def GeneMark_HA(*args):
|
|
|
34
34
|
startCodon = genome[start - 1:start + 2]
|
|
35
35
|
stopCodon = genome[stop - 3:stop]
|
|
36
36
|
po = str(start) + ',' + str(stop)
|
|
37
|
-
orf = [strand, startCodon, stopCodon, 'CDS', '
|
|
37
|
+
orf = [strand, startCodon, stopCodon, 'CDS', 'GeneMarkHA']
|
|
38
38
|
geneMark_HA_ORFs.update({po: orf})
|
|
39
39
|
|
|
40
40
|
for group in geneMark_HA_ORFs:
|
|
File without changes
|
|
@@ -11,11 +11,23 @@ except ImportError:
|
|
|
11
11
|
def Prodigal(*args):
|
|
12
12
|
tool_pred = args[0]
|
|
13
13
|
dna_regions = args[1]
|
|
14
|
+
if not dna_regions: # This triggers if dna_regions is an empty dict (GFF_Intersect passed nothing)
|
|
15
|
+
dna_regions = collections.OrderedDict()
|
|
16
|
+
with open(tool_pred, 'r') as EasyGene_input:
|
|
17
|
+
for line in EasyGene_input:
|
|
18
|
+
line = line.split()
|
|
19
|
+
if len(line) == 10 and "CDS" in line[2] and line[0] not in dna_regions:
|
|
20
|
+
dna_regions[line[0]] = [] # Placeholder for genome sequence
|
|
21
|
+
return dna_regions
|
|
22
|
+
|
|
14
23
|
prodigal_ORFs = collections.OrderedDict()
|
|
15
24
|
for dna_region in dna_regions:
|
|
16
25
|
prodigal_ORFs[dna_region] = collections.OrderedDict()
|
|
17
26
|
for dna_region in dna_regions:
|
|
18
|
-
|
|
27
|
+
try:
|
|
28
|
+
genome = dna_regions[dna_region][0]
|
|
29
|
+
except IndexError:
|
|
30
|
+
genome = dna_regions[dna_region]
|
|
19
31
|
genome_size = len(genome)
|
|
20
32
|
genome_rev = revCompIterative(genome)
|
|
21
33
|
with open(tool_pred, 'r') as prodigal_input:
|
ORForise/utils.py
CHANGED
|
@@ -4,7 +4,10 @@ import collections
|
|
|
4
4
|
# Constants
|
|
5
5
|
SHORT_ORF_LENGTH = 300
|
|
6
6
|
MIN_COVERAGE = 75
|
|
7
|
-
ORForise_Version = 'v1.
|
|
7
|
+
ORForise_Version = 'v1.6.1'
|
|
8
|
+
WELCOME=("Thank you for using ORForise\nPlease report any issues to: https://github.com/NickJD/ORForise/issues\n"
|
|
9
|
+
"Please Cite: https://doi.org/10.1093/bioinformatics/btab827\n"
|
|
10
|
+
"#####")
|
|
8
11
|
|
|
9
12
|
|
|
10
13
|
def revCompIterative(watson): # Gets Reverse Complement
|