Skip to content

Commit

Permalink
Fix broken test, as part of #530.
Browse files Browse the repository at this point in the history
  • Loading branch information
donkirkby committed Jun 10, 2020
1 parent fed2058 commit d724084
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 48 deletions.
50 changes: 2 additions & 48 deletions micall/tests/test_remap.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,53 +1034,6 @@ def test_star_region(self):
self.assertEqual(expected_remap_counts, self.remap_counts.getvalue())
self.assertEqual(expected_seed_counts, seed_counts)

def test_unmapped_flag(self):
self.maxDiff = None
prelim_csv = StringIO("""\
qname,flag,rname,pos,mapq,cigar,rnext,pnext,tlen,seq,qual
example1,89,R1-seed,1,0,54M,=,1,0,\
AAACCCTTTAAACCCTTTAAACCCTTTAAACCCTTTAAACCCTTTAAACCCTTT,\
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
example2,89,R1-seed,1,0,54M,=,1,0,\
AAAACCTTTAAAACCTTTAAAACCTTTAAAACCTTTAAAACCTTTAAAACCTTT,\
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
example3,93,R1-seed,*,*,*,*,*,*,\
AAAACCTTTAAAACCTTTAAAACCTTTAAAACCTTTAAAACCTTTAAAACCTTT,\
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
""")
count_threshold = 2
expected_sam_file = """\
@HD VN:1.0 SO:unsorted
@SQ SN:R1-seed LN:9
@SQ SN:R2-seed LN:12
@PG ID:bowtie2 PN:bowtie2 VN:2.2.3 CL:""
example1\t89\tR1-seed\t1\t0\t54M\t=\t1\t0\t\
AAACCCTTTAAACCCTTTAAACCCTTTAAACCCTTTAAACCCTTTAAACCCTTT\t\
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
example2\t89\tR1-seed\t1\t0\t54M\t=\t1\t0\t\
AAAACCTTTAAAACCTTTAAAACCTTTAAAACCTTTAAAACCTTTAAAACCTTT\t\
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
example3\t93\tR1-seed\t*\t*\t*\t*\t*\t*\t\
AAAACCTTTAAAACCTTTAAAACCTTTAAAACCTTTAAAACCTTTAAAACCTTT\t\
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
"""
expected_remap_counts = """\
type,filtered_count,count
prelim *,0,1
prelim R1-seed,2,2
"""
expected_seed_counts = {'R1-seed': 2}

seed_counts = convert_prelim(prelim_csv,
self.sam_file,
self.remap_counts_writer,
count_threshold,
self.projects)

self.assertEqual(expected_sam_file, self.sam_file.getvalue())
self.assertEqual(expected_remap_counts, self.remap_counts.getvalue())
self.assertEqual(expected_seed_counts, seed_counts)

def test_best_in_group(self):
self.maxDiff = None
prelim_csv = StringIO("""\
Expand Down Expand Up @@ -1166,7 +1119,8 @@ def test_unmapped_read(self):
"""
expected_remap_counts = """\
type,filtered_count,count
prelim R1-seed,1,2
prelim *,0,1
prelim R1-seed,1,1
"""
expected_seed_counts = {}

Expand Down
1 change: 1 addition & 0 deletions micall_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
logging.basicConfig(level=logging.INFO,
format='%(asctime)s[%(levelname)s]%(name)s.%(funcName)s(): %(message)s')
logger = logging.getLogger('micall')
# logging.getLogger('micall.core.trim_fastqs').setLevel(logging.DEBUG)


class BSrequest:
Expand Down

0 comments on commit d724084

Please sign in to comment.