2 parents 0eaf741 + e869898 commit ce32423Copy full SHA for ce32423
2 files changed
_pytadbit/parsers/hic_bam_parser.py
@@ -374,13 +374,6 @@ def _read_bam_frag(inbam, filter_exclude, all_bins, sections1, sections2,
374
refs = bamfile.references
375
bam_start = start - 2
376
bam_start = max(0, bam_start)
377
- section_pos = []
378
- for sec in sections1:
379
- if sec not in section_pos:
380
- section_pos.append(sec[0])
381
- for sec in sections2:
382
383
384
try:
385
dico = {}
386
for r in bamfile.fetch(region=region,
@@ -677,7 +670,7 @@ def read_bam(inbam, filter_exclude, resolution, ncpus=8,
677
670
if ncpus == 1:
678
671
read_bam_frag(inbam, filter_exclude, all_bins,
679
672
bins_dict1, bins_dict2, rand_hash,
680
- resolution, tmpdir, region, b, e,)
673
+ resolution, tmpdir, region, b, e)
681
674
else:
682
675
procs.append(pool.apply_async(
683
676
read_bam_frag, args=(inbam, filter_exclude, all_bins,
_pytadbit/parsers/sam_parser.py
@@ -108,7 +108,7 @@ def parse_sam(f_names1, f_names2=None, out_file1=None, out_file2=None,
108
if mapper.lower()=='gem':
109
condition = lambda x: x[1][0][0] != 'N'
110
elif mapper.lower() in ['bowtie', 'bowtie2']:
111
- condition = lambda x: 'XS' in dict(x)
+ condition = lambda x: 'XS' == x[0][0]
112
113
warn('WARNING: unrecognized mapper used to generate file\n')
114
condition = lambda x: x[1][1] != 1
0 commit comments