Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • jsun529
    Member
    • Apr 2009
    • 52

    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)
  • Zigster
    Jeremy Leipzig
    • May 2009
    • 117

    #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

    • jsun529
      Member
      • Apr 2009
      • 52

      #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

      • Zigster
        Jeremy Leipzig
        • May 2009
        • 117

        #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

        • jsun529
          Member
          • Apr 2009
          • 52

          #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

          • jsun529
            Member
            • Apr 2009
            • 52

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

            Comment

            • Zigster
              Jeremy Leipzig
              • May 2009
              • 117

              #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

              • jsun529
                Member
                • Apr 2009
                • 52

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

                Comment

                Latest Articles

                Collapse

                • SEQadmin2
                  Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
                  by SEQadmin2


                  Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

                  The systematic characterization of the human proteome has
                  ...
                  07-20-2026, 11:48 AM
                • SEQadmin2
                  Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                  by SEQadmin2



                  Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
                  ...
                  07-09-2026, 11:10 AM
                • SEQadmin2
                  Cancer Drug Resistance: The Lingering Barrier to Rising Survival
                  by SEQadmin2



                  Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

                  There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
                  07-08-2026, 05:17 AM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by SEQadmin2, Yesterday, 12:17 PM
                0 responses
                13 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-23-2026, 11:41 AM
                0 responses
                13 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-20-2026, 11:10 AM
                0 responses
                23 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-13-2026, 10:26 AM
                0 responses
                37 views
                0 reactions
                Last Post SEQadmin2  
                Working...