# HG changeset patch # User lparsons # Date 1434996857 14400 # Node ID 8bc865a85024a3da5a46bb6ac40d30e324aa8a6e # Parent 737cda668bdd550b560c1120bd7e15ca97102670 planemo upload for repository https://github.com/lparsons/galaxy_tools/tree/master/tools/htseq_count commit e53f827acbedaec2da3a44488fb6628c9e922055 diff -r 737cda668bdd -r 8bc865a85024 fabfile.py --- a/fabfile.py Mon Jun 22 12:42:30 2015 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -from fabric.api import local -from fabric.operations import prompt -import os - - -def package(): - ''' - Pacakge for upload to toolshed - packaging 'test' version (default) uses local directory - otherwise, specify a mercurial tag to package - ''' - package_dir = 'package' - base_filename = os.path.join(package_dir, 'htseq-count') - version = prompt("Enter version number for package [test]:") - revision_option = '' - if version != '': - revision_option = '-r "%s"' % version - else: - version = 'test' - version_filename = '%s_%s.tar.gz' % (base_filename, version) - local('mkdir -p %s' % package_dir) - local('rm -f %s' % version_filename) - if version == 'test': - local('tar czvf %s --exclude "fabfile.*" --exclude "%s" --exclude ".hg*" --exclude ".DS_Store" --exclude "*.pyc" --exclude "*.swp" *' % (version_filename, package_dir)) - else: - local('hg archive -t tgz %s -X "fabfile.*" -X "package" -X ".hg*" -p . "%s"' % (revision_option, version_filename)) diff -r 737cda668bdd -r 8bc865a85024 htseq-count.xml --- a/htseq-count.xml Mon Jun 22 12:42:30 2015 -0400 +++ b/htseq-count.xml Mon Jun 22 14:14:17 2015 -0400 @@ -13,25 +13,30 @@ - + htseq-count -h | grep version | sed 's/^\(.*\)*\(version .*\)\./\2/' - + &1 || echo "Error running samtools faidx for htseq-count" >&2 && #else: #set $reference_fasta_filename = str( $samout_conditional.reference_source.ref_file.fields.path ) #end if #end if + #if $force_sort: + #if $samfile.extension == 'bam': + samtools sort -n $samfile "name_sorted_alignment" && + #else + samtools view -Su -t ${reference_fasta_filename}.fai $samfile | samtools sort -n - "name_sorted_alignment" && + #end if + #end if htseq-count - --format=$samfile.extension - --order=pos --mode=$mode --stranded=$stranded --minaqual=$minaqual @@ -40,12 +45,22 @@ #if $samout_conditional.samout: --samout=$__new_file_path__/${samoutfile.id}_tmp #end if - $samfile + #if $force_sort: + --order=name + --format=bam + name_sorted_alignment.bam + #else + --order=pos + --format=$samfile.extension + $samfile + #end if $gfffile - | awk '{if ($1 ~ "no_feature|ambiguous|too_low_aQual|not_aligned|alignment_not_unique") print $0 | "cat 1>&2"; else print $0}' > $counts 2>$othercounts + | awk '{if ($1 ~ "no_feature|ambiguous|too_low_aQual|not_aligned|alignment_not_unique") print $0 | "cat 1>&2"; else print $0}' > $counts 2>$othercounts #if $samout_conditional.samout: - && samtools view -Su -t ${reference_fasta_filename}.fai $__new_file_path__/${samoutfile.id}_tmp | samtools sort -o - sorted > $samoutfile - #end if + && samtools view -Su -t ${reference_fasta_filename}.fai $__new_file_path__/${samoutfile.id}_tmp | samtools sort -o - sorted > $samoutfile + #end if + ]]> + @@ -69,7 +84,7 @@ Feature type (3rd column in GFF file) to be used. All features of other types are ignored. The default, suitable for RNA-Seq and Ensembl GTF files, is exon. - GFF attribute to be used as feature ID. Several GFF lines with the same feature ID will be considered as parts of the same feature. The feature ID is used to identity the counts in the output table. All features of the specified type MUST have a value for this attribute. The default, suitable for RNA-SEq and Ensembl GTF files, is gene_id. + GFF attribute to be used as feature ID. Several GFF lines with the same feature ID will be considered as parts of the same feature. The feature ID is used to identity the counts in the output table. All features of the specified type MUST have a value for this attribute. The default, suitable for RNA-Seq and Ensembl GTF files, is gene_id. @@ -95,6 +110,9 @@ + + This option can be used for for paired-end data that has many unmapped mates. Use this if you get the warning about paired end data missing or not being properly sorted. + @@ -114,6 +132,14 @@ + + + + + + + + @@ -128,6 +154,16 @@ + + + + + + + + + +