Skip to content

Commit

Permalink
put withdrawn samples in the alt allele table
Browse files Browse the repository at this point in the history
  • Loading branch information
RoriCremer committed May 12, 2022
1 parent 07bd11f commit af32fe8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/variantstore/wdl/extract/populate_alt_allele_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def populate_alt_allele_table(query_project, vet_table_name, fq_dataset, sa_key_
fq_sample_info = f"{fq_dataset}.sample_info"
query_with = f"""INSERT INTO `{fq_dataset}.alt_allele`
WITH
position1 as (select * from `{fq_vet_table}` WHERE call_GT IN ('0/1', '1/0', '1/1', '0|1', '1|0', '1|1', '0/2', '0|2','2/0', '2|0') AND sample_id NOT IN (SELECT sample_id from {fq_sample_info} WHERE withdrawn IS NOT NULL)),
position2 as (select * from `{fq_vet_table}` WHERE call_GT IN ('1/2', '1|2', '2/1', '2|1') AND sample_id NOT IN (SELECT sample_id from {fq_sample_info} WHERE withdrawn IS NOT NULL))"""
position1 as (select * from `{fq_vet_table}` WHERE call_GT IN ('0/1', '1/0', '1/1', '0|1', '1|0', '1|1', '0/2', '0|2','2/0', '2|0') AND sample_id NOT IN (SELECT sample_id from {fq_sample_info} )),
position2 as (select * from `{fq_vet_table}` WHERE call_GT IN ('1/2', '1|2', '2/1', '2|1') AND sample_id NOT IN (SELECT sample_id from {fq_sample_info} ))"""

sql = alt_allele_temp_function + query_with + alt_allele_positions
result = utils.execute_with_retry(client, f"into alt allele from {vet_table_name}", sql)
Expand Down

0 comments on commit af32fe8

Please sign in to comment.