Skip to content

Commit

Permalink
fixed bug that occurs when remove list is not used
Browse files Browse the repository at this point in the history
  • Loading branch information
stevemussmann committed Mar 9, 2019
1 parent 2ab8728 commit 7a94ca7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions vcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def __init__(self, infile, thin, maf, ind, snp, bi, r):
self.snp = snp #maximum allowable missing data per individual
self.bi = bi #controls biallelic filter
self.removeFile = r #file containing individuals to be removed
self.removeInds = False
if self.removeFile:
self.removeInds = True

Expand Down Expand Up @@ -122,10 +123,11 @@ def plink(self):
def print_populations(self,popmap):
#make dictionary of blacklisted individuals
blacklist = dict()
rmf = self.readfile(self.removeFile)
for key in rmf:
key.rstrip()
blacklist[key]=1
if(self.removeInds == True):
rmf = self.readfile(self.removeFile)
for key in rmf:
key.rstrip()
blacklist[key]=1

#print(blacklist)

Expand Down

0 comments on commit 7a94ca7

Please sign in to comment.