Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bioperl

    I have try to use the get_SeqFeatures with the following code, however the output looks like there are some errors, not sure how to fix that, any help? Thanks.

    #!/usr/bin/perl

    use Bio::Perl;
    use Bio::SeqIO;
    #use Bio::Graphics;
    use Bio::SeqFeature::Generic;

    my $seqio = Bio::SeqIO->new(-fh => \*STDIN, -format => 'genbank');
    while (my $seq = $seqio->next_seq()) {
    # $seq is-a Bio::FeatureHolderI, hence:
    my @feas = $seq->get_SeqFeatures();
    # each element is-a Bio::SeqFeatureI
    foreach my $fea (@feas) {
    # do something with the feature objects
    print "$fea\n";
    }


    output

    Bio::SeqFeature::Generic=HASH(0x9f1d1c)
    Bio::SeqFeature::Generic=HASH(0x9f03dc)
    Bio::SeqFeature::Generic=HASH(0x9f0460)
    Bio::SeqFeature::Generic=HASH(0x9f25e0)
    Bio::SeqFeature::Generic=HASH(0x9f583c)
    Bio::SeqFeature::Generic=HASH(0x9f2790)
    Bio::SeqFeature::Generic=HASH(0x9f24d8)
    Bio::SeqFeature::Generic=HASH(0x9f6334)
    Bio::SeqFeature::Generic=HASH(0x9f6610)
    Bio::SeqFeature::Generic=HASH(0x9f5cd4)

  • #2
    this is just how perl works and is not a bug nor specific to bioperl

    you are attempting to print an object to the display

    you need to use one of the methods provided by that object to return something that is human-readable (i.e. a string)

    try using the display_name method
    --
    Jeremy Leipzig
    Bioinformatics Programmer
    --
    My blog
    Twitter

    Comment


    • #3
      Thanks. Do any one knows how to pass the objects from get_SeqFeatures, e.g. CDS/EXONS positions to the Bio::Coordinate::GeneMapper function to get different coordinate value? The doc is not very helpful at all. Thanks a lot

      Comment


      • #4
        From the genemapper documentation it looks like you'll need two things:
        # get a Bio::RangeI representing the start, end and strand of the CDS
        # in chromosomal (or entry) coordinates
        my $cds;

        # get a Bio::Location::Split or an array of Bio::LocationI objects
        # holding the start, end and strand of all the exons in chromosomal
        # (or entry) coordinates
        the latter can be gleaned from the SeqFeature using the Location method, though you might have to put them into an array


        There are pretty good BioPerl mailing lists out there but I suggest you learn more basics about using perl objects before posting questions to one of those.
        --
        Jeremy Leipzig
        Bioinformatics Programmer
        --
        My blog
        Twitter

        Comment


        • #5
          I know the functions, however the documentation is not very clear without a good working example. which site is a better bioperl mailing list?

          Comment


          • #6
            how to I get the value out of this objects

            Comment


            • #7
              look at the methods and find one that returns an integer or a string

              have you read through Beginning Perl for Bioinformatics and Mastering Perl for Bioinformatics?

              I understand your frustration but I would not suggest posting to the bp boards. First familiarize yourself well with perl and then read every post you can about coordinates.

              --
              Jeremy Leipzig
              Bioinformatics Programmer
              --
              My blog
              Twitter

              Comment


              • #8
                Thanks, not have much time with it, would like quick help to move on, however thanks anyway.

                Comment

                Latest Articles

                Collapse

                • seqadmin
                  Strategies for Sequencing Challenging Samples
                  by seqadmin


                  Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                  03-22-2024, 06:39 AM
                • seqadmin
                  Techniques and Challenges in Conservation Genomics
                  by seqadmin



                  The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                  Avian Conservation
                  Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                  03-08-2024, 10:41 AM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by seqadmin, Yesterday, 06:37 PM
                0 responses
                10 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, Yesterday, 06:07 PM
                0 responses
                9 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 03-22-2024, 10:03 AM
                0 responses
                49 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 03-21-2024, 07:32 AM
                0 responses
                67 views
                0 likes
                Last Post seqadmin  
                Working...
                X