Skip to content

Commit

Permalink
Merge pull request #17 from kr-colab/samples_bug
Browse files Browse the repository at this point in the history
fixed minor bug with samples coming in from zarr as bytes
  • Loading branch information
andrewkern authored Oct 1, 2020
2 parents dde2666 + 26b26b9 commit c76e3d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/locator.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def sort_samples(samples):
sample_data=pd.read_csv(args.sample_data,sep="\t")
sample_data['sampleID2']=sample_data['sampleID']
sample_data.set_index('sampleID',inplace=True)
samples = samples.astype('str')
sample_data=sample_data.reindex(np.array(samples)) #sort loc table so samples are in same order as vcf samples
if not all([sample_data['sampleID2'][x]==samples[x] for x in range(len(samples))]): #check that all sample names are present
print("sample ordering failed! Check that sample IDs match the VCF.")
Expand Down

0 comments on commit c76e3d1

Please sign in to comment.