Mercurial > repos > eduardo > mergegffs
comparison mergegffs.py @ 10:8d0c12c9241d draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mergegffs commit c9b4085466b82054831df7bb14a8ebe1fdc3e164-dirty
| author | eduardo |
|---|---|
| date | Sun, 09 Apr 2017 09:43:42 -0400 |
| parents | 79d6bb2e6a5d |
| children | 791fae70fa3c |
comparison
equal
deleted
inserted
replaced
| 9:79d6bb2e6a5d | 10:8d0c12c9241d |
|---|---|
| 21 parser.add_argument('-o','--output', required=True, help="output in gff format") | 21 parser.add_argument('-o','--output', required=True, help="output in gff format") |
| 22 args = parser.parse_args(argv) | 22 args = parser.parse_args(argv) |
| 23 | 23 |
| 24 | 24 |
| 25 db = gffutils.create_db(args.peptides, dbfn=args.database, force=True, keep_order=True,merge_strategy='merge', sort_attribute_values=True) | 25 db = gffutils.create_db(args.peptides, dbfn=args.database, force=True, keep_order=True,merge_strategy='merge', sort_attribute_values=True) |
| 26 if args.blastp == True: | 26 if args.blastp is not None: |
| 27 os.system("blast2genomegff.py -b "+args.blastp+" -g -d "+args.peptides+" -p blastp -t protein_match -T -x > blastp.gff") | 27 os.system("convert2gff.py -i "+args.blastp+" -g "+args.peptides+" -p blastp -t protein_match -T -x > blastp.gff") |
| 28 db=db.update(args.blastp) | 28 db=db.update("blastp.gff") |
| 29 if args.blastp == True: | 29 if args.signalP is not None: |
| 30 os.system("convert2gff.py -i "+args.signalP+" -g "+args.peptides+" -T -t signalP > signalp.gff") | 30 os.system("convert2gff.py -i "+args.signalP+" -g "+args.peptides+" -T -p signalP -t signalpep > signalp.gff") |
| 31 db=db.update(args.blastp) | 31 db=db.update("signalP.gff") |
| 32 if args.blastp == True: | 32 if args.tmhmm is not None: |
| 33 os.system("convert2gff.py -i "+args.tmhmm+" -g "+args.peptides+" -T -t tmhmm > tmhmm.gff") | 33 os.system("convert2gff.py -i "+args.tmhmm+" -g "+args.peptides+" -T -p tmhmm -t trans_helix > tmhmm.gff") |
| 34 db=db.update(args.blastp) | 34 db=db.update("tmhmm.gff") |
| 35 if args.blastp == True: | 35 if args.pfam is not None: |
| 36 os.system("pfam2gff.py -i "+args.pfam+" -g "+args.peptides+" -T > PFAM.gff") | 36 os.system("pfam2gff.py -i "+args.pfam+" -g "+args.peptides+" -T > PFAM.gff") |
| 37 db=db.update(args.blastp) | 37 db=db.update("PFAM.gff") |
| 38 | 38 |
| 39 with open(args.output, 'w') as fout: | 39 with open(args.output, 'w') as fout: |
| 40 for f in db.all_features(): | 40 for f in db.all_features(): |
| 41 fout.write(str(f) + '\n') | 41 fout.write(str(f) + '\n') |
| 42 if __name__ == "__main__": | 42 if __name__ == "__main__": |
