# HG changeset patch # User iuc # Date 1491343780 14400 # Node ID d210e1f185bdb949ef3d7941efc3e4851941f2b5 # Parent 98a60a4cfb9a27d16c3759a201e414aeae9eac3d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_hisat2_index_builder commit 8652f36a3a3838dca989426961561e81432acf4f diff -r 98a60a4cfb9a -r d210e1f185bd data_manager/hisat2_index_builder.py --- a/data_manager/hisat2_index_builder.py Mon Nov 23 09:41:52 2015 -0500 +++ b/data_manager/hisat2_index_builder.py Tue Apr 04 18:09:40 2017 -0400 @@ -1,14 +1,13 @@ #!/usr/bin/env python # Based heavily on the Bowtie 2 data manager wrapper script by Dan Blankenberg +from __future__ import print_function -import shlex -import sys -import os import argparse +import os +import shlex import subprocess - -from json import loads, dumps - +import sys +from json import dumps, loads DEFAULT_DATA_TABLE_NAME = "hisat2_indexes" @@ -41,7 +40,7 @@ proc = subprocess.Popen( args=args, shell=False, cwd=target_directory ) return_code = proc.wait() if return_code: - print >> sys.stderr, "Error building index." + print("Error building index.", file=sys.stderr) sys.exit( return_code ) data_table_entry = dict( value=sequence_id, dbkey=options.fasta_dbkey, name=sequence_name, path=sequence_id ) _add_data_table_entry( data_manager_dict, data_table_name, data_table_entry ) @@ -71,7 +70,7 @@ data_manager_dict = {} if options.fasta_dbkey in [ None, '', '?' ]: - raise Exception( '"%s" is not a valid dbkey. You must specify a valid dbkey.' % ( dbkey ) ) + raise Exception( '"%s" is not a valid dbkey. You must specify a valid dbkey.' % ( options.fasta_dbkey ) ) sequence_id, sequence_name = get_id_name( params, dbkey=options.fasta_dbkey, fasta_description=options.fasta_description ) @@ -79,7 +78,8 @@ build_hisat_index( data_manager_dict, options, params, sequence_id, sequence_name ) # save info to json file - open( filename, 'wb' ).write( dumps( data_manager_dict ) ) + open( filename, 'w' ).write( dumps( data_manager_dict ) ) + if __name__ == "__main__": main() diff -r 98a60a4cfb9a -r d210e1f185bd data_manager/hisat2_index_builder.xml --- a/data_manager/hisat2_index_builder.xml Mon Nov 23 09:41:52 2015 -0500 +++ b/data_manager/hisat2_index_builder.xml Tue Apr 04 18:09:40 2017 -0400 @@ -1,46 +1,44 @@ - + builder - hisat + hisat2 - - - - - splice_sites.txt && - python \$HISAT2_ROOT_DIR/bin/extract_exons.py gtf_file.gtf > exon.txt && - ls -lh && + ln -s '${advanced.gtf_input}' gtf_file.gtf && + hisat2_extract_splice_sites.py gtf_file.gtf > splice_sites.txt && + hisat2_extract_exons.py gtf_file.gtf > exon.txt && #end if #if $advanced.adv_param_select == 'yes' and $advanced.snps: - ln -s "${all_fasta_source.fields.path}" genome.fa && - ln -s "${advanced.snps}" snps.tabular && - python \$HISAT2_ROOT_DIR/bin/extract_snps.py --genome_file genome.fa --snp_file snps.tabular > snps.txt && + ln -s '${advanced.snps}' snps.tabular && + #if $advanced.snps.is_of_type('vcf') + hisat2_extract_snps_haplotypes_VCF.py '${all_fasta_source.fields.path}' snps.tabular extracted && + #else + hisat2_extract_snps_haplotypes_UCSC.py '${all_fasta_source.fields.path}' snps.tabular extracted && + #end if #end if - python $__tool_directory__/hisat2_index_builder.py --output "${out_file}" - --fasta_filename "${all_fasta_source.fields.path}" - --fasta_dbkey "${all_fasta_source.fields.dbkey}" - --fasta_description "${all_fasta_source.fields.name}" - --data_table_name "hisat2_indexes" + python '$__tool_directory__/hisat2_index_builder.py' --output '${out_file}' + --fasta_filename '${all_fasta_source.fields.path}' + --fasta_dbkey '${all_fasta_source.fields.dbkey}' + --fasta_description '${all_fasta_source.fields.name}' + --data_table_name hisat2_indexes + --indexer_options "-p \${GALAXY_SLOTS:-1} #if $advanced.adv_param_select == 'yes': - --indexer_options " --noauto - -p \${GALAXY_SLOTS:-1} - #if $snps: - --snps `pwd`/snps.txt + #if $advanced.snps: + --snps "`pwd`/extracted.snp" + --haplotype "`pwd`/extracted.haplotype" #end if #if $advanced.gtf_input: - --ss `pwd`/splice_sites.txt - --exon `pwd`/exon.txt + --ss "`pwd`/splice_sites.txt" + --exon "`pwd`/exon.txt" #end if --bmax $advanced.bmax --bmaxdivn $advanced.bmaxdivn --dcv $advanced.dcv --offrate $advanced.offrate - " #end if + " ]]> @@ -52,21 +50,21 @@ + - - - - - - + + + + + + - - - + + - + - +
value, dbkey, name, path
- +
value, dbkey, name, path
diff -r 98a60a4cfb9a -r d210e1f185bd tool_dependencies.xml --- a/tool_dependencies.xml Mon Nov 23 09:41:52 2015 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - -