Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/dawe/scatACC
Browse files Browse the repository at this point in the history
  • Loading branch information
dawe committed Jun 17, 2021
2 parents 9d16955 + 3e73c0f commit 2b7710e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions bc2rg.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ def build_header(in_header, coder, group = '', keep_unmatched=True):
header[k] = in_header[k]

# read groups
_pl = _pu = _lb = _cn = 'default'
if 'RG' in in_header:
_pl = in_header['RG'][0]['PL']
_pu = in_header['RG'][0]['PU']
_lb = in_header['RG'][0]['LB']
_cn = in_header['RG'][0]['CN']
else:
_pl = _pu = _lb = _cn = 'default'
try:
_pl = in_header['RG'][0]['PL']
_pu = in_header['RG'][0]['PU']
_lb = in_header['RG'][0]['LB']
_cn = in_header['RG'][0]['CN']
except KeyError:
1
_rg = []
for bc in coder.values():
_rg.append({'ID': "%s-%s" % (bc, group),
Expand Down
2 changes: 1 addition & 1 deletion separate_bam.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def main():
if not options.output:
prefix, _ = os.path.splitext(os.path.basename(options.bamfile))
else:
prefix = 'output'
prefix = options.output

try:
clusters = pd.read_table(options.clusters, index_col=0, header=None)
Expand Down

0 comments on commit 2b7710e

Please sign in to comment.