prbndr has asked for the wisdom of the Perl Monks concerning the following question:
i'm trying to recreate the real read sequence from its cigar string by adding insertions to the read (with a ^ character) and deletions (with a - character). i'm not exactly sure how to do this, since i can't access the cigar string. it seems to be stored in a reference to an array. see the following code:my @all_reads = $segment->features( -type => 'match', -seq_id => $seq_ids[0], -start => $window_start, -end => $window_end, -filter => sub { shift->strand == -1 }, );
i don't know how to display the reference to the array denoted by the $read->cigar_array part of the code. it prints out ARRAY(0x100a2d058) or something similar instead of the split cigar string. once i get this working, i would need to add my desired characters to the read sequence to get to create the raw read. does anyone have any help? thanks!for my $read (@all_reads) { print $read->qname,',',$read->aux_get("MD"), ',',$read->cigar_arra +y,',', $read->strand, "\n"; };
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: cigar string
by aaron_baugher (Curate) on Nov 29, 2011 at 05:06 UTC |