Skip to content

Commit

Permalink
Fixed cell output table size
Browse files Browse the repository at this point in the history
  • Loading branch information
victorskl committed Oct 7, 2022
1 parent 0349d23 commit 5825ab5
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions 07_querying_lakehouse.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -386,30 +386,30 @@
"name": "stdout",
"output_type": "stream",
"text": [
"+--------------------+---------+------+---------+-------+-------------+---------+--------+-----+------------------+-----+----------------------------+\n",
"| SequenceRunName|SubjectID|Gender|Phenotype|StudyID| DiseaseCode| SNOMED|SampleID|CHROM| REF| ALT|array_size(alternateAlleles)|\n",
"+--------------------+---------+------+---------+-------+-------------+---------+--------+-----+------------------+-----+----------------------------+\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| AT| [A]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| C| [T]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| A| [G]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| G| [A]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| G| [A]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| T| [C]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| T| [G]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| G| [A]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| C| [G]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| C| [T]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| T| [G]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| T| [C]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| T| [A]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| G| [A]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| G| [C]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| C| [T]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| A| [G]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| G| [A]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| G|[GAA]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9|AATGTGGGGCATACACAT| [A]| 1|\n",
"+--------------------+---------+------+---------+-------+-------------+---------+--------+-----+------------------+-----+----------------------------+\n",
"+--------------------+---------+------+---------+-------+-------------+---------+--------+-----+------------------+-----+-------+\n",
"| SequenceRunName|SubjectID|Gender|Phenotype|StudyID| DiseaseCode| SNOMED|SampleID|CHROM| REF| ALT|ALT_cnt|\n",
"+--------------------+---------+------+---------+-------+-------------+---------+--------+-----+------------------+-----+-------+\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| AT| [A]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| C| [T]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| A| [G]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| G| [A]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| G| [A]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| T| [C]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| T| [G]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| G| [A]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| C| [G]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| C| [T]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| T| [G]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| T| [C]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| T| [A]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| G| [A]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| G| [C]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| C| [T]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| A| [G]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| G| [A]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9| G|[GAA]| 1|\n",
"|221007_A00130_000...| SBJ00001|Female| normal|NA12878|MONDO:0007254|429740004| NA12878| chr9|AATGTGGGGCATACACAT| [A]| 1|\n",
"+--------------------+---------+------+---------+-------+-------------+---------+--------+-----+------------------+-----+-------+\n",
"only showing top 20 rows\n",
"\n"
]
Expand All @@ -418,7 +418,7 @@
"source": [
"spark.sql(\"select \\\n",
" m.SequenceRunName, m.SubjectID, m.Gender, m.Phenotype, m.StudyID, m.DiseaseCode, m.SNOMED, m.SampleID, \\\n",
" s.contigName as CHROM, s.referenceAllele as REF, s.alternateAlleles as ALT, array_size(s.alternateAlleles) \\\n",
" s.contigName as CHROM, s.referenceAllele as REF, s.alternateAlleles as ALT, array_size(s.alternateAlleles) as ALT_cnt \\\n",
"from metadata_table as m \\\n",
"join somatic_table as s on s.genotypes_sampleId = m.SampleID\").show()"
]
Expand Down

0 comments on commit 5825ab5

Please sign in to comment.