Mercurial > repos > jjohnson > gffutils
changeset 1:8880c2e4b2ee draft
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/gffutils commit eeb6499c828d0a99b6a891ed88de690cc1b8aeed-dirty
author | jjohnson |
---|---|
date | Mon, 16 Apr 2018 18:14:30 -0400 |
parents | 8ba71aead5bc |
children | b956465b8893 |
files | create_gffdb.py create_gffdb.xml |
diffstat | 2 files changed, 38 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/create_gffdb.py Sun Apr 08 13:26:47 2018 -0400 +++ b/create_gffdb.py Mon Apr 16 18:14:30 2018 -0400 @@ -18,17 +18,37 @@ parser.add_argument( 'gff_sqlite', help="sqlite file") + parser.add_argument( + '--create_introns', + action='store_true', + help='') + parser.add_argument( + '--disable_infer_transcripts', + action='store_true', + help='') + parser.add_argument( + '--disable_infer_genes', + action='store_true', + help='') + parser.add_argument( + '-v', '--verbose', action='store_true', help='Verbose') args = parser.parse_args() - db = gffutils.create_db(args.input_gff, args.gff_sqlite) + db = gffutils.create_db( + args.input_gff, args.gff_sqlite, + disable_infer_transcripts=args.disable_infer_transcripts, + disable_infer_genes=args.disable_infer_genes) version = db.execute('SELECT version FROM meta').fetchone()[0] - print('version:%s' % version,file=sys.stdout) + print('version:%s' % version, file=sys.stdout) dialect = db.execute('SELECT dialect FROM meta').fetchone()[0] + if args.create_introns: + db.create_introns() info = json.loads(dialect) if 'fmt' in info: - print('format:%s' % info['fmt'],file=sys.stdout) - seqids = [r[0] for r in db.execute('SELECT distinct seqid FROM features').fetchall()] - print('seqids:%s' % ','.join(seqids),file=sys.stdout) + print('format:%s' % info['fmt'], file=sys.stdout) + seqids = [r[0] for r in + db.execute('SELECT distinct seqid FROM features').fetchall()] + print('seqids:%s' % ','.join(seqids), file=sys.stdout) if __name__ == "__main__":
--- a/create_gffdb.xml Sun Apr 08 13:26:47 2018 -0400 +++ b/create_gffdb.xml Mon Apr 16 18:14:30 2018 -0400 @@ -1,13 +1,21 @@ -<tool id="create_gffdb" name="Create GFF DB for GTF or GFF3" version="0.1.0"> - <description>gffutils sqlite db</description> +<tool id="create_gffdb" name="Create gffutils SQLite DB" version="0.1.0"> + <description>for GTF or GFF3</description> <requirements> <requirement type="package">gffutils</requirement> </requirements> <command detect_errors="exit_code"><![CDATA[ - python '$__tool_directory__/create_gffdb.py' '$input' '$output' + python '$__tool_directory__/create_gffdb.py' $create_introns '$input' '$output' ]]></command> <inputs> <param name="input" type="data" format="gtf,gff3" label="GTF or GFF3 Annotation"/> + <param name="create_introns" type="boolean" truevalue="--create_introns" falsevalue="" checked="false" + label="create intron features"/> + <param name="disable_infer_transcripts" type="boolean" truevalue="--disable_infer_transcripts" falsevalue="" checked="true" + label="disable_infer_transcripts (True for Ensmbl GTF)" + help="Can be more than 100 times slower if this is false"/> + <param name="disable_infer_genes" type="boolean" truevalue="--disable_infer_genes" falsevalue="" checked="true" + label="disable_infer_transcripts (True for Ensmbl GTF)" + help="Can be more than 100 times slower if this is false"/> </inputs> <outputs> <data name="output" format="sqlite" label="${tool.name} ${input.name}.sqlite" /> @@ -23,5 +31,7 @@ </test> </tests> <help><![CDATA[ +Creates a SQLite database for a GTF or GFF3 feature file. +http://daler.github.io/gffutils/index.html ]]></help> </tool>