[Bioperl-l] GFF file output missing semicolon

Lincoln Stein lstein at cshl.edu
Fri Nov 21 12:41:25 EST 2003


Hi,

The GFF2 spec specifies that the semicolon separates tag/value pairs.  It does 
not say that the last tag/value should be terminated by a semicolon.  It also 
specifies that any amount of whitespace can occur around the semicolon.

Lincoln

On Thursday 20 November 2003 11:19 pm, Wes Barris wrote:
> Hi,
>
> I have written a bioperl program that parses blast files and generates
> a gff file.  I have everything working except there is one small detail
> that I have not been able to figure out.  When generating each line
> of gff output, the semicolon is left off at the end of the Accession
> name.  Here is a sample line from a gff file that I generated:
>
> AF354168        mirseeker       pred_miRNA      188152  188251  198     -  
>    . Note "mirseeker score 17.58"   ; Accession
> "s-h_19_r_99330000-99363000"
>
> Notice that:
>
> 1) There are three space characters after the note and the semicolon
>     that occurs before "Accession".
>
> 2) At the end of the line, after the Accession, there are three space
>     characters and no semicolon.  Without that semicolon, the genome
>     browser doesn't display the "rollover" information properly.
>
> 3) The "Note" field is written before the "Accession" field.  I thought
>     that the Accession should come first.
>
> Here is the relevant portion of my code:
>
>        while( my $hsp = $hit->next_hsp ) {
>           my $strand = 1;
>           $strand = -1 if ($hsp->strand('query') == -1 ||
> $hsp->strand('hit') == -1); my $feature = new Bio::SeqFeature::Generic(
>                          -source_tag=>$source,
>                          -primary_tag=>$feature_type,
>                          -start=>$hsp->start('hit'),
>                          -end=>$hsp->end('hit'),
>                          -score=>$hit->raw_score,
>                          -strand=>$strand,
>                          -tag=>{
>                                  Accession=>$result->query_name,
>                                  Note=>$result->query_description,
>                                  }
>                          );
>           $feature->seq_id($hit->accession);
>           $gffio->write_feature($feature);       #Bio::SeqFeatureI
>        }
>
> Perhaps I am not adding the "Accession" and "Note" fields properly???

-- 
========================================================================
Lincoln D. Stein                           Cold Spring Harbor Laboratory
lstein at cshl.org			                  Cold Spring Harbor, NY
========================================================================




More information about the Bioperl-l mailing list