comparison snpEff_cds_report.py @ 6:a64ef0611117

Change field header from "Penetrance" to "Prevalence"
author Jim Johnson <jj@umn.edu>
date Thu, 13 Jun 2013 11:37:34 -0500
parents 85b933b7d231
children fbb6510186df
comparison
equal deleted inserted replaced
5:85b933b7d231 6:a64ef0611117
286 """ 286 """
287 Effect ( Effect_Impact | Functional_Class | Codon_Change | Amino_Acid_change| Amino_Acid_length | Gene_Name | Gene_BioType | Coding | Transcript | Exon [ | ERRORS | WARNINGS ] ) 287 Effect ( Effect_Impact | Functional_Class | Codon_Change | Amino_Acid_change| Amino_Acid_length | Gene_Name | Gene_BioType | Coding | Transcript | Exon [ | ERRORS | WARNINGS ] )
288 FRAME_SHIFT(HIGH||||745|CHUK|protein_coding|CODING|ENST00000370397|exon_10_101964263_101964414) 288 FRAME_SHIFT(HIGH||||745|CHUK|protein_coding|CODING|ENST00000370397|exon_10_101964263_101964414)
289 """ 289 """
290 class SnpEffect( object ): 290 class SnpEffect( object ):
291 report_headings = ['Gene','Variant Position','Reference','Variation','Penetrance','Sequencing Depth','Transcript','AA Position','AA change','AA Length','Stop Codon','Stop Region','AA Variation'] 291 report_headings = ['Gene','Variant Position','Reference','Variation','Prevalence','Sequencing Depth','Transcript','AA Position','AA change','AA Length','Stop Codon','Stop Region','AA Variation']
292 def __init__(self,chrom,pos,ref,alt,freq,depth,effect = None, snpEffVersion = None, biomart_host = None, filter_ccds = False): 292 def __init__(self,chrom,pos,ref,alt,freq,depth,effect = None, snpEffVersion = None, biomart_host = None, filter_ccds = False):
293 self.chrom = chrom 293 self.chrom = chrom
294 self.pos = int(pos) 294 self.pos = int(pos)
295 self.ref = ref 295 self.ref = ref
296 self.alt = alt 296 self.alt = alt
499 """ 499 """
500 def printReportHtml(output_file, detail_dir, snpEffects): 500 def printReportHtml(output_file, detail_dir, snpEffects):
501 if output_file: 501 if output_file:
502 print >> output_file, '<HTML><BODY>\n' 502 print >> output_file, '<HTML><BODY>\n'
503 print >> output_file, '<TABLE BORDER="1">\n' 503 print >> output_file, '<TABLE BORDER="1">\n'
504 print >> output_file, '<TR align="LEFT"><TH>Gene</TH><TH>Variant Position</TH><TH>Reference</TH><TH>Variation</TH><TH>Penetrance</TH><TH>Sequencing Depth</TH><TH>Transcript Details</TH><TH>AA Position</TH><TH>AA Change</TH><TH>AA Length</TH> <TH>Stop Codon</TH><TH>AA Variation</TH></TR>\n' 504 print >> output_file, '<TR align="LEFT"><TH>Gene</TH><TH>Variant Position</TH><TH>Reference</TH><TH>Variation</TH><TH>Prevalence</TH><TH>Sequencing Depth</TH><TH>Transcript Details</TH><TH>AA Position</TH><TH>AA Change</TH><TH>AA Length</TH> <TH>Stop Codon</TH><TH>AA Variation</TH></TR>\n'
505 for snpEffect in snpEffects: 505 for snpEffect in snpEffects:
506 (gene_name,chrpos,cds_ref,cds_alt,freq,depth,transcript_name,alt_aa_pos,aa_change,aa_len,stop_codon,stop_region,novel_peptide) = snpEffect.getReportFields() 506 (gene_name,chrpos,cds_ref,cds_alt,freq,depth,transcript_name,alt_aa_pos,aa_change,aa_len,stop_codon,stop_region,novel_peptide) = snpEffect.getReportFields()
507 refname = '_'.join([snpEffect.transcript,str(snpEffect.pos),snpEffect.ref,snpEffect.alt]) + '.html' 507 refname = '_'.join([snpEffect.transcript,str(snpEffect.pos),snpEffect.ref,snpEffect.alt]) + '.html'
508 aa_ref = '#'.join([refname,aa_anchor]) 508 aa_ref = '#'.join([refname,aa_anchor])
509 refpath = os.path.join(detail_dir,refname) 509 refpath = os.path.join(detail_dir,refname)