Skip to content

Commit

Permalink
update to message print
Browse files Browse the repository at this point in the history
  • Loading branch information
zwdzwd committed Apr 7, 2016
1 parent a647984 commit e656597
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 3 deletions.
File renamed without changes.
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
description-file = README.md
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ def main():
name = "TransVar",
version = __version__,
description = "Transcript-based Variant annotator",
url = "https://bitbucket.org/wanding/transvar",
url = "https://github.com/zwdzwd/transvar",
download_url = "https://github.com/zwdzwd/transvar/releases/latest",
author = "Wanding Zhou",
author_email = "[email protected]",
license = "MIT",
Expand Down
4 changes: 4 additions & 0 deletions test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ transvar canno -l data/cosmic/cosmic_canno_snv -g 1 -m 3 --ccds | tee testout/ca
transvar canno -l data/cosmic/cosmic_canno_deletion -g 1 -m 3 --ccds | tee testout/canno_cosmic_deletion

transvar canno -l data/cosmic/cosmic_canno_insertion -g 1 -m 3 --ccds | tee testout/canno_cosmic_insertion
colordiff testout/canno_cosmic_insertion golden/canno_cosmic_insertion

transvar panno -l data/tamborero_data/transvar_revprotein_input.txt_ens --ensembl --seqmax -1 | tee testout/panno_tamborero
colordiff testout/panno_tamborero golden/panno_tamborero

transvar ganno --vcf data/tamborero_data/docm_variants_mar_2016.vcf --ensembl | tee testout/ganno_tamborero.vcf
colordiff testout/ganno_tamborero.vcf
2 changes: 1 addition & 1 deletion transvar/err.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def err_die(msg):

def err_warn(msg):
fn = inspect.stack()[1][3]
sys.stderr.write('[%s] warning: %s\n' % (fn, msg))
sys.stderr.write('\r[%s] warning: %s\n' % (fn, msg))

def err_raise(cls, msg):
fn = inspect.stack()[1][3]
Expand Down
2 changes: 2 additions & 0 deletions transvar/mutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,8 @@ def vcf_parse_mutation(args, at='g'):

yield q, line

sys.stderr.write("\nProcessed %d records\033[K\n" % nrec)

def list_parse_mutation(args, muttype):

indices = parse_indices(args.o)
Expand Down
4 changes: 3 additions & 1 deletion transvar/snv.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def annotate_snv_cdna(args, q, tpts, db):

found = False
rs = []
gene_name = ""
for t in tpts:
try:
if q.tpt and t.name != q.tpt:
Expand All @@ -53,6 +54,7 @@ def annotate_snv_cdna(args, q, tpts, db):
r.chrm = t.chrm
r.tname = t.format()
r.gene = t.gene_name
gene_name = t.gene_name
r.strand = t.strand

r.gnuc_pos = t.tnuc2gnuc(q.pos)
Expand Down Expand Up @@ -109,7 +111,7 @@ def annotate_snv_cdna(args, q, tpts, db):
format_all(rs, q, args)

if not found:
wrap_exception(Exception('no_valid_transcript_found_(from_%s_candidates)' % len(tpts)), q, args)
wrap_exception(Exception('no_valid_transcript_found_(from_%s_candidates)_%s' % (len(tpts),gene_name)), q, args)

return

Expand Down

0 comments on commit e656597

Please sign in to comment.