Mercurial > repos > eduardo > annotateviz
comparison annotateviz.py @ 3:3302f18f9e16 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/annotateviz commit 9bbaa3eacc76ff3bf2b6da313cc0d85705f15dd1-dirty
author | eduardo |
---|---|
date | Sat, 17 Jun 2017 15:10:53 -0400 |
parents | 7537482eed36 |
children | 92921dfea0b5 |
comparison
equal
deleted
inserted
replaced
2:31e855c95936 | 3:3302f18f9e16 |
---|---|
17 if not len(argv): | 17 if not len(argv): |
18 argv.append("-h") | 18 argv.append("-h") |
19 parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter, description=__doc__) | 19 parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter, description=__doc__) |
20 parser.add_argument('-d','--database', help="gffutils sqlite database") | 20 parser.add_argument('-d','--database', help="gffutils sqlite database") |
21 parser.add_argument('-j','--json', help="report in json format") | 21 parser.add_argument('-j','--json', help="report in json format") |
22 args = parser.parse_args(argv) | |
22 gffutils.constants.always_return_list = False | 23 gffutils.constants.always_return_list = False |
23 db = gffutils.interface.FeatureDB(args.database) | 24 db = gffutils.interface.FeatureDB(args.database) |
24 prediction_list = [] | 25 prediction_list = [] |
25 add_matches(db.features_of_type("protein_match"), prediction_list) | 26 add_matches(db.features_of_type("protein_match"), prediction_list) |
26 add_matches(db.features_of_type("signalpep"), prediction_list) | 27 add_matches(db.features_of_type("signalpep"), prediction_list) |
27 add_matches(db.features_of_type("trans_helix"), prediction_list) | 28 add_matches(db.features_of_type("trans_helix"), prediction_list) |
28 add_matches(db.features_of_type("PFAM"), prediction_list) | 29 add_matches(db.features_of_type("PFAM"), prediction_list) |
29 fout=open(args.json, 'w') | 30 fout=open(args.json, 'w') |
30 json.dump(prediction_list,fout) | 31 json.dump(prediction_list,fout) |
32 if __name__ == "__main__": | |
33 main(sys.argv[1:],sys.stdout) |