Skip to content

Commit

Permalink
spark: add oskar_test correction #1
Browse files Browse the repository at this point in the history
  • Loading branch information
roldanx committed Jan 17, 2019
1 parent d6ea5b5 commit 8044aba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions oskar-spark/src/test/python/pyoskar_tests/test_oskar.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ def test_filter_study(self):
self.df.selectExpr("studies[0].files.fileId").show(10, False)

self.df.select(file_qual("studies", "platinum-genomes-vcf-NA12877_S1.genome.vcf.gz").alias("qual")).show(10)
self.df.selectExpr("fileQual(studies, 'platinum-genomes-vcf-NA12877_S1.genome.vcf.gz')").show(10)
self.df.selectExpr("file_qual(studies, 'platinum-genomes-vcf-NA12877_S1.genome.vcf.gz')").show(10)

def test_filter_annot(self):
self.df.withColumn("freqs", population_frequency_as_map("annotation")).where("freqs['1kG_phase3:ALL'] > 0").show(
10)
self.df.select(genes("annotation").alias("genes")).where("genes[0] is not null").show(10)
self.df.withColumn("freqs", population_frequency_as_map("annotation")).show(100)
# self.df.withColumn("freqs", population_frequency_as_map("annotation")).where("freqs['1kG_phase3:ALL'] > 0").show(
# 100)
self.df.withColumn("freqs", population_frequency_as_map("annotation")).where("freqs['1kG_phase3:ALL'] > 0").show(
100)


if __name__ == '__main__':
Expand Down

0 comments on commit 8044aba

Please sign in to comment.