Mercurial > repos > jjohnson > ensembl_variant_report
changeset 8:fd612f8119a2 draft
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/ensembl_variant_report commit f003aece24587f68b883449f278f1e601110e2ec-dirty
author | jjohnson |
---|---|
date | Tue, 17 Jul 2018 12:21:36 -0400 |
parents | d5cb252c68da |
children | 0ef485da6ba6 |
files | ensembl_variant_report.py ensembl_variant_report.xml |
diffstat | 2 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ensembl_variant_report.py Thu Jun 14 18:07:10 2018 -0400 +++ b/ensembl_variant_report.py Tue Jul 17 12:21:36 2018 -0400 @@ -96,7 +96,8 @@ dp = int(fields[di]) dpr = [int(x) for x in fields[fi].split(',')] for i,alt in enumerate(alts.split(',')): - freq = float(dpr[i+1])/float(sum(dpr)) if dpr else None + freq = float(dpr[i+1])/float(dp) if dp and dpr else \ + float(dpr[i+1])/float(sum(dpr)) if dpr else None yield (transcript,pos,ref,alt,dp,freq) def parse_snpeff_vcf(): @@ -131,7 +132,8 @@ (eff, effs) = effect.rstrip(')').split('(') (impact, functional_class, codon_change, aa_change, aa_len, gene_name, biotype, coding, transcript, exon, alt) = effs.split('|')[0:11] i = alt_list.index(alt) if alt in alt_list else 0 - freq = float(dpr[i+1])/float(sum(dpr)) if dpr else None + freq = float(dpr[i+1])/float(dp) if dp and dpr else \ + float(dpr[i+1])/float(sum(dpr)) if dpr else None yield (transcript,pos,ref,alt,dp,freq)
--- a/ensembl_variant_report.xml Thu Jun 14 18:07:10 2018 -0400 +++ b/ensembl_variant_report.xml Tue Jul 17 12:21:36 2018 -0400 @@ -94,7 +94,12 @@ </inputs> <outputs> - <data name="output" format="tabular" /> + <data name="output" format="tabular" > + <actions> + <action name="column_names" type="metadata" + default="Gene,Ref_location,Ref_seq,Var_seq,Frequency,DP,Ensemble_Gene_transcript,AA_pos,AA_var,Protein_len,Stop_Codon,Variant_Peptide,Transcipt_type"/> + </actions> + </data> </outputs> <tests> <test>