[Bioperl-l] hapmap.pm startingcol now 11?

Albert Vilella avilella at ub.edu
Thu Mar 10 08:31:16 EST 2005


Hi all,

AFAICS, Hapmap dump files have (since Dec 2004?) an extra field previous
to the starting column for the first genotype, so the $startingcol in
hapmap.pm should change from 10 to 11 (see end of message).

Can anyone confirm? 

I'm getting a MSG:

-------------------- WARNING ---------------------
MSG: cannot add NA06993 as a genotype skipping
--------------------------------------------------

And I'm not sure is related to this or not,

Bests,

    Albert.

hapmap.pm
---------------------------
sub _pivot {
    my ($self) = @_;

    my (@cols, at rows, at idheader);
    while ($_ = $self->_readline){
	chomp($_);
	next if( /^\s*\#/ || /^\s+$/ || ! length($_) );
	if( /^rs\#\s+alleles\s+chrom\s+pos\s+strand/ ) {
	    @idheader = split $self->flag('field_delimiter');
	} else { 
	    push @cols, [split $self->flag('field_delimiter')];
	}
    }
    #Post Dec 2004. Previously was 10
    my $startingcol = 11;

    $self->{'_header'} = [ map { $_->[0] } @cols];
    for my $n ($startingcol.. $#{ $cols[ 0 ]}) { 
	my $column = [ $idheader[$n],
		       map{ $_->[ $n ] } @cols ];	
	push (@rows, $column); 
    }
    $self->{'_pivot'} = [@rows];
    $self->{'_i'} = 0;
}
---------------------------


More information about the Bioperl-l mailing list