[Bioperl-l] Re: [Bioperl-guts-l] bioperl-live/Bio/FeatureIO gff.pm,
1.16, 1.17
Allen Day
allenday at ucla.edu
Tue Nov 16 19:00:18 EST 2004
there should be a next_sequence method. i wrote this into
Bio::Tools::GFF, we should pretty much be able to just copy/paste it over.
-allen
On Tue, 16 Nov 2004, Scott Cain wrote:
> Update of /home/repository/bioperl/bioperl-live/Bio/FeatureIO
> In directory pub.open-bio.org:/tmp/cvs-serv5204
>
> Modified Files:
> gff.pm
> Log Message:
> added stuff to support fasta and target processing. The quesion remains what to
> do with this data once you have it--particularly the fasta data. Should there be
> (or is there) a next_sequence() method?
>
>
> Index: gff.pm
> ===================================================================
> RCS file: /home/repository/bioperl/bioperl-live/Bio/FeatureIO/gff.pm,v
> retrieving revision 1.16
> retrieving revision 1.17
> diff -C2 -d -r1.16 -r1.17
> *** gff.pm 16 Nov 2004 16:22:53 -0000 1.16
> --- gff.pm 16 Nov 2004 19:35:09 -0000 1.17
> ***************
> *** 211,215 ****
> return undef unless $gff_string;
>
> ! if($gff_string =~ /^##/){
> $self->_handle_directive($gff_string);
> return $self->next_feature();
> --- 211,215 ----
> return undef unless $gff_string;
>
> ! if($gff_string =~ /^##/ or $gff_string =~ /^>/){
> $self->_handle_directive($gff_string);
> return $self->next_feature();
> ***************
> *** 248,255 ****
> }
>
> ! elsif($directive eq 'FASTA'){
> $self->warn("'##$directive' directive handling not yet implemented");
> ! while($self->_readline()){
> ! #suck up the rest of the file
> }
> }
> --- 248,266 ----
> }
>
> ! elsif($directive eq 'FASTA' or $directive =~ /^>(.+)/){
> ! my $fasta_directive_id = $1 if $1;
> $self->warn("'##$directive' directive handling not yet implemented");
> ! local $/ = '>';
> ! while(my $read = $self->_readline()){
> ! chomp $read;
> ! my $fasta_id;
> ! my @seqarray = split /\n/, $read;
> ! if ($fasta_directive_id) {
> ! $fasta_id = $fasta_directive_id;
> ! $fasta_directive_id = '';
> ! } else {
> ! $fasta_id = shift @seqarray;
> ! }
> ! my $seq = join '', @seqarray;
> }
> }
> ***************
> *** 357,363 ****
> );
>
> ! if ($strand eq '+') {
> $strand = 1;
> ! } elsif ($strand eq '-') {
> $strand = -1;
> }
> --- 368,374 ----
> );
>
> ! if ($strand && $strand eq '+') {
> $strand = 1;
> ! } elsif ($strand && $strand eq '-') {
> $strand = -1;
> }
>
> _______________________________________________
> Bioperl-guts-l mailing list
> Bioperl-guts-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-guts-l
>
More information about the Bioperl-l
mailing list