[BiO BB] gff to sequence

Dan Bolser dan.bolser at gmail.com
Sat Oct 3 07:54:51 EDT 2009


You can do this easily in Perl... Here is some 'pseudo code' to
(roughly) do it...


## Get a hash of sequences, keys = IDs, values = sequence strings;
my %sequences;
...

# open the GFF file ...

while(my $gff = <GFF>){
  my @gffcols = split(/\t/, $gff);

  print substr($sequence{$gffcols[0]}, $gffcols[3], $gffcols[4] -
$gffcols[3]), "\n";
  ...
}


Or something roughly similar to the above ;-)

Dan.


2009/10/3 Kie Kyon Huang <kiekyon.huang at gmail.com>:
> Hi,
>
> Is there a way to quickly extract out the coordinates from a gff file
> and the corresponding sequence from a fasta file?
>
> thanks
>
> _______________________________________________
> BBB mailing list
> BBB at bioinformatics.org
> http://www.bioinformatics.org/mailman/listinfo/bbb
>




More information about the BBB mailing list