Question: HISAT2 alignment problem
0
gravatar for kwanghoon
28 days ago by
kwanghoon0
kwanghoon0 wrote:

I have problems when I run hisat2. my command is

./hisat2 -x $HISAT2G/hisat2_hg38 -p 16 -1 /home/sunghyepark_lab/test/test_files/RNA/rawData/trimmed/trimmed_paired_1607370-RNA-T_1.fastq.gz -2 /home/sunghyepark_lab/test/test_files/RNA/rawData/trimmed/trimmed_paired_1607370-RNA-T_2.fastq.gz -S /home/sunghyepark_lab/test/test_files/RNA/rawData/HISAT2_aligned/1607370_RT.sam

used reference hg38 indexed by hisat2-build.

I got errors like

File "/home/sunghyepark_lab/packages/hisat-genotype-top/hisat2_read_statistics.py", line 182 length_map = sorted(length_map.iteritems(), key=lambda (k,v):(v,k), reverse=True) SyntaxError: invalid syntax

so I googled this error, and changed code "key=lambda (k,v):(v,k) to key=lambda k,v:(v,k)" no error message like above. But another error came out...

File "/home/sunghyepark_lab/packages/hisat-genotype-top/hisat2_read_statistics.py", line 183 print cnt, mn, mx, avg, ",".join([str(k) for (k,v) in length_map]) SyntaxError: invalid syntax

help me please..

Let me know if any other informations are needed to solve this problem

hisat2 rna-seq • 184 views
ADD COMMENTlink modified 5 days ago by geneticatt0 • written 28 days ago by kwanghoon0

Output of python --version?

ADD REPLYlink written 28 days ago by ATpoint34k

version is python --version Python 3.7.6

ADD REPLYlink written 25 days ago by kwanghoon0

I'm getting the same error when running hisat2 (also as a batch submission script). I don't have permissions to edit the script on our cluster. For the case that it does need to be fixed, is there a way to copy the script and provide its location in the batch script so that hisat is provided the alternative (edited) script when hisat2_read_statistics.py is called?

I have a feeling that fixing the script is not necessary because the read mapping seems to be taking place anyways:

File "/isg/shared/apps/hisat2/2.2.0/hisat2_read_statistics.py", line 182
    length_map = sorted(length_map.iteritems(), key=lambda (k,v):(v,k), reverse=True)
                                                           ^
    SyntaxError: invalid syntax
    10070864 reads; of these:
      10070864 (100.00%) were paired; of these:
        831566 (8.26%) aligned concordantly 0 times
        8512855 (84.53%) aligned concordantly exactly 1 time
        726443 (7.21%) aligned concordantly >1 times
        ----
        831566 pairs aligned concordantly 0 times; of these:
          26687 (3.21%) aligned discordantly 1 time
        ----
        804879 pairs aligned 0 times concordantly or discordantly; of these:
          1609758 mates make up the pairs; of these:
            1008340 (62.64%) aligned 0 times
            465483 (28.92%) aligned exactly 1 time
            135935 (8.44%) aligned >1 times
    94.99% overall alignment rate

I imagine it's poor practice to let a module of your program break and continue to run it anyways, so ideas for solutions would be greatly appreciated. I have contacted the admins requesting that they edit the script, but this process usually takes a week or so, which is time I can't spare for this analysis.

ADD REPLYlink modified 5 days ago • written 5 days ago by geneticatt0
1

Just get your own version of the tool using a package manager like miniconda that does not require root permission.

ADD REPLYlink written 5 days ago by ATpoint34k
2
gravatar for ATpoint
25 days ago by
ATpoint34k
Germany
ATpoint34k wrote:

Yeah, this seems to be a problem related to python3 whereas the script expects python2.

You can probably solve this by modifying the header of that script hisat2_read_statistics.py to:

#!/usr/bin/env python2

as this makes it explicit that python2 is to be used.

ADD COMMENTlink modified 25 days ago • written 25 days ago by ATpoint34k

Use of uninitialized value $read_len_str in string ne at ./hisat2 line 293.

86563369 reads; of these:

86563369 (100.00%) were paired; of these:

1516202 (1.75%) aligned concordantly 0 times
55773439 (64.43%) aligned concordantly exactly 1 time
29273728 (33.82%) aligned concordantly >1 times
----
1516202 pairs aligned concordantly 0 times; of these:
  135333 (8.93%) aligned discordantly 1 time
----
1380869 pairs aligned 0 times concordantly or discordantly; of these:
  2761738 mates make up the pairs; of these:
    1048277 (37.96%) aligned 0 times
    1011554 (36.63%) aligned exactly 1 time
    701907 (25.42%) aligned >1 times
  

99.39% overall alignment rate

I think it worked! Thank you

But I don't know what Use of uninitialized value $read_len_str in string ne at ./hisat2 line 293. means

Is this not the big problem?

ADD REPLYlink modified 25 days ago • written 25 days ago by kwanghoon0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1376 users visited in the last hour