Skip to content

Commit

Permalink
Translation_Start_Site and Splice_Site mutations are now considered T…
Browse files Browse the repository at this point in the history
…RUNC

Now only raises a warning if a sample has no SNVs but has CNVs, and skips the sample.
This can occur if a sample has no coding or synonymous variants in a gene, or no variants
overlap the gene list provided by -l
  • Loading branch information
ckrushton committed Jun 16, 2022
1 parent 81f9029 commit 6d5c1cd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions generate_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,10 +692,9 @@ def generate_mut_flat(in_maf: str, seq_type: str, gene_ids: dict, out_mut_flat:
logging.info("Processing MAF file")

# Non-synonmymous mutation types:
non_syn = {"In_Frame_Del", "In_Frame_Ins", "Missense_Mutation", "Nonsense_Mutation",
"Nonstop_Mutation", "Splice_Site", "Translation_Start_Site"}
trunc_mut = {"Frame_Shift_Del", "Frame_Shift_Ins", "Nonsense_Mutation", "Nonstop_Mutation"}
synon_mut = {"Silent", "5'UTR", "5'UTR", "Intron"} # Use for the "Synon" mutation type
non_syn = {"In_Frame_Del", "In_Frame_Ins", "Missense_Mutation"}
trunc_mut = {"Frame_Shift_Del", "Frame_Shift_Ins", "Nonsense_Mutation", "Nonstop_Mutation", "Splice_Site", "Translation_Start_Site"}
synon_mut = {"Silent", "5'UTR", "5'Flank", "Intron", "3'UTR"} # Use for the "Synon" mutation type

# Which samples are we analyzing?
sample_list = SortedSet() # Used to ensure the output files are in somewhat sorted order
Expand Down Expand Up @@ -1234,7 +1233,8 @@ def generate_cnv_files(cnv_segs, gene_regions_bed, arm_regions, gene_ids, out_cn

for sample, cnvs in sample_cnvs.items():
if sample not in sample_ids:
raise AttributeError("Sample \'%s\' was provided in the input CNVs file, but no mutations were detected for this sample in the MAF file" % sample)
logging.warning("Sample \'%s\' was provided in the input CNVs file, but no SNVs were found. Skipping..." % sample)
continue
for chrom, chrom_info in arm_coods.items():

# For now, skip chromosome X and Y as those aren't supported?
Expand Down

0 comments on commit 6d5c1cd

Please sign in to comment.