我有一个perl脚本,它从输入文本文件中获取一些字段并转换它们以生成更有用的(对我来说)文本文件。
当我在我的Mac上运行它(由一个非常小的文件由真实文件中的几行组成)时,它会产生正确的输出。它产生一些警告,粘贴在下面,然而,输出是好的。
当我在我所在机构的服务器上运行这个完全相同的脚本时,它会返回更多“使用未初始化的值”警告,虽然它创建了一个输出文件,但它的内容却完全相同,一行一行,如同输入文件。我也尝试使用我在计算机上测试的小文件。
我觉得这与perl的版本有关吗?我不是管理员,所以我该怎么办呢?
服务器上返回警告:
Use of uninitialized value $Read_Cigar in pattern match (m//) at ../perl/R2_Warrior.pl line 48, <R2_FILE> line 1.
Use of uninitialized value $Clipped in substr at ../perl/R2_Warrior.pl line 53, <R2_FILE> line 1.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 53, <R2_FILE> line 1.
Use of uninitialized value $Read_Cigar in pattern match (m//) at ../perl/R2_Warrior.pl line 59, <R2_FILE> line 1.
Use of uninitialized value $Matched in negation (-) at ../perl/R2_Warrior.pl line 64, <R2_FILE> line 1.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 64, <R2_FILE> line 1.
Use of uninitialized value $Read_Info in pattern match (m//) at ../perl/R2_Warrior.pl line 73, <R2_FILE> line 1.
Use of uninitialized value $X2 in substr at ../perl/R2_Warrior.pl line 91, <R2_FILE> line 1.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 91, <R2_FILE> line 1.
Use of uninitialized value $X2 in addition (+) at ../perl/R2_Warrior.pl line 97, <R2_FILE> line 1.
Use of uninitialized value $Matched in addition (+) at ../perl/R2_Warrior.pl line 97, <R2_FILE> line 1.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 1.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 1.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 1.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 1.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 1.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 1.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 1.
Use of uninitialized value $Read_Cigar in pattern match (m//) at ../perl/R2_Warrior.pl line 48, <R2_FILE> line 2.
Use of uninitialized value $Clipped in substr at ../perl/R2_Warrior.pl line 53, <R2_FILE> line 2.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 53, <R2_FILE> line 2.
Use of uninitialized value $Read_Cigar in pattern match (m//) at ../perl/R2_Warrior.pl line 59, <R2_FILE> line 2.
Use of uninitialized value $Matched in negation (-) at ../perl/R2_Warrior.pl line 64, <R2_FILE> line 2.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 64, <R2_FILE> line 2.
Use of uninitialized value $Read_Info in pattern match (m//) at ../perl/R2_Warrior.pl line 73, <R2_FILE> line 2.
Use of uninitialized value $X2 in substr at ../perl/R2_Warrior.pl line 91, <R2_FILE> line 2.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 91, <R2_FILE> line 2.
Use of uninitialized value $X2 in addition (+) at ../perl/R2_Warrior.pl line 97, <R2_FILE> line 2.
Use of uninitialized value $Matched in addition (+) at ../perl/R2_Warrior.pl line 97, <R2_FILE> line 2.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 2.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 2.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 2.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 2.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 2.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 2.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 2.
Use of uninitialized value $Read_Cigar in pattern match (m//) at ../perl/R2_Warrior.pl line 48, <R2_FILE> line 3.
Use of uninitialized value $Clipped in substr at ../perl/R2_Warrior.pl line 53, <R2_FILE> line 3.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 53, <R2_FILE> line 3.
Use of uninitialized value $Read_Cigar in pattern match (m//) at ../perl/R2_Warrior.pl line 59, <R2_FILE> line 3.
Use of uninitialized value $Matched in negation (-) at ../perl/R2_Warrior.pl line 64, <R2_FILE> line 3.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 64, <R2_FILE> line 3.
Use of uninitialized value $Read_Info in pattern match (m//) at ../perl/R2_Warrior.pl line 73, <R2_FILE> line 3.
Use of uninitialized value $X2 in substr at ../perl/R2_Warrior.pl line 91, <R2_FILE> line 3.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 91, <R2_FILE> line 3.
Use of uninitialized value $X2 in addition (+) at ../perl/R2_Warrior.pl line 97, <R2_FILE> line 3.
Use of uninitialized value $Matched in addition (+) at ../perl/R2_Warrior.pl line 97, <R2_FILE> line 3.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 3.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 3.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 3.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 3.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 3.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 3.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 3.
Use of uninitialized value $Read_Cigar in pattern match (m//) at ../perl/R2_Warrior.pl line 48, <R2_FILE> line 4.
Use of uninitialized value $Clipped in substr at ../perl/R2_Warrior.pl line 53, <R2_FILE> line 4.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 53, <R2_FILE> line 4.
Use of uninitialized value $Read_Cigar in pattern match (m//) at ../perl/R2_Warrior.pl line 59, <R2_FILE> line 4.
Use of uninitialized value $Matched in negation (-) at ../perl/R2_Warrior.pl line 64, <R2_FILE> line 4.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 64, <R2_FILE> line 4.
Use of uninitialized value $Read_Info in pattern match (m//) at ../perl/R2_Warrior.pl line 73, <R2_FILE> line 4.
Use of uninitialized value $X2 in substr at ../perl/R2_Warrior.pl line 91, <R2_FILE> line 4.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 91, <R2_FILE> line 4.
Use of uninitialized value $X2 in addition (+) at ../perl/R2_Warrior.pl line 97, <R2_FILE> line 4.
Use of uninitialized value $Matched in addition (+) at ../perl/R2_Warrior.pl line 97, <R2_FILE> line 4.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 4.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 4.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 4.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 4.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 4.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 4.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 4.
Use of uninitialized value $Read_Cigar in pattern match (m//) at ../perl/R2_Warrior.pl line 48, <R2_FILE> line 5.
Use of uninitialized value $Clipped in substr at ../perl/R2_Warrior.pl line 53, <R2_FILE> line 5.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 53, <R2_FILE> line 5.
Use of uninitialized value $Read_Cigar in pattern match (m//) at ../perl/R2_Warrior.pl line 59, <R2_FILE> line 5.
Use of uninitialized value $Matched in negation (-) at ../perl/R2_Warrior.pl line 64, <R2_FILE> line 5.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 64, <R2_FILE> line 5.
Use of uninitialized value $Read_Info in pattern match (m//) at ../perl/R2_Warrior.pl line 73, <R2_FILE> line 5.
Use of uninitialized value $X2 in substr at ../perl/R2_Warrior.pl line 91, <R2_FILE> line 5.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 91, <R2_FILE> line 5.
Use of uninitialized value $X2 in addition (+) at ../perl/R2_Warrior.pl line 97, <R2_FILE> line 5.
Use of uninitialized value $Matched in addition (+) at ../perl/R2_Warrior.pl line 97, <R2_FILE> line 5.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 5.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 5.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 5.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 5.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 5.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 5.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 5.
Use of uninitialized value $Read_Cigar in pattern match (m//) at ../perl/R2_Warrior.pl line 48, <R2_FILE> line 6.
Use of uninitialized value $Clipped in substr at ../perl/R2_Warrior.pl line 53, <R2_FILE> line 6.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 53, <R2_FILE> line 6.
Use of uninitialized value $Read_Cigar in pattern match (m//) at ../perl/R2_Warrior.pl line 59, <R2_FILE> line 6.
Use of uninitialized value $Matched in negation (-) at ../perl/R2_Warrior.pl line 64, <R2_FILE> line 6.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 64, <R2_FILE> line 6.
Use of uninitialized value $Read_Info in pattern match (m//) at ../perl/R2_Warrior.pl line 73, <R2_FILE> line 6.
Use of uninitialized value $X2 in substr at ../perl/R2_Warrior.pl line 91, <R2_FILE> line 6.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 91, <R2_FILE> line 6.
Use of uninitialized value $X2 in addition (+) at ../perl/R2_Warrior.pl line 97, <R2_FILE> line 6.
Use of uninitialized value $Matched in addition (+) at ../perl/R2_Warrior.pl line 97, <R2_FILE> line 6.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 6.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 6.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 6.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 6.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 6.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 6.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 6.
Use of uninitialized value $Read_Cigar in pattern match (m//) at ../perl/R2_Warrior.pl line 48, <R2_FILE> line 7.
Use of uninitialized value $Clipped in substr at ../perl/R2_Warrior.pl line 53, <R2_FILE> line 7.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 53, <R2_FILE> line 7.
Use of uninitialized value $Read_Cigar in pattern match (m//) at ../perl/R2_Warrior.pl line 59, <R2_FILE> line 7.
Use of uninitialized value $Matched in negation (-) at ../perl/R2_Warrior.pl line 64, <R2_FILE> line 7.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 64, <R2_FILE> line 7.
Use of uninitialized value $Read_Info in pattern match (m//) at ../perl/R2_Warrior.pl line 73, <R2_FILE> line 7.
Use of uninitialized value $X2 in substr at ../perl/R2_Warrior.pl line 91, <R2_FILE> line 7.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 91, <R2_FILE> line 7.
Use of uninitialized value $X2 in addition (+) at ../perl/R2_Warrior.pl line 97, <R2_FILE> line 7.
Use of uninitialized value $Matched in addition (+) at ../perl/R2_Warrior.pl line 97, <R2_FILE> line 7.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 7.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 7.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 7.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 7.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 7.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 7.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 7.
Use of uninitialized value $Read_Cigar in pattern match (m//) at ../perl/R2_Warrior.pl line 48, <R2_FILE> line 8.
Use of uninitialized value $Clipped in substr at ../perl/R2_Warrior.pl line 53, <R2_FILE> line 8.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 53, <R2_FILE> line 8.
Use of uninitialized value $Read_Cigar in pattern match (m//) at ../perl/R2_Warrior.pl line 59, <R2_FILE> line 8.
Use of uninitialized value $Matched in negation (-) at ../perl/R2_Warrior.pl line 64, <R2_FILE> line 8.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 64, <R2_FILE> line 8.
Use of uninitialized value $Read_Info in pattern match (m//) at ../perl/R2_Warrior.pl line 73, <R2_FILE> line 8.
Use of uninitialized value $X2 in substr at ../perl/R2_Warrior.pl line 91, <R2_FILE> line 8.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 91, <R2_FILE> line 8.
Use of uninitialized value $X2 in addition (+) at ../perl/R2_Warrior.pl line 97, <R2_FILE> line 8.
Use of uninitialized value $Matched in addition (+) at ../perl/R2_Warrior.pl line 97, <R2_FILE> line 8.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 8.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 8.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 8.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 8.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 8.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 8.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 8.
Use of uninitialized value $Read_Cigar in pattern match (m//) at ../perl/R2_Warrior.pl line 48, <R2_FILE> line 9.
Use of uninitialized value $Clipped in substr at ../perl/R2_Warrior.pl line 53, <R2_FILE> line 9.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 53, <R2_FILE> line 9.
Use of uninitialized value $Read_Cigar in pattern match (m//) at ../perl/R2_Warrior.pl line 59, <R2_FILE> line 9.
Use of uninitialized value $Matched in negation (-) at ../perl/R2_Warrior.pl line 64, <R2_FILE> line 9.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 64, <R2_FILE> line 9.
Use of uninitialized value $Read_Info in pattern match (m//) at ../perl/R2_Warrior.pl line 73, <R2_FILE> line 9.
Use of uninitialized value $X2 in substr at ../perl/R2_Warrior.pl line 91, <R2_FILE> line 9.
Use of uninitialized value $Read_Seq in substr at ../perl/R2_Warrior.pl line 91, <R2_FILE> line 9.
Use of uninitialized value $X2 in addition (+) at ../perl/R2_Warrior.pl line 97, <R2_FILE> line 9.
Use of uninitialized value $Matched in addition (+) at ../perl/R2_Warrior.pl line 97, <R2_FILE> line 9.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 9.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 9.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 9.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 9.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 9.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 9.
Use of uninitialized value in concatenation (.) or string at ../perl/R2_Warrior.pl line 104, <R2_FILE> line 9.
脚本:
use strict;
use warnings;
my ($Line) = "";
my (@Split_Line) = ();
my (%All_read_and_info_HASH) = ();
open(R2_FILE,"R2_Sample.txt") || die "Sorry I couldn't open the INPUT file: $!\n";
open(OUTPUT, ">R2_Output.txt") || die "Sorry I couldnt create the OUTPUT file: $!\n";
while(<R2_FILE>){
### Elimina los \n
### Parte cada linea por tabuladores
chomp;
$Line = $_;
@Split_Line = split(/\t+/, $Line);
### Guarda los campos de donde se obtiene el resto de la informacion
my $Read_Name = $Split_Line[0];
my $Read_ID = $Split_Line[3];
my $Read_Cigar = $Split_Line[5];
my $Read_Seq = $Split_Line[9];
my $Read_Info = $Split_Line[14];
#print "$Read_Name\t$Read_Cigar\t$Read_Seq\t$Read_Info\n";
#<STDIN>;
##########################################################
### Llena el hash de hashes ###
### Key = $Read_Name ###
### La segunda llave, i.e. 'Sequence' son cada uno de ###
### los campos del 0 al 8 del PDF ###
##########################################################
my($Clipped, $Matched, $X1, $X2, $Temporal_Seq);
### [0]: Guarda la secuencia del read
$All_read_and_info_HASH{$Read_Name}{'Sequence'} = $Read_Seq;
### [1]: Guarda el numero de nt 'clipeados'
if ($Read_Cigar =~ /(\d+)S\d+M/){ $Clipped = $1; }
$All_read_and_info_HASH{$Read_Name}{'Clipped_Nt'} = $Clipped;
### [2]: Guarda los primeros N nt de la secuencia completa del read
$Temporal_Seq = substr($Read_Seq, 0, $Clipped);
$All_read_and_info_HASH{$Read_Name}{'Non_R2_Sequence'} = $Temporal_Seq;
$Temporal_Seq = "";
### [3]: Guarda el numero de nt matcheados a R2
if ($Read_Cigar =~ /\d+S(\d+)M/){ $Matched = $1; }
$All_read_and_info_HASH{$Read_Name}{'R2_Matched_Nt'} = $Matched;
### [4]: Guarda los ultimos N nt de la secuencia completa del read (Las bases matcheadas a R2)
$Temporal_Seq = substr($Read_Seq, -$Matched);
$All_read_and_info_HASH{$Read_Name}{'R2_Matched_Sequence'} = $Temporal_Seq;
$Temporal_Seq = "";
### [5]: Guarda el CIGAR string
$All_read_and_info_HASH{$Read_Name}{'CIGAR'} = $Read_Cigar;
if ($Read_Info =~ /\+(\d+),(\d+)M/){
$X1 = $1;
$X2 = $2;
#print "$X1\t$X2\n";
#<STDIN>;
}
### [6]: Guarda el numero X1
$All_read_and_info_HASH{$Read_Name}{'28s_Start'} = $X1;
### [7]: Guarda el numero X2
$All_read_and_info_HASH{$Read_Name}{'28s_Matched_NT'} = $X2;
### [8]: Guarda los primeros X2 nt de la secuencia completa del read
$Temporal_Seq = substr($Read_Seq, 0, $X2);
$All_read_and_info_HASH{$Read_Name}{'28s_Matched_Sequence'} = $Temporal_Seq;
$Temporal_Seq = "";
### [9]: Calcula 144-([3] + [7])
$All_read_and_info_HASH{$Read_Name}{'Result'} = (144 - ($Matched + $X2));
### [10]: Guarda el sitio de R2 Truncation
$All_read_and_info_HASH{$Read_Name}{'R2_Truncation'} = $Read_ID;
print OUTPUT $Read_Name."\t".$All_read_and_info_HASH{$Read_Name}{'Sequence'}."\t".$All_read_and_info_HASH{$Read_Name}{'Clipped_Nt'}."\t".$All_read_and_info_HASH{$Read_Name}{'Non_R2_Sequence'}."\t".$All_read_and_info_HASH{$Read_Name}{'R2_Matched_Nt'}."\t".$All_read_and_info_HASH{$Read_Name}{'R2_Matched_Sequence'}."\t".$All_read_and_info_HASH{$Read_Name}{'CIGAR'}."\t".$All_read_and_info_HASH{$Read_Name}{'28s_Start'}."\t".$All_read_and_info_HASH{$Read_Name}{'28s_Matched_NT'}."\t".$All_read_and_info_HASH{$Read_Name}{'28s_Matched_Sequence'}."\t".$All_read_and_info_HASH{$Read_Name}{'Result'}."\t".$All_read_and_info_HASH{$Read_Name}{'R2_Truncation'}."\n";
#print $Read_Name."\n".$All_read_and_info_HASH{$Read_Name}{'Sequence'}."\n".$All_read_and_info_HASH{$Read_Name}{'First_N'}."\n".$All_read_and_info_HASH{$Read_Name}{'Sequence'}."\n".$All_read_and_info_HASH{$Read_Name}{'Last_N'}."\n";
#<STDIN>;
}
close(R2_FILE);
close(OUTPUT);
答案 0 :(得分:2)
尝试使用
my @Split_Line = split(/\t+/, $Line);
因为你将它设置在循环块之外。
您也可以设置变量......
my( $Read_Name, $Read_ID ,$Read_Cigar , $Read_Seq , $Read_Info ) =
split(/\t+/, $Line);