Skip to content

Commit

Permalink
fixes to fastq counting and test function names
Browse files Browse the repository at this point in the history
  • Loading branch information
dpark01 committed Jun 16, 2016
1 parent ac5cf6d commit 0fc1c09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion assembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ def __init__(self, n_start, n_trimmed, n_rmdup, n_purge, n_subsamp):


def count_fastq_reads(inFastq):
''' Maybe move this to util.file one day '''
with util.file.open_or_gzopen(inFastq, 'rt') as inf:
n = sum(1 for line in inf if line.startswith('>'))
n = sum(1 for line in inf if line.startswith('@'))
return n


Expand Down
2 changes: 1 addition & 1 deletion test/unit/test_assembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def test_empty_input_succeed(self):
self.assertEqual(os.path.getsize(outFasta), 0)
os.unlink(outFasta)

def test_empty_input_succeed(self):
def test_empty_input_fail(self):
inDir = util.file.get_test_input_path()
inBam = os.path.join(inDir, 'empty.bam')
clipDb = os.path.join(inDir, 'TestAssembleTrinity', 'clipDb.fasta')
Expand Down

0 comments on commit 0fc1c09

Please sign in to comment.