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
                  Current Approaches to Protein Sequencing
                  by seqadmin


                  Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
                  04-04-2024, 04:25 PM
                • 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

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by seqadmin, 04-11-2024, 12:08 PM
                0 responses
                30 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 04-10-2024, 10:19 PM
                0 responses
                32 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 04-10-2024, 09:21 AM
                0 responses
                28 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 04-04-2024, 09:00 AM
                0 responses
                52 views
                0 likes
                Last Post seqadmin  
                Working...
                X