Mercurial > repos > jdv > albacore
comparison albacore_1D.py @ 6:3870c546db18 draft
planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/albacore commit 1514f4060da0b3a7866ac36d8a389828cbf48bd7
author | jdv |
---|---|
date | Tue, 23 Jan 2018 14:24:39 -0500 |
parents | 8a9f61d08201 |
children | ce1fa05ffb6c |
comparison
equal
deleted
inserted
replaced
5:4d72adba794f | 6:3870c546db18 |
---|---|
119 if len(files) < 1: | 119 if len(files) < 1: |
120 raise ValueError('No FAST5 files found') | 120 raise ValueError('No FAST5 files found') |
121 test_file = files[0] | 121 test_file = files[0] |
122 | 122 |
123 f = h5py.File(test_file,"r") | 123 f = h5py.File(test_file,"r") |
124 flowcell = f["/UniqueGlobalKey/context_tags"].attrs["flowcell"].upper() | 124 #TODO: clean up attribute checking |
125 kit = f["/UniqueGlobalKey/context_tags"].attrs["sequencing_kit"].upper() | 125 try: |
126 flowcell = f["/UniqueGlobalKey/context_tags"].attrs["flowcell"].upper() | |
127 except: | |
128 try: | |
129 flowcell = f["/UniqueGlobalKey/context_tags"].attrs["flowcell_type"].upper() | |
130 except: | |
131 raise ValueError('No attribute found for flowcell type') | |
132 try: | |
133 kit = f["/UniqueGlobalKey/context_tags"].attrs["sequencing_kit"].upper() | |
134 except: | |
135 raise ValueError('No attribute found for sequencing kit') | |
136 | |
126 except OSError as e: | 137 except OSError as e: |
127 print("Unexpected error:", e.strerror) | 138 print("Unexpected error:", e.strerror) |
128 raise | 139 raise |
129 | 140 |
130 except: | 141 except: |