Skip to content

Commit

Permalink
On branch temp
Browse files Browse the repository at this point in the history
pyloh/preprocess/io.py: raise error if the ref feeded from command line is different from the bam files
  • Loading branch information
yil8 committed Jan 10, 2014
1 parent 1dfa9af commit 12ada45
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pyloh/preprocess/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ def next(self):
pos = normal_column.pos
ref_base = self.ref_genome_fasta.fetch(self.chrom, pos, pos + 1).upper()

if ref_base == '':
print 'Error: %s does not match the reference of the bam files' \
% self.ref_genome_fasta.filename
sys.exit(-1)

paired_counts = self._get_paired_counts(normal_column, tumor_column, pos, ref_base)

if paired_counts == None:
Expand Down

0 comments on commit 12ada45

Please sign in to comment.