Skip to content

Commit

Permalink
Merge pull request #37 from msk-access/hotfix-no-fail-single-sample
Browse files Browse the repository at this point in the history
Hotfix no fail single sample
  • Loading branch information
murphycj2 authored Apr 9, 2021
2 parents 6f66a36 + 9d1ded5 commit cabf964
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion biometrics/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.6
0.2.7
17 changes: 7 additions & 10 deletions biometrics/genotype.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,22 +227,19 @@ def compare_samples(self, samples):

if self.no_db_compare:
if len(samples_input) <= 1:
logger.error("You need to specify 2 or more samples in order to compare genotypes.")
sys.exit(1)
logger.warning("You should specify 2 or more samples in order to compare genotypes.")
else:
if len(samples_input) <= 1 and len(samples_db) < 1:
logger.error("There are no samples in the database to compare with")
sys.exit(1)
logger.warning("You should specify 2 or more samples in order to compare genotypes.")

# compare all the input samples to each other

if sample_n_input > 1:
results = self._compare_sample_lists(
samples_input, samples_input, samples)
results = self._compare_sample_lists(
samples_input, samples_input, samples)

for i in range(len(results)):
results[i]['IsInputToDatabaseComparison'] = False
comparisons += results
for i in range(len(results)):
results[i]['IsInputToDatabaseComparison'] = False
comparisons += results

# for each input sample, compare with all the samples in the db

Expand Down

0 comments on commit cabf964

Please sign in to comment.