This project is read-only.

Extract sequence features from GenBank

Nov 12, 2014 at 10:38 AM

Using Visual Studio I'm trying to retrieve the sequence features from a GenBank file.
I havn't been able yet to find the way of doing this. I made this code, but don't know where to go next...
   var parser = new Bio.IO.GenBank.GenBankParser();
   var sequence = parser.Parse().First();
   foreach (var pair in sequence.Metadata) {
          Console.WriteLine(pair.Value); // This is not a feature? :(
I believe it must be a small thing I'm missing, though I can't solve it. Can anybody clear this up for me or redirect me to the corresponding documentation?

Thank you
Nov 12, 2014 at 10:52 AM
Edited Nov 12, 2014 at 10:53 AM

The Metadata collection may contain multiple entries. In a GenBank file, it contains a GenBankMetadata object, which in turn contains details of the features.

Check out the cookbook entry at How do I use GenBank sequence metadata? which will hopefully set you on the right track.

Cheers, Lawrence.