[Bioperl-l] more question about extracting information from G
FF file
Marc Logghe
Marc.Logghe at devgen.com
Thu Apr 10 12:47:56 EDT 2003
This should do it:
#!/usr/bin/perl -w
use strict;
use Bio::Tools::GFF;
my $gff = Bio::Tools::GFF->new(-fh => \*STDIN);
while (my $f = $gff->next_feature)
{
print $f->get_tag_values('Sequence'),"\n" ;
}
Marc
> -----Original Message-----
> From: Jack Chen [mailto:chenn at cshl.edu]
> Sent: Thursday, April 10, 2003 2:31 AM
> To: bioperl-l at bioperl.org
> Subject: [Bioperl-l] more question about extracting
> information from GFF
> file
>
>
> To: bioperl-l at bioperl.org
> Subject: more questions about parsing gff files
> Parts/Attachments:
> 1 Shown 21 lines Text
> 2 OK ~736 bytes Text, ""
> ----------------------------------------
>
> Hi All,
>
> I'd like to ask you for assistance on how to extract some
> fields from gff
> files. Say from the attached file, I'd like to get the
> sequence name (the
> string inside the double quotes). Could you please show me how to do
> this? I have tried methods from the Bio::SeqFeatureI module
> but none of
> them do the trick.
>
> Thanks,
>
> Jack
>
> Example file:
>
> CHROMOSOME_I curated exon 5959876 5959878 . - 0
> Sequence "B0207.8"
> CHROMOSOME_I curated exon 10079837 10079839
> . -
> 0 Sequence "B0379.2"
> CHROMOSOME_I curated exon 6628806 6628808 . + 0
> Sequence "D2092.8"
> CHROMOSOME_I curated exon 9171713 9171715 . + 0
> Sequence "F25H5.4"
> CHROMOSOME_I curated exon 7356125 7356126 . + 2
> Sequence "F52A8.6b"
> CHROMOSOME_I curated exon 5020062 5020064 . - 0
> Sequence "F54C1.7"
> CHROMOSOME_I curated exon 6149532 6149534 . + 0
> Sequence "F56F4.3"
> CHROMOSOME_I curated exon 13333412 13333414
> . +
> 0 Sequence "T04D3.4"
> CHROMOSOME_I curated exon 6162206 6162208 . + 0
> Sequence "T09B4.5"
> HROMOSOME_X curated exon 9493440 9493442 . - 0
> Sequence "ZK899.4"
>
>
> +-----O----------------------------------------+
> | o-o Jack Chen, Stein Laboratory |
> | o---o Cold Spring Harbor Laboratory |
> | o----o 1 Bungtown Road |
> | O----O Cold Spring Harbor, NY, 11724 |
> | 0--o Tel: 1 516 367 8394 |
> | O Website: http://www.wormbase.org |
> | o-o e-mail: chenn at cshl.org |
> +-o---o----------------------------------------+
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>
More information about the Bioperl-l
mailing list