33 jobinfo = subprocess.Popen([
'sam_metadata_dumper', inputfile],
34 stdout=subprocess.PIPE,
35 stderr=subprocess.PIPE)
36 jobout, joberr = jobinfo.communicate()
41 raise RuntimeError(
'sam_metadata_dumper failed with status %d' % rc)
47 n = jobout.find(
'"runs"')
49 m = jobout.rfind(
'\n', 0, n)
51 json_str = jobout[:m+1]
52 k = jobout.find(
'\n', n)
54 json_str += jobout[k+1:]
60 js = json.loads(json_str)
65 if 'data_stream' in md:
66 result = md[
'data_stream']
68 raise RuntimeError(
'Sam metadata does not contain stream.')
def get_stream(inputfile)