5 perl 哈希输出的问题

1.由于运行起来输出内容太多,导致红色的报错内容看不到,请问怎么才能只看每次运行的报错内容。

2.之前已经提取了需要的数据放入了“%motifID”,部分结构如下:

          'sequence_117' => {
                              'name' => 'Gohir.A01G185500.1_and_Gohir.D01G176300.1',
                              'motifs' => [
                                            {
                                              'No' => 2,
                                              'end' => 37,
                                              'sta' => 22
                                            },
                                            {
                                              'sta' => 48,
                                              'No' => 4,
                                              'end' => 56
                                            },
                                            {
                                              'sta' => 64,
                                              'end' => 87,
                                              'No' => 1
                                            },
                                            {
                                              'sta' => 114,
                                              'No' => 3,
                                              'end' => 129
                                            },
                                            {
                                              'No' => 9,
                                              'end' => 158,
                                              'sta' => 129
                                            }
                                          ],
                              'length' => '305'
                            },
          'sequence_48' => {
                             'length' => '237',
                             'motifs' => [
                                           {
                                             'sta' => 5,
                                             'No' => 2,
                                             'end' => 20
                                           },
                                           {
                                             'sta' => 30,
                                             'No' => 8,
                                             'end' => 66
                                           },
                                           {
                                             'No' => 1,
                                             'end' => 69,
                                             'sta' => 46
                                           },
                                           {
                                             'sta' => 96,
                                             'No' => 3,
                                             'end' => 111
                                           },
                                           {
                                             'sta' => 202,
                                             'No' => 15,
                                             'end' => 252
                                           }
                                         ],
                             'name' => 'Gohir.A03G186200.1_and_Gohir.D02G207000.1'
                           },
          'sequence_28' => {
                             'length' => '328',
                             'motifs' => [
                                           {
                                             'No' => 2,
                                             'end' => 37,
                                             'sta' => 22
                                           },
                                           {
                                             'end' => 83,
                                             'No' => 8,
                                             'sta' => 47
                                           },
                                           {
                                             'No' => 1,
                                             'end' => 86,
                                             'sta' => 63
                                           },
                                           {
                                             'sta' => 113,
                                             'No' => 3,
                                             'end' => 128
                                           }
                                         ],
                             'name' => 'Gohir.A02G108800.1_and_Gohir.D03G061800.1'
                           },
          'sequence_254' => {
                              'name' => 'AT5G40430.1_MYB22',
                              'motifs' => [
                                            {
                                              'sta' => 0,
                                              'No' => 15,
                                              'end' => 50
                                            },
                                            {
                                              'No' => 8,
                                              'end' => 110,
                                              'sta' => 74
                                            },
                                            {
                                              'No' => 1,
                                              'end' => 113,
                                              'sta' => 90
                                            },
                                            {
                                              'sta' => 140,
                                              'No' => 3,
                                              'end' => 155
                                            }
                                          ],
                              'length' => '256'
                            },
          'sequence_24' => {
                             'name' => 'Gohir.A02G141600.1_and_Gohir.D03G052100.1',
                             'motifs' => [
                                           {
                                             'No' => 5,
                                             'end' => 20,
                                             'sta' => 0
                                           },
                                           {
                                             'sta' => 12,
                                             'No' => 2,
                                             'end' => 27
                                           },
                                           {
                                             'sta' => 38,
                                             'No' => 4,
                                             'end' => 46
                                           },
                                           {
                                             'end' => 77,
                                             'No' => 1,
                                             'sta' => 54
                                           },
                                           {
                                             'sta' => 104,
                                             'No' => 3,
                                             'end' => 119
                                           },
                                           {
                                             'sta' => 119,
                                             'No' => 6,
                                             'end' => 154
                                           }
                                         ],
                             'length' => '337'
                           }
        };

‘motifs’是个列表还是数组我不太明白,其下有数量不同的项,怎么把‘motifs’里边的值全打印出来?最好是一条序列的内容都在一行里~~~

请先 登录 后评论

1 个回答

omicsgene - 生物信息
擅长:重测序,遗传进化,转录组,GWAS

可以学习一下  《perl 高级编程》  里面有详细说明

请先 登录 后评论
  • 1 关注
  • 0 收藏,3231 浏览
  • Gbolin 提出于 2018-11-30 14:54

相似问题