galaxyproject / tools-iuc

Tool Shed repositories maintained by the Intergalactic Utilities Commission
https://galaxyproject.org/iuc
MIT License
161 stars 430 forks source link

HISAT2: error in option --rna-strandness with paired-end data #1455

Closed NCEichner closed 7 years ago

NCEichner commented 7 years ago

Hi IUC-Team! The current hisat2-wrapper doesn't check for paired-end input in the "Spliced alignment parameters"-section and can generate wrong output when the option --rna-strandness is used. According to the hisat2-manual the option "--rna-strandness" together with paired-end reads should be combined with the parameters FR or RF. But at the moment the commandline-output says e.g. "--rna-strandness F" (which is correct only for single-end inputs). This flaw causes wrong XS-tags for the second mates in the bam-output. So this tag currently cannot be used in strand-specific downstream analysis.

On our local galaxy-server I fixed this problem by adding some lines of code in the hisat2-macros.xml (see token "@strandedness_parameters@"): `

        #if str($spliced_options.rna_strandness).strip() != '':
               #if str($input_format.paired.paired_selector) == 'paired':
                     #if str($spliced_options.rna_strandness) == 'F':
                           --rna-strandness FR
                     #else:
                           --rna-strandness RF
                     #end if
               #else:
                     --rna-strandness $spliced_options.rna_strandness
               #end if
        #end if

` I think this is a little bit "quick-and-dirty"-programming. So maybe someone of you has a better solution, where the parameters are not mixed between distinct values and variables.

mblue9 commented 7 years ago

Hi @NCEichner,

I've submitted a PR with your suggested change here https://github.com/galaxyproject/tools-iuc/pull/1470 as it would be good to have this fixed. I don't have a better suggestion than yours but maybe someone else might.

Thanks for reporting this!

mblue9 commented 7 years ago

Hi @NCEichner this bug is fixed now in the newest version of HISAT2 from the toolshed here: https://toolshed.g2.bx.psu.edu/repository?repository_id=c864c7c00326f71d&changeset_revision=d5fe9aead222

nsoranzo commented 7 years ago

Fixed in #1470.