forked from mattloose/RUscripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetmodels.py
More file actions
executable file
·36 lines (29 loc) · 1.19 KB
/
getmodels.py
File metadata and controls
executable file
·36 lines (29 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import argparse
import h5py
import sys
import os
__version__ = "0.1v"
### Functions
# def get_model_type(hdf, strand, args):
# for element in hdf:
if __name__ == "__main__":
## Parse arguments
parser = argparse.ArgumentParser(description="Fasta to raw squiggle model converter")
parser.add_argument("-r", "--read", required=True,
dest="read", type=str,
help="Provide a read file to extract the current model from.")
parser.add_argument("-V", "--verbose-true",
dest="debug", default=False, action="store_true",
help="Print detailed messages while processing files to aid in debugging.")
parser.add_argument("-v", "--version", action="version", version=("%(prog)s version={version}".format(version=__version__)))
args = parser.parse_args()
try:
hdf = h5py.File(args.read, "r")
print(hdf)
except:
print("h5py File open failed, exiting...", file=sys.stderr)
sys.exit(1)
model_strand = ("template", "complement")
for model in model_strand:
model_type = get_model_type(hdf, model, args)
print("Looking for ", model, " model.")